mirror of
https://github.com/meshcore-dev/meshcore-cli.git
synced 2026-04-20 22:13:48 +00:00
don't display ble nodes in repeater mode
This commit is contained in:
parent
188f00221c
commit
8367acec8f
1 changed files with 4 additions and 4 deletions
|
|
@ -4313,12 +4313,11 @@ async def main(argv):
|
||||||
version()
|
version()
|
||||||
return
|
return
|
||||||
case "-f": # connect to first encountered device
|
case "-f": # connect to first encountered device
|
||||||
address = ""
|
|
||||||
first_device = True
|
first_device = True
|
||||||
case "-q": # quiet (turns logger to ERROR only)
|
case "-q": # quiet (turns logger to ERROR only)
|
||||||
quiet = True
|
quiet = True
|
||||||
case "-l" :
|
case "-l" :
|
||||||
if BLEAK_AVAILABLE:
|
if BLEAK_AVAILABLE and not repeater_mode:
|
||||||
print("BLE devices:")
|
print("BLE devices:")
|
||||||
try :
|
try :
|
||||||
devices = await BleakScanner.discover(timeout=timeout)
|
devices = await BleakScanner.discover(timeout=timeout)
|
||||||
|
|
@ -4329,7 +4328,8 @@ async def main(argv):
|
||||||
print(f" {d.address} {d.name}")
|
print(f" {d.address} {d.name}")
|
||||||
except (BleakError, BleakDBusError):
|
except (BleakError, BleakDBusError):
|
||||||
print(" No BLE HW")
|
print(" No BLE HW")
|
||||||
print("\nSerial ports:")
|
print("")
|
||||||
|
print("Serial ports:")
|
||||||
ports = serial.tools.list_ports.comports()
|
ports = serial.tools.list_ports.comports()
|
||||||
for port, desc, hwid in sorted(ports):
|
for port, desc, hwid in sorted(ports):
|
||||||
print(f" {port:<18} {desc} [{hwid}]")
|
print(f" {port:<18} {desc} [{hwid}]")
|
||||||
|
|
@ -4337,7 +4337,7 @@ async def main(argv):
|
||||||
case "-S" :
|
case "-S" :
|
||||||
choices = []
|
choices = []
|
||||||
|
|
||||||
if BLEAK_AVAILABLE:
|
if BLEAK_AVAILABLE and not repeater_mode:
|
||||||
try :
|
try :
|
||||||
devices = await BleakScanner.discover(timeout=timeout)
|
devices = await BleakScanner.discover(timeout=timeout)
|
||||||
for d in devices:
|
for d in devices:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue