Arianna autonomous DAQ firmware

Dependencies:   mbed SDFileSystemFilinfo AriSnProtocol NetServicesMin AriSnComm MODSERIAL PowerControlClkPatch DS1820OW

Revision:
76:f8383f0292c2
Parent:
67:ec999336fcd1
Child:
84:80b15993944e
--- a/SnConfigFrame.h	Tue Feb 10 23:31:10 2015 +0000
+++ b/SnConfigFrame.h	Sun Feb 22 20:42:44 2015 +0000
@@ -91,7 +91,8 @@
         kDualThreshBit  = BIT(2), // if 0, single sided thresholds on SST
         kDiffTrigBit    = BIT(3), // if 0, send result of each comparator on SST
         kLowPwrSBDonly  = BIT(4), // if 0, low power afar/sbd power settings same as normal. if 1, afar off and sbd on during low power mode
-        kRSListOneCW    = BIT(5)  // if 0, only clear run/seq list after files sent from it
+        kRSListOneCW    = BIT(5), // if 0, only clear run/seq list after files sent from it
+        kIgnoreSDcard   = BIT(6)  // if 0, read/write data to SD card as normal. if 1, function as though no SD card is present
    };
     
     // i/o version
@@ -162,7 +163,10 @@
     uint8_t     fNormPowerMode;
     
     void SetHardDefaults();
-
+    
+    static
+    void SetSDNeedToInitFlag();
+    
     static
     uint16_t    GetTotDacsForIOVers(const uint8_t rv) {
         if (rv<9) {
@@ -264,6 +268,7 @@
     bool     IsDifferentialTrigMode() const { return ((fRunMode & kDiffTrigBit)!=0); }
     bool     IsSBDonlyLowPwrMode() const { return ((fRunMode & kLowPwrSBDonly)!=0); }
     bool     IsRunSeqListOneCommWinOnly() const { return ((fRunMode & kRSListOneCW)!=0); }
+    bool     IsIgnoringSDcard() const { return ((fRunMode & kIgnoreSDcard)!=0); }
     bool     IsLowPowerMode() const { return fIsLowPower; }
     const char* GetLabel() const { return fLabel; }
     uint32_t GetLabelStrLen() const { return strlen(fLabel); }
@@ -643,6 +648,9 @@
             ApplySafetyNets();
         }
         
+        // reset the SD card init cache, in case the SD ignore run mode changed
+        SetSDNeedToInitFlag();
+        
 #ifdef DEBUG
         printf("read from done\r\n");
 #endif