changeset 87:81b8c84344c4

- log more details - less silly way to load localconfig
author Matt Johnston <matt@ucc.asn.au>
date Thu, 12 Jul 2012 23:44:20 +0800
parents 6c18e0d12276
children 6f4497a448e8
files main.c web/config.py
diffstat 2 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/main.c	Wed Jul 11 23:43:36 2012 +0800
+++ b/main.c	Thu Jul 12 23:44:20 2012 +0800
@@ -296,6 +296,12 @@
     fprintf_P(crc_stdout, PSTR("last_time=%lu\n"),  last_measurement_clock);
     fprintf_P(crc_stdout, PSTR("comms_time=%lu\n"), last_comms_clock);
     fprintf_P(crc_stdout, PSTR("voltage=%hu\n"), adc_vcc());
+    fprintf_P(crc_stdout, PSTR("measure=%hu\n"), measure_wake);
+    fprintf_P(crc_stdout, PSTR("comms=%hu\n"), comms_wake);
+    fprintf_P(crc_stdout, PSTR("wake=%hhu\n"), wake_secs);
+    fprintf_P(crc_stdout, PSTR("tick=%d\n"), TICK);
+    fprintf_P(crc_stdout, PSTR("maxsens=%hhu\n"), MAX_SENSORS);
+    fprintf_P(crc_stdout, PSTR("totalmeas=%hu\n"), TOTAL_MEASUREMENTS);
     fprintf_P(crc_stdout, PSTR("sensors=%hhu\n"), n_sensors);
     for (uint8_t s = 0; s < n_sensors; s++)
     {
--- a/web/config.py	Wed Jul 11 23:43:36 2012 +0800
+++ b/web/config.py	Thu Jul 12 23:44:20 2012 +0800
@@ -35,10 +35,6 @@
 GRAPH_LEFT_MARGIN = 63
 
 try:
-    import localconfig
-    g = globals()
-    for k in dir(localconfig):
-        if k in g:
-            g[k] = localconfig.__dict__[k]
+    from localconfig import *
 except ImportError:
     pass