# HG changeset patch # User Matt Johnston # Date 1342450713 -28800 # Node ID dbcbda1e2da2d2acc407ac03d3428fe9445d8c49 # Parent bf707a3775d27056bb9b9514d50497cef2e7f439# Parent b2d0887fb30630d50f8b42f5c59ea9d9ae20d575 merge diff -r b2d0887fb306 -r dbcbda1e2da2 main.c --- a/main.c Mon Jul 16 22:56:41 2012 +0800 +++ b/main.c Mon Jul 16 22:58:33 2012 +0800 @@ -67,7 +67,7 @@ // eeprom-settable parameters. all timeouts should // be a multiple of TICK (6 seconds probably) -static uint16_t measure_wake = 120; +static uint16_t measure_wake = 138; // not a divisor of comms_wake static uint16_t comms_wake = 3600; static uint8_t wake_secs = 30; @@ -797,12 +797,6 @@ need_comms = 1; comms_timeout = wake_secs; button_pressed = 0; - } - - if (need_measurement) - { - need_measurement = 0; - do_measurement(); continue; } @@ -813,6 +807,13 @@ continue; } + if (need_measurement) + { + need_measurement = 0; + do_measurement(); + continue; + } + deep_sleep(); } diff -r b2d0887fb306 -r dbcbda1e2da2 web/log.py --- a/web/log.py Mon Jul 16 22:56:41 2012 +0800 +++ b/web/log.py Mon Jul 16 22:58:33 2012 +0800 @@ -160,7 +160,7 @@ def time_rem(name, entries): val_ticks = int(entries[name]) - val_rem = int(entries[name]) + val_rem = int(entries['%s_rem' % name]) tick_wake = int(entries['tick_wake']) tick_secs = int(entries['tick_secs']) return val_ticks + float(val_rem) * tick_secs / tick_wake