Compare View
Commits (2)
-
…nges to error reporting to use logging better, and broadening an exception, as the type specifically suggested doesn't seem to exist. (This should probably be fixed more carefully at some point). Code does now work on uni PCs, at least up to failure to find a serial port, which is handled correctly.
-
…older version moved to version1. Same file, but there's no such thing as git cp, and the file in its current state should be preserved for use with the old graph plotter
Showing
5 changed files
Show diff stats
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
robots/little_john/telemetry/code/monitor/graph_plotter_rewrite.py renamed to robots/little_john/telemetry/code/monitor/version1/main.py
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): | ... | ... |