diff --git a/software/smartwatch.py b/software/smartwatch.py index 4d1a13350c63d08f0b04d62b7afd0662c25461c8..87cda5ff6c1e0513c00276d83a5556afdd22c270 100644 --- a/software/smartwatch.py +++ b/software/smartwatch.py @@ -12,8 +12,6 @@ from matplotlib.animation import FuncAnimation from types import SimpleNamespace from enum import Enum -import threading -import random from threading import Thread TIME_OUT = 0.5 #Time out used for refreshing the User Interface @@ -173,10 +171,11 @@ class Application(tk.Frame): maxValue = 0 minValue = 0 for p in copyOfChartQueue: - if p > maxValue: - maxValue = p - if p < minValue: - minValue = p + if(type(p) == int): + if p > maxValue: + maxValue = p + if p < minValue: + minValue = p self.ax.cla() @@ -207,12 +206,4 @@ if __name__ == '__main__': t.daemon = True t.start() - #Test thread (DELETE) - def work (): - threading.Timer(0.1, work).start() - guiRef.ppgQueue.put(random.randrange(-5,5)) - - - work() - app.mainloop()