Erick / Mbed 2 deprecated ICE_BLE_TEST

Dependencies:   NaturalTinyShell_ice libmDot-12Sept mbed-rtos mbed

Fork of ICE by Erick

Revision:
252:3c9863f951b7
Parent:
221:2a5e9902003c
Child:
269:97243a7f56ba
--- a/src/ControlTask/ControlTask.cpp	Fri Oct 21 11:44:40 2016 +0000
+++ b/src/ControlTask/ControlTask.cpp	Fri Oct 21 18:16:42 2016 +0000
@@ -17,6 +17,7 @@
 static void serviceTimerControls(void);
 static void serviceSetpointControls(void);
 static void serviceCompositeControls(void);
+static void serviceFailsafeControls(void);
 
 /*****************************************************************************
  * Function:            ControlTask()
@@ -38,6 +39,8 @@
         serviceSetpointControls();
 
         serviceCompositeControls();
+        
+        serviceFailsafeControls();
 
         Thread::wait(1000);     // do we need to wait?
     }
@@ -127,4 +130,23 @@
             pos->second->update();
         }
     }
+}
+
+/*****************************************************************************
+ * Function:            serviceCompositeControls()
+ * Description:         service the composite controls
+ *                      controls
+ *
+ * @param               none
+ * @return              none
+ *****************************************************************************/
+static void serviceFailsafeControls(void)
+{
+    // service the setpoint controls
+    if ( !failsafeTable.empty() ) {
+        StringFailsafeMap::iterator pos;
+        for ( pos = failsafeTable.begin(); pos != failsafeTable.end(); ++pos ) {
+            pos->second->update();
+        }
+    }
 }
\ No newline at end of file