mirror of
https://github.com/meshtastic/python.git
synced 2026-09-14 06:17:44 -04:00
Add is_licensed for ham
This commit is contained in:
1 parent
7e63a4a83b
commit
136919404b
4 files changed
+44
-36
No files matched your search
@@ -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")
|
||||
|
||||
+40
-33
File diff suppressed because one or more lines are too long.
+2
-1
@@ -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)
|
||||
|
||||
|
||||
+1
-1
Submodule proto updated: 3252ed0f13...858d816b8c.
Reference in new issue
Block a user