![](/media/cache/group/orange_and_cat.png.50x50_q85.jpg)
pwm period is now 200us instead of the default 20ms veml6040 config is now AF_BIT | TRIG_BIT
Dependencies: mbed MMA8451Q USBDevice WakeUp vt100
Fork of afero_node_suntory_2017_06_15 by
Diff: sensors/TimeEventHandler.hpp
- Revision:
- 2:dfe671e31221
- Parent:
- 1:b2a9a6f2c30e
- Child:
- 5:9d5c7ee80f3b
--- a/sensors/TimeEventHandler.hpp Thu Jan 19 09:17:16 2017 +0000 +++ b/sensors/TimeEventHandler.hpp Tue Jan 24 10:00:28 2017 +0000 @@ -14,21 +14,34 @@ static Timeout timeout; PACKET packet; void (A::*callback)(); - inline void nop(){} + uint32_t nop_i; + inline void nop(){ + if(nop_i>400) + { + nop_i = 0; + SERIAL_PRINT_DBG("."); + } + ++nop_i; + } void read() { callback = &A::go; } void backToNOP() { - callback = &A::nop; + callback = NULL;//&A::nop; } public: void loop() { - (self->*callback)(); + if(callback != NULL) + { + (self->*callback)(); + } } - TimeEventHandler(){} + TimeEventHandler(){ + nop_i = 0; + } static A* getInstance() {