mirror of
https://github.com/meshtastic/python.git
synced 2026-01-04 13:58:00 -05:00
Add is_licensed for ham
This commit is contained in:
@@ -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")
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -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
2
proto
Submodule proto updated: 3252ed0f13...858d816b8c
Reference in New Issue
Block a user