Lizzy project
Dependencies: aconno_I2C Lis2dh12 adc52832_common aconno_SEGGER_RTT
Diff: tasks/tasks.cpp
- Branch:
- axis_normal
- Revision:
- 16:482d8f81d6f3
- Parent:
- 15:c0c01188a29b
- Child:
- 23:bf9c1dd2b5cb
diff -r c0c01188a29b -r 482d8f81d6f3 tasks/tasks.cpp --- a/tasks/tasks.cpp Wed Aug 29 14:48:43 2018 +0000 +++ b/tasks/tasks.cpp Wed Aug 29 17:08:08 2018 +0000 @@ -122,10 +122,11 @@ updateServiceT.signal_set(MEAS_DONE); bleT.signal_set(MEAS_DONE); - wait_ms(MEASURE_INTERVAL_MS); + //wait_ms(MEASURE_INTERVAL_MS); + Thread::wait(MEASURE_INTERVAL_MS); untilSleep--; - if(untilSleep <= 0) + if( (untilSleep <= 0) && !bleIsClientConnected() ) { BLE::Instance().stopAdvertising(); break; @@ -226,4 +227,13 @@ */ //wait_ms(100); } +} + +void servLoopC(void) +{ + while(1) + { + getBLEEventQueue()->dispatch_forever(); + Thread::wait(0xFFFFFFFF); + } } \ No newline at end of file