Compare View

switch
from
...
to
 
Commits (2)
robots/little_john/telemetry/code/monitor/graph_plotter_rewrite.py
... ... @@ -15,12 +15,15 @@ import os
15 15 import platform
16 16 import sys
17 17 import easygui
  18 +import logging
18 19 from serialselect import selectserial
19 20  
20 21 from colours import *
21 22  
22   -datafeed = selectserial()
  23 +logging.basicConfig(level=logging.DEBUG)
  24 +logging.info("Logging system active")
23 25  
  26 +datafeed = selectserial()
24 27  
25 28 if type(datafeed) is str:
26 29 easygui.msgbox("Failed to open serial port:\n" + datafeed, "Fatal error")
... ...
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]
... ...