N K
/
GaNtroller
a fork of priustroller
Fork of priustroller_current by
Diff: context.cpp
- Revision:
- 49:0603121a0538
- Parent:
- 46:bd39f7e6e37f
- Child:
- 50:16b43e8fe04f
diff -r 28edb4c5c04b -r 0603121a0538 context.cpp --- 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]) {