Arianna autonomous DAQ firmware

Dependencies:   mbed SDFileSystemFilinfo AriSnProtocol NetServicesMin AriSnComm MODSERIAL PowerControlClkPatch DS1820OW

Revision:
116:8099b754fbb4
Parent:
115:29f46e4b65d4
Child:
117:fd6798ba2e26
--- a/SnConfigFrame.cpp	Fri Dec 04 02:57:12 2015 +0000
+++ b/SnConfigFrame.cpp	Tue May 03 02:01:35 2016 +0000
@@ -18,6 +18,10 @@
 const uint8_t     SnConfigFrame::kIOVers               = 12;
 #elif CHIPBOARD==SST4CH_1GHz
 const uint8_t     SnConfigFrame::kIOVers               = 13;
+#elif CHIPBOARD==SST4CH512
+const uint8_t     SnConfigFrame::kIOVers               = 14;
+#elif CHIPBOARD==SST4CH512_1GHz
+const uint8_t     SnConfigFrame::kIOVers               = 15;
 #else
 #error CHIPBOARD value not used in config frame i/o version
 #endif
@@ -59,7 +63,7 @@
 }
 
 void SnConfigFrame::SetHardDefaults() {
-    sprintf(fLabel,"Stn32-1GHzDefaultR115");
+    sprintf(fLabel,"DefaultRev116");
     fConfTime           = 1338854400u; // Tue, 05 Jun 2012 00:00:00 GMT
     fRun                = 0;
     fFirstSeq           = 0;
@@ -383,6 +387,15 @@
     if (fWatchDogPeriod<kMinWatchDogPer) {
         fWatchDogPeriod=kMinWatchDogPer;
     }
+    if (fSnglFreqRatio<kMinSingleFreqSuppRatio) {
+        fSnglFreqRatio=kDefSingleFreqSuppRatio;
+    }
+    if (fSnglFreqRatio>kMaxSingleFreqSuppRatio) {
+        fSnglFreqRatio=kDefSingleFreqSuppRatio;
+    }
+#ifdef DEBUG
+    printf("||||||||| safety: fSnglFreqRatio=%hhu\r\n", fSnglFreqRatio);
+#endif
 }
 
 uint32_t SnConfigFrame::GetTimeoutTime(const uint32_t startTime,