Compare View

switch
from
...
to
 
Commits (2)
robots/little_john/telemetry/code/monitor/colours.py renamed to robots/little_john/telemetry/code/monitor/version0/colours.py
robots/little_john/telemetry/code/monitor/graph_plotter.py renamed to robots/little_john/telemetry/code/monitor/version0/graph_plotter.py
robots/little_john/telemetry/code/monitor/version1/colours.py 0 → 100644
... ... @@ -0,0 +1,5 @@
  1 +WHITE = (255, 255, 255, 255)
  2 +BLACK = (0, 0, 0, 255)
  3 +RED = (255, 0, 0, 255)
  4 +GREEN = (0, 255, 0, 255)
  5 +BLUE = (0, 0, 255, 255)
0 6 \ No newline at end of file
... ...
robots/little_john/telemetry/code/monitor/graph_plotter_rewrite.py renamed to robots/little_john/telemetry/code/monitor/version1/main.py
... ... @@ -27,7 +27,7 @@ logging.info("Logging system active")
27 27  
28 28 datafeed = selectserial()
29 29  
30   -if datafeed == 'Sorry, no serial devices found.' or None:
  30 +if datafeed == None:
31 31 logging.critical("Failed to open serial port")
32 32 sys.exit()
33 33  
... ...
robots/little_john/telemetry/code/monitor/serialselect.py renamed to robots/little_john/telemetry/code/monitor/version1/serialselect.py
... ... @@ -19,7 +19,8 @@ def selectserial():
19 19 s = serial.Serial(port)
20 20 s.close()
21 21 targetdevs.append(port)
22   - except (OSError, serial.SerialException):
  22 + # Temporarily broadened exception in attempt to make this work on uni PCs
  23 + except: # (OSError, serial.SerialException):
23 24 pass
24 25 os='Windows' #may be useful
25 26 else:
... ... @@ -32,7 +33,8 @@ def selectserial():
32 33 os='Other' #may be useful
33 34  
34 35 if len(targetdevs) == 0:
35   - return "Sorry, no serial devices found."
  36 + logging.info("No serial device found.")
  37 + return None
36 38 elif len(targetdevs) > 1:
37 39 logging.info("Found multiple serial devices: ")
38 40 for i, dev in enumerate(targetdevs):
... ...