Commit af437b8fb457c111d7ed61d3eecaf79006b4348f

Authored by Christopher Stone
1 parent fa8b9945
Exists in master

Improved handling of user clicking the cancel button in the serial port selection dialogue

robots/little_john/telemetry/code/monitor/serialselect.py
... ... @@ -38,6 +38,8 @@ def selectserial():
38 38 message = "Please choose a serial port to recieve data through:"
39 39 title = "Found multiple serial ports!"
40 40 serialport = easygui.choicebox(message, title, targetdevs)
  41 + if serialport == None:
  42 + return "User cancelled selection dialogue"
41 43 else:
42 44 print("Only found one likely serial device: " + targetdevs[0])
43 45 serialport = targetdevs[0]
... ...