Skip to content

Commit

Permalink
[Bootloader] Fix display of baudrate used by luos_detect
Browse files Browse the repository at this point in the history
  • Loading branch information
fleborne committed Jan 11, 2023
1 parent e8530c6 commit 5aa8669
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pyluos/tools/bootloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -759,18 +759,20 @@ def luos_flash(args):
# @return None
# *******************************************************************************
def luos_detect(args):
print('Luos detect subcommand on port : ', args.port)
print('\tLuos detect subcommand at baudrate : ', args.baudrate)

if not (args.port):
try:
args.port= serial_discover(os.getenv('LUOS_BAUDRATE', args.baudrate))[0]
except:
sys.exit()
return

baudrate = os.getenv('LUOS_BAUDRATE', args.baudrate)

print('Luos detect subcommand on port : ', args.port)
print('\tLuos detect subcommand at baudrate : ', baudrate)

# detect network
device = Device(args.port, baudrate=os.getenv('LUOS_BAUDRATE', args.baudrate))
device = Device(args.port, baudrate=baudrate)
# print network to user
print(device.nodes)
device.close()
Expand Down

0 comments on commit 5aa8669

Please sign in to comment.