Commit ebd84ea5312213e45856e8f777d5415f81b889af
1 parent
7ec76bff
Exists in
master
Minimal tweaks to formatting
Showing
2 changed files
with
11 additions
and
10 deletions
Show diff stats
robots/little_john/telemetry/code/monitor/version1/main.py
... | ... | @@ -31,9 +31,9 @@ if datafeed is None: |
31 | 31 | sys.exit() |
32 | 32 | |
33 | 33 | if platform.system() == 'Windows': |
34 | - os='Windows' | |
34 | + os = 'Windows' | |
35 | 35 | else: |
36 | - os='Other' | |
36 | + os = 'Other' | |
37 | 37 | logging.info('OS = ' + os) |
38 | 38 | |
39 | 39 | |
... | ... | @@ -48,21 +48,20 @@ plots = [] |
48 | 48 | plots.append(Plot(testseries)) |
49 | 49 | plots.append(Plot(testseries2)) |
50 | 50 | |
51 | -''' Yes I know these are absurd placeholder names. I'm leaving it like that | |
51 | + | |
52 | +def shrubbery(ni): | |
53 | + ''' Yes I know these are absurd placeholder names. I'm leaving it like that | |
52 | 54 | for the moment because I'm not sure if this is really the only (or best) way |
53 | 55 | to achive the desired result. clock.schedule_interval takes a function, |
54 | 56 | not the result of the function as its argument, so how can you pass arguments |
55 | 57 | to it?''' |
56 | - | |
57 | - | |
58 | -def shrubbery(ni): | |
59 | 58 | getData(starttime, datafeed, testseries, testseries2) |
60 | 59 | |
61 | 60 | |
62 | 61 | # Pyglet looks after the main event loop, |
63 | 62 | # but this ensures that data keeps being read in |
64 | 63 | |
65 | -#pyglet.clock.schedule_interval(shrubbery, 0.1) | |
64 | +# pyglet.clock.schedule_interval(shrubbery, 0.1) | |
66 | 65 | pyglet.clock.schedule(shrubbery) |
67 | 66 | |
68 | 67 | pyglet.app.run() | ... | ... |
robots/little_john/telemetry/code/monitor/version1/plot.py
... | ... | @@ -75,11 +75,13 @@ class Plot(pyglet.window.Window): |
75 | 75 | rmar = int(self.width * self.margins[1]) |
76 | 76 | tmar = int(self.height * self.margins[0]) |
77 | 77 | bmar = int(self.height * self.margins[1]) |
78 | - | |
78 | + | |
79 | 79 | pyglet.gl.glLineWidth(2) |
80 | 80 | |
81 | - linecolours = [(255, 0, 0, 255, 0, 0), (0, 220, 0, 0, 220, 0), (0, 0, 255, 0, 0, 255)] | |
82 | - | |
81 | + linecolours = [(255, 0, 0, 255, 0, 0), | |
82 | + (0, 220, 0, 0, 220, 0), | |
83 | + (0, 0, 255, 0, 0, 255)] | |
84 | + | |
83 | 85 | try: |
84 | 86 | for m in range(len(series.data[0])-1): |
85 | 87 | for n in range(len(series.data) - 1): | ... | ... |