System Management code

Dependencies:   mbed CANBuffer Watchdog MODSERIAL mbed-rtos xbeeRelay IAP

Fork of SystemManagement by Martin Deng

Revision:
39:ddf38df9699e
Parent:
38:8efacce315ae
--- a/Libs/LatchMonitor/LatchMonitor.cpp	Sat Feb 07 08:54:51 2015 +0000
+++ b/Libs/LatchMonitor/LatchMonitor.cpp	Wed Feb 11 23:09:57 2015 +0000
@@ -3,17 +3,16 @@
 LatchMonitor::LatchMonitor(PinName _ok, PinName _fault) : okPin(_ok, PullDown), faultPin(_fault, PullDown)
 {
     started = false;
-    lastStat = 0;
     startDelay = 0;
 }
+
 void LatchMonitor::setup(float* _startDelay)
 {
     startDelay = _startDelay;
 }
+
 void LatchMonitor::delayStart()
 {
-    lastStat = 0;
-    update();
     if (startDelay == 0) return;    // Not setup yet
 
     // Power-on reset detected
@@ -39,9 +38,8 @@
     if (started) {
         ret |= !okPin << 2;                 // Mirror the ok pin when started only
         if (!okPin && !faultPin) {          // If started && okFault but not caught in hardware
-            ret |= HARD_FAULT;
+            //ret |= HARD_FAULT;
         }
     }
-    lastStat = ret;
     return ret;
 }