Add is_licensed for ham

This commit is contained in:
Kevin Hester
2021-04-10 11:38:47 +08:00
parent 7e63a4a83b
commit 136919404b
4 changed files with 44 additions and 36 deletions

View File

@@ -267,7 +267,7 @@ def onConnected(interface):
closeNow = True
print(
f"Setting HAM ID to {args.set_ham} and turning off encryption")
getNode().setOwner(args.set_ham)
getNode().setOwner(args.set_ham, is_licensed = True)
# Must turn off crypt on primary channel
ch = getNode().channels[0]
ch.settings.psk = fromPSK("none")

View File

File diff suppressed because one or more lines are too long

View File

@@ -205,7 +205,7 @@ class Node:
else:
return 0
def setOwner(self, long_name, short_name=None):
def setOwner(self, long_name, short_name=None, is_licensed=False):
"""Set device owner name"""
nChars = 3
minChars = 2
@@ -232,6 +232,7 @@ class Node:
if len(short_name) > nChars:
short_name = short_name[:nChars]
p.set_owner.short_name = short_name
p.set_owner.is_licensed = is_licensed
return self._sendAdmin(p)

2
proto

Submodule proto updated: 3252ed0f13...858d816b8c