stock mbed AnalogReads current loop closed and working

Dependencies:   mbed

Fork of priustroller_2 by N K

Revision:
49:0603121a0538
Parent:
46:bd39f7e6e37f
Child:
50:16b43e8fe04f
--- a/context.cpp	Fri Apr 17 05:19:21 2015 +0000
+++ b/context.cpp	Tue Apr 21 03:52:08 2015 +0000
@@ -8,14 +8,10 @@
 
 float debug_registers[32];
 
-Context::Context(bool timed) {
+Context::Context() {
     _index = 0;
-    if (timed) {
-        _time_upd_ticker = new Ticker();
-        _time_upd_ticker->attach_us(this, &Context::upd_function, 50);
-    } else {
-        _time_upd_ticker = NULL;
-    }
+    _time_upd_ticker = new Ticker();
+    _time_upd_ticker->attach_us(this, &Context::upd_function, 50);
 }
 
 void Context::ConfigureOutputs(PinName oa, PinName ob, PinName oc, PinName en) {
@@ -79,8 +75,6 @@
 void Context::Start() {
     InitData();
     
-    if (_time_upd_ticker == NULL) return;
-    
     for (;;) {
         for (int i = 0; i < _index; i++) {
             if (_time - _call_times[i] >= _call_periods[i]) {