LuaNode icon indicating copy to clipboard operation
LuaNode copied to clipboard

tmr module can not trigger callback function

Open wuqian opened this issue 8 years ago • 3 comments

tmr module can not trigger callback function

wuqian avatar May 10 '17 18:05 wuqian

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!

seurat-atreides avatar Mar 25 '18 09:03 seurat-atreides

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.

seurat-atreides avatar Mar 28 '18 09:03 seurat-atreides

I have checked another example that uses callback function. It does not work neither. It seems that LuaNode's callback has bug.

khwan33 avatar Jan 10 '19 22:01 khwan33