changeset 97:bf707a3775d2

change default comms_wake
author Matt Johnston <matt@ucc.asn.au>
date Mon, 16 Jul 2012 22:58:25 +0800
parents fd9cfa6829fd
children dbcbda1e2da2
files main.c
diffstat 1 files changed, 8 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/main.c	Mon Jul 16 22:01:33 2012 +0800
+++ b/main.c	Mon Jul 16 22:58:25 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();
     }