Erick / Mbed 2 deprecated ICE_BLE_TEST

Dependencies:   NaturalTinyShell_ice libmDot-12Sept mbed-rtos mbed

Fork of ICE by Erick

Revision:
157:0d79678ed00f
Parent:
156:44f87c5a83ae
Child:
164:7cecd731882e
--- a/src/ControlTask/ControlTask.cpp	Fri Sep 30 13:37:47 2016 +0000
+++ b/src/ControlTask/ControlTask.cpp	Fri Sep 30 13:57:45 2016 +0000
@@ -38,7 +38,10 @@
             for ( pos = timerTable.begin(); pos != timerTable.end(); ++pos ) {
                 // the timer vector is sorted by starttime, so we only need
                 // to service the first timer
-                pos->second.front()->update();
+                TimerError_t rc = pos->second.front()->update();
+                if ( rc == TIMER_CONTROL_DESTROY ) {
+                    pos->second.erase(pos->second.begin());
+                }
             }
         }