Mercurial > templog
diff web/log.py @ 40:9b5b202129c3
main.c:
- get rid of some debugging
- separate uart_enabled flag
ts.py:
- remember next wake time, not the interval
log.py:
- comments for sqlite
templog.py
- use cgi
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sat, 23 Jun 2012 22:10:23 +0800 |
parents | 8da0fdadc8d7 |
children | ea99aae87884 96c336896201 |
line wrap: on
line diff
--- a/web/log.py Sat Jun 16 09:08:47 2012 +0800 +++ b/web/log.py Sat Jun 23 22:10:23 2012 +0800 @@ -79,6 +79,7 @@ rrdfile = sensor_rrd_path(sensor_id) print>>sys.stderr, values + # XXX what to do here when it fails... rrdtool.update(rrdfile, *values) # be paranoid @@ -125,9 +126,15 @@ avr_first_time = float(entries['first_time']) time_step = float(entries['time_step']) + #sqlite + # - time + # - voltage + # - boot time + first_real_time = time.time() - (avr_now - avr_first_time) for sensor_id, measurements in zip(sensors, meas): + # XXX sqlite add sensor_update(sensor_id, measurements, first_real_time, time_step) debugf.write("Updated %d sensors\n" % len(sensors))