From ebd84ea5312213e45856e8f777d5415f81b889af Mon Sep 17 00:00:00 2001 From: Christopher Stone Date: Sat, 10 Mar 2018 19:41:28 +0000 Subject: [PATCH] Minimal tweaks to formatting --- robots/little_john/telemetry/code/monitor/version1/main.py | 13 ++++++------- robots/little_john/telemetry/code/monitor/version1/plot.py | 8 +++++--- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/robots/little_john/telemetry/code/monitor/version1/main.py b/robots/little_john/telemetry/code/monitor/version1/main.py index 9711e4e..3fcf9c8 100755 --- a/robots/little_john/telemetry/code/monitor/version1/main.py +++ b/robots/little_john/telemetry/code/monitor/version1/main.py @@ -31,9 +31,9 @@ if datafeed is None: sys.exit() if platform.system() == 'Windows': - os='Windows' + os = 'Windows' else: - os='Other' + os = 'Other' logging.info('OS = ' + os) @@ -48,21 +48,20 @@ plots = [] plots.append(Plot(testseries)) plots.append(Plot(testseries2)) -''' Yes I know these are absurd placeholder names. I'm leaving it like that + +def shrubbery(ni): + ''' Yes I know these are absurd placeholder names. I'm leaving it like that for the moment because I'm not sure if this is really the only (or best) way to achive the desired result. clock.schedule_interval takes a function, not the result of the function as its argument, so how can you pass arguments to it?''' - - -def shrubbery(ni): getData(starttime, datafeed, testseries, testseries2) # Pyglet looks after the main event loop, # but this ensures that data keeps being read in -#pyglet.clock.schedule_interval(shrubbery, 0.1) +# pyglet.clock.schedule_interval(shrubbery, 0.1) pyglet.clock.schedule(shrubbery) pyglet.app.run() diff --git a/robots/little_john/telemetry/code/monitor/version1/plot.py b/robots/little_john/telemetry/code/monitor/version1/plot.py index 535d349..c07a97f 100644 --- a/robots/little_john/telemetry/code/monitor/version1/plot.py +++ b/robots/little_john/telemetry/code/monitor/version1/plot.py @@ -75,11 +75,13 @@ class Plot(pyglet.window.Window): rmar = int(self.width * self.margins[1]) tmar = int(self.height * self.margins[0]) bmar = int(self.height * self.margins[1]) - + pyglet.gl.glLineWidth(2) - linecolours = [(255, 0, 0, 255, 0, 0), (0, 220, 0, 0, 220, 0), (0, 0, 255, 0, 0, 255)] - + linecolours = [(255, 0, 0, 255, 0, 0), + (0, 220, 0, 0, 220, 0), + (0, 0, 255, 0, 0, 255)] + try: for m in range(len(series.data[0])-1): for n in range(len(series.data) - 1): -- libgit2 0.21.2