Arianna autonomous DAQ firmware

Dependencies:   mbed SDFileSystemFilinfo AriSnProtocol NetServicesMin AriSnComm MODSERIAL PowerControlClkPatch DS1820OW

Revision:
31:b5bd3b189150
Parent:
30:f869ed4bcc08
Child:
39:2f17131d22a5
--- a/SnConfigFrame.h	Wed Nov 28 01:24:23 2012 +0000
+++ b/SnConfigFrame.h	Wed Jan 23 19:29:01 2013 +0000
@@ -9,6 +9,8 @@
 
 class SnConfigFrame {
  public:
+    static bool              fgApplySafetyNets;    // whether to apply safety bounds on certain parameters in ReadFrom (default: true)
+ 
     static const uint32_t    kMinCommWinPrdLowPwr; // exclusive min low power comm win period (s)
     static const uint32_t    kMaxCommWinPrdLowPwr; // exclusive max low power comm win period (s)
     static const uint32_t    kMinCommWinDurLowPwr; // exclusive min low power comm win duration (s)
@@ -160,7 +162,10 @@
     void ApplySafetyNets();
 
  public:
-    SnConfigFrame() : fIsLowPower(false) { Reset(); }
+    SnConfigFrame(const bool applySafety=true) : fIsLowPower(false) {
+        fgApplySafetyNets = applySafety;
+        Reset();
+    }
     virtual ~SnConfigFrame() {}
     
     bool     IsCountingPowerReadings() const { return ((fRunMode & kCountPowerBit)!=0); }
@@ -451,7 +456,9 @@
             }
         }
         
-        ApplySafetyNets();
+        if (fgApplySafetyNets) {
+            ApplySafetyNets();
+        }
         
 #ifdef DEBUG
         printf("read from done\r\n");