Commit 134e2762c269a9b9e02a4a83328610ef6240b0ab
Exists in
master
Merge branch 'master' of http://128.243.70.77/UoN_EEE/Robot_Wars
Showing
1 changed file
with
12 additions
and
4 deletions
Show diff stats
robots/little_john/telemetry/code/monitor/version1/main.py
@@ -20,7 +20,10 @@ from series import Series | @@ -20,7 +20,10 @@ from series import Series | ||
20 | from plot import Plot | 20 | from plot import Plot |
21 | from getdata import getData | 21 | from getdata import getData |
22 | 22 | ||
23 | -logging.basicConfig(format='%(levelname)s:\t%(message)s', level=logging.DEBUG) | 23 | +print(' Error: Module Function Message') |
24 | +# WHY WON'T THIS PRINT AT THE TOP | ||
25 | +format_string = '%(levelname)8s:\t%(module)-10s \t%(funcName)s \t%(message)s' | ||
26 | +logging.basicConfig(format=format_string, level=logging.DEBUG) | ||
24 | logging.info("Logging system active") | 27 | logging.info("Logging system active") |
25 | starttime = time.time() | 28 | starttime = time.time() |
26 | 29 | ||
@@ -36,14 +39,19 @@ else: | @@ -36,14 +39,19 @@ else: | ||
36 | os = 'Other' | 39 | os = 'Other' |
37 | logging.info('OS = ' + os) | 40 | logging.info('OS = ' + os) |
38 | 41 | ||
42 | +data_points_series_1 = 150 | ||
43 | +data_points_series_2 = 150 | ||
39 | 44 | ||
40 | -testseries = Series(points=150, xauto=True, ylimits=(0, 1024), | 45 | +testseries = Series(points=data_points_series_1, xauto=True, |
46 | + ylimits=(0, 1024), | ||
41 | title="Data from serial (time)", | 47 | title="Data from serial (time)", |
42 | xname="Time (s)", yname="ADC output") | 48 | xname="Time (s)", yname="ADC output") |
43 | -testseries2 = Series(points=150, xlimits=(0, 1024), ylimits=(0, 1024), | 49 | +logging.info('Series 1 has ' + str(data_points_series_1) + ' data points') |
50 | +testseries2 = Series(points=data_points_series_2, xlimits=(0, 1024), | ||
51 | + ylimits=(0, 1024), | ||
44 | title="Data from serial (xy)", | 52 | title="Data from serial (xy)", |
45 | xname="ADC0 output", yname="ADC7 output") | 53 | xname="ADC0 output", yname="ADC7 output") |
46 | - | 54 | +logging.info('Series 2 has ' + str(data_points_series_2) + ' data points') |
47 | plots = [] | 55 | plots = [] |
48 | plots.append(Plot(testseries)) | 56 | plots.append(Plot(testseries)) |
49 | plots.append(Plot(testseries2)) | 57 | plots.append(Plot(testseries2)) |