mirror of
https://github.com/meshtastic/python.git
synced 2026-01-20 13:48:16 -05:00
Merge branch 'ble-logging' into pr-powermon
# Conflicts: # .vscode/launch.json # meshtastic/protobuf/config_pb2.py # meshtastic/protobuf/mesh_pb2.py # meshtastic/protobuf/mesh_pb2.pyi
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
[run]
|
||||
omit = meshtastic/*_pb2.py,meshtastic/tests/*.py,meshtastic/test.py
|
||||
omit = meshtastic/protobuf/*_pb2.py,meshtastic/tests/*.py,meshtastic/test.py
|
||||
|
||||
[report]
|
||||
exclude_lines =
|
||||
|
||||
@@ -15,7 +15,7 @@ echo "Fixing up protobuf paths in ${TMPDIR} temp directory"
|
||||
|
||||
|
||||
# Ensure a clean build
|
||||
rm -r "${TMPDIR}"
|
||||
[ -e "${TMPDIR}" ] && rm -r "${TMPDIR}"
|
||||
|
||||
INDIR=${TMPDIR}/in/meshtastic/protobuf
|
||||
OUTDIR=${TMPDIR}/out
|
||||
|
||||
@@ -1089,7 +1089,7 @@ def common():
|
||||
print(f"Found: name='{x.name}' address='{x.address}'")
|
||||
meshtastic.util.our_exit("BLE scan finished", 0)
|
||||
elif args.ble:
|
||||
client = BLEInterface(args.ble_dest, debugOut=logfile, noProto=args.noproto, noNodes=args.no_nodes)
|
||||
client = BLEInterface(args.ble if args.ble != "any" else None, debugOut=logfile, noProto=args.noproto, noNodes=args.no_nodes)
|
||||
elif args.host:
|
||||
try:
|
||||
client = meshtastic.tcp_interface.TCPInterface(
|
||||
@@ -1159,14 +1159,10 @@ def addConnectionArgs(parser: argparse.ArgumentParser) -> argparse.ArgumentParse
|
||||
|
||||
group.add_argument(
|
||||
"--ble",
|
||||
help="The BLE device address or name to connect to",
|
||||
action="store_true",
|
||||
)
|
||||
|
||||
outer.add_argument(
|
||||
"--ble-dest",
|
||||
help="The BLE device address or name to connect to",
|
||||
help="Connect to a BLE device, optionally specifying a device name (defaults to 'any')",
|
||||
nargs="?",
|
||||
default=None,
|
||||
const="any"
|
||||
)
|
||||
|
||||
return parser
|
||||
|
||||
Reference in New Issue
Block a user