Mercurial > templog
comparison web/log.py @ 74:cb5ea75ee599
merge
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Tue, 03 Jul 2012 21:55:50 +0800 |
parents | 0a8639039453 |
children | ca08442635ca |
comparison
equal
deleted
inserted
replaced
72:a1edade2b9cd | 74:cb5ea75ee599 |
---|---|
88 '-e', str(end), | 88 '-e', str(end), |
89 '-w', str(config.GRAPH_WIDTH), | 89 '-w', str(config.GRAPH_WIDTH), |
90 '-h', str(config.GRAPH_HEIGHT), | 90 '-h', str(config.GRAPH_HEIGHT), |
91 '--slope-mode', | 91 '--slope-mode', |
92 '--border', '0', | 92 '--border', '0', |
93 '--vertical-label', 'Voltage', | 93 # '--vertical-label', 'Voltage', |
94 '--y-grid', '0.1:1', | 94 '--y-grid', '0.1:1', |
95 '--dynamic-labels', | 95 '--dynamic-labels', |
96 '--grid-dash', '1:0', | 96 '--grid-dash', '1:0', |
97 '--color', 'GRID#00000000', | 97 '--color', 'GRID#00000000', |
98 '--color', 'MGRID#aaaaaa', | 98 '--color', 'MGRID#aaaaaa', |
103 + graph_args | 103 + graph_args |
104 args += ['--font', 'DEFAULT:12:%s' % config.GRAPH_FONT] | 104 args += ['--font', 'DEFAULT:12:%s' % config.GRAPH_FONT] |
105 args += ['--font', 'WATERMARK:10:%s' % config.GRAPH_FONT] | 105 args += ['--font', 'WATERMARK:10:%s' % config.GRAPH_FONT] |
106 if have_volts: | 106 if have_volts: |
107 args += ['--right-axis', '10:-20', # matches the scalevolts CDEF above | 107 args += ['--right-axis', '10:-20', # matches the scalevolts CDEF above |
108 '--right-axis-format', '%.2lf', | 108 '--right-axis-format', '%.0lf', |
109 '--right-axis-label', 'Temperature'] | 109 # '--right-axis-label', 'Temperature' |
110 ] | |
110 | 111 |
111 rrdtool.graph(*args) | 112 rrdtool.graph(*args) |
112 return tempf.read() | 113 return tempf.read() |
113 | 114 |
114 def sensor_update(sensor_id, measurements, first_real_time, time_step): | 115 def sensor_update(sensor_id, measurements, first_real_time, time_step): |