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:
Kevin Hester
2024-06-30 07:06:32 -07:00
3 changed files with 6 additions and 10 deletions

View File

@@ -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 =

View File

@@ -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

View File

@@ -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