Mercurial > templog
changeset 210:3f403e22c2e3
improved layering of sensor lines
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Thu, 26 Jun 2014 22:58:25 +0800 |
parents | 9c2de3f977e4 |
children | 59379b2bd056 |
files | web/log.py |
diffstat | 1 files changed, 8 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/web/log.py Mon Apr 21 21:41:44 2014 +0800 +++ b/web/log.py Thu Jun 26 22:58:25 2014 +0800 @@ -125,22 +125,23 @@ elif legend == 'Fridge': fridge_sensor = vname - sensor_lines.sort(key = lambda (legend, line): "Wort" in legend) - - graph_args += (line for (legend, line) in sensor_lines) - - print>>sys.stderr, '\n'.join(graph_args) - # calculated bits colour = '000000' print_legend = 'Heat' graph_args.append('CDEF:wortdel=%(wort_sensor)s,PREV(%(wort_sensor)s),-' % locals()) graph_args.append('CDEF:tempdel=%(wort_sensor)s,%(fridge_sensor)s,-' % locals()) graph_args.append('CDEF:fermheat=wortdel,80,*,tempdel,0.9,*,+' % locals()) - graph_args.append('CDEF:trendfermheat=fermheat,10800,TRENDNAN' % locals()) + graph_args.append('CDEF:trendfermheat=fermheat,7200,TRENDNAN' % locals()) graph_args.append('CDEF:limitfermheat=trendfermheat,5,+,11,MIN,2,MAX' % locals()) graph_args.append('LINE0.5:limitfermheat#%(colour)s:%(print_legend)s' % locals()) + # lines are done afterwards so they can be layered + sensor_lines.sort(key = lambda (legend, line): "Wort" in legend) + graph_args += (line for (legend, line) in sensor_lines) + + print>>sys.stderr, '\n'.join(graph_args) + + end = int(start+length) start = int(start)