tmr module can not trigger callback function
tmr module can not trigger callback function
True and proven! the tmr.register function is not working as described. The declared callback function is never called after timeout. I called: tmr.register(1, 3000, tmr.ALARM_AUTO, function() print("Trigger") end); tmr.start(1); from the lua prompt and got nothing back. What a shame!
I have dug into the timer module (tmr.c) and can see that the timer alarm functions (register, unregister, start & stop) are doing nothing useful. The os_timer_??? calls are all commented out. These calls seem to be deprecated according to the esp-idf documentation I have read! As I'm not an experienced programmer I would like to know if someone (maybe wuqian) can help out.
I have checked another example that uses callback function. It does not work neither. It seems that LuaNode's callback has bug.