mirror of
https://github.com/meshtastic/python.git
synced 2026-02-06 05:51:17 -05:00
don't check for typoed keyword
This commit is contained in:
@@ -339,7 +339,7 @@ def onConnected(interface):
|
||||
# can include lat/long/alt etc: latitude = 37.5, longitude = -122.1
|
||||
interface.getNode(args.dest, False, **getNode_kwargs).setFixedPosition(lat, lon, alt)
|
||||
|
||||
if args.set_owner or args.set_owner_short or args.set_is_unmessageable or args.set_is_unmessagable:
|
||||
if args.set_owner or args.set_owner_short or args.set_is_unmessageable:
|
||||
closeNow = True
|
||||
waitForAckNak = True
|
||||
|
||||
@@ -360,22 +360,20 @@ def onConnected(interface):
|
||||
print(f"Setting device owner to {args.set_owner}")
|
||||
elif args.set_owner_short and not args.set_owner:
|
||||
print(f"Setting device owner short to {args.set_owner_short}")
|
||||
unmessageable = (
|
||||
args.set_is_unmessageable
|
||||
if args.set_is_unmessageable is not None
|
||||
else args.set_is_unmessagable
|
||||
)
|
||||
set_is_unmessagable = (
|
||||
meshtastic.util.fromStr(unmessageable)
|
||||
if isinstance(unmessageable, str)
|
||||
else unmessageable
|
||||
)
|
||||
if set_is_unmessagable is not None:
|
||||
print(f"Setting device owner is_unmessageable to {set_is_unmessagable}")
|
||||
interface.getNode(
|
||||
args.dest, False, **getNode_kwargs).setOwner(long_name=args.set_owner,
|
||||
short_name=args.set_owner_short, is_unmessagable=set_is_unmessagable
|
||||
)
|
||||
|
||||
if args.set_is_unmessageable:
|
||||
unmessagable = (
|
||||
meshtastic.util.fromStr(args.set_is_unmessageable)
|
||||
if isinstance(args.set_is_unmessageable, str)
|
||||
else args.set_is_unmessageable
|
||||
)
|
||||
|
||||
if unmessagable is not None:
|
||||
print(f"Setting device owner is_unmessageable to {unmessagable}")
|
||||
interface.getNode(
|
||||
args.dest, False, **getNode_kwargs).setOwner(long_name=args.set_owner,
|
||||
short_name=args.set_owner_short, is_unmessagable=unmessagable
|
||||
)
|
||||
|
||||
# TODO: add to export-config and configure
|
||||
if args.set_canned_message:
|
||||
@@ -1599,7 +1597,8 @@ def addConfigArgs(parser: argparse.ArgumentParser) -> argparse.ArgumentParser:
|
||||
)
|
||||
|
||||
group.add_argument(
|
||||
"--set-is-unmessageable", "--set-is-unmessagable", help="Set if a node is messageable or not", action="store"
|
||||
"--set-is-unmessageable", "--set-is-unmessagable",
|
||||
help="Set if a node is messageable or not", action="store"
|
||||
)
|
||||
|
||||
group.add_argument(
|
||||
|
||||
1
nanopb
Submodule
1
nanopb
Submodule
Submodule nanopb added at 4380dd9e94
Reference in New Issue
Block a user