From a304b3d86871f58e40242ac3f3e08358ff16f784 Mon Sep 17 00:00:00 2001 From: Christopher Stone Date: Thu, 8 Mar 2018 18:16:12 +0000 Subject: [PATCH] Began work to use easygui for dialogues --- robots/little_john/telemetry/code/monitor/graph_plotter_rewrite.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/robots/little_john/telemetry/code/monitor/graph_plotter_rewrite.py b/robots/little_john/telemetry/code/monitor/graph_plotter_rewrite.py index dff2ded..2092ef3 100755 --- a/robots/little_john/telemetry/code/monitor/graph_plotter_rewrite.py +++ b/robots/little_john/telemetry/code/monitor/graph_plotter_rewrite.py @@ -14,14 +14,19 @@ import numpy import os import platform import sys +import easygui from serialselect import selectserial from colours import * datafeed = selectserial() -if datafeed == None: - print("Exiting...") + +if type(datafeed) is str: + easygui.msgbox("Failed to open serial port:\n" + datafeed, "Fatal error") + sys.exit() +elif datafeed == None: + easygui.msgbox("Failed to open serial port for unknown reason!", "Fatal error") sys.exit() class Series: -- libgit2 0.21.2