Commit a304b3d86871f58e40242ac3f3e08358ff16f784

Authored by Christopher Stone
1 parent 72f2bf83
Exists in master

Began work to use easygui for dialogues

robots/little_john/telemetry/code/monitor/graph_plotter_rewrite.py
@@ -14,14 +14,19 @@ import numpy @@ -14,14 +14,19 @@ import numpy
14 import os 14 import os
15 import platform 15 import platform
16 import sys 16 import sys
  17 +import easygui
17 from serialselect import selectserial 18 from serialselect import selectserial
18 19
19 from colours import * 20 from colours import *
20 21
21 datafeed = selectserial() 22 datafeed = selectserial()
22 23
23 -if datafeed == None:  
24 - print("Exiting...") 24 +
  25 +if type(datafeed) is str:
  26 + easygui.msgbox("Failed to open serial port:\n" + datafeed, "Fatal error")
  27 + sys.exit()
  28 +elif datafeed == None:
  29 + easygui.msgbox("Failed to open serial port for unknown reason!", "Fatal error")
25 sys.exit() 30 sys.exit()
26 31
27 class Series: 32 class Series: