mirror of
https://github.com/meshtastic/python.git
synced 2026-04-30 11:55:17 -04:00
@@ -228,7 +228,7 @@ def onConnected(interface):
|
||||
|
||||
if args.set_ham:
|
||||
closeNow = True
|
||||
print(f"Setting HAM ID to {args.set_ham} and turning off encryption")
|
||||
print(f"Setting Ham ID to {args.set_ham} and turning off encryption")
|
||||
getNode().setOwner(args.set_ham, is_licensed=True)
|
||||
# Must turn off encryption on primary channel
|
||||
getNode().turnOffEncryptionOnPrimaryChannel()
|
||||
@@ -738,7 +738,7 @@ def initParser():
|
||||
"--set-team", help="Set team affiliation (an invalid team will list valid values)", action="store")
|
||||
|
||||
parser.add_argument(
|
||||
"--set-ham", help="Set licensed HAM ID and turn off encryption", action="store")
|
||||
"--set-ham", help="Set licensed Ham ID and turn off encryption", action="store")
|
||||
|
||||
parser.add_argument(
|
||||
"--dest", help="The destination node id for any sent commands, if not set '^all' or '^local' is assumed as appropriate", default=None)
|
||||
|
||||
@@ -370,7 +370,7 @@ def test_main_set_ham_to_KI123(capsys, reset_globals):
|
||||
main()
|
||||
out, err = capsys.readouterr()
|
||||
assert re.search(r'Connected to radio', out, re.MULTILINE)
|
||||
assert re.search(r'Setting HAM ID to KI123', out, re.MULTILINE)
|
||||
assert re.search(r'Setting Ham ID to KI123', out, re.MULTILINE)
|
||||
assert re.search(r'inside mocked setOwner', out, re.MULTILINE)
|
||||
assert re.search(r'inside mocked turnOffEncryptionOnPrimaryChannel', out, re.MULTILINE)
|
||||
assert err == ''
|
||||
|
||||
@@ -662,7 +662,7 @@ def test_smoke1_set_ham():
|
||||
Note: Do a factory reset after this setting so it is very short-lived.
|
||||
"""
|
||||
return_value, out = subprocess.getstatusoutput('meshtastic --set-ham KI1234')
|
||||
assert re.search(r'Setting HAM ID', out, re.MULTILINE)
|
||||
assert re.search(r'Setting Ham ID', out, re.MULTILINE)
|
||||
assert return_value == 0
|
||||
# pause for the radio
|
||||
time.sleep(PAUSE_AFTER_REBOOT)
|
||||
|
||||
Reference in New Issue
Block a user