Watchdog only once ? #5373
Replies: 1 comment
-
Posted at 2016-07-14 by @allObjects @sache, please read the conversation about Something is wrong - PICO, especially post #7 and adjust your code accordingly. In a nutshell:
And you should be all set. Posted at 2016-07-15 by Sacha @allObjects Posted at 2016-07-15 by @gfwilliams Yes, remembering watchdog state is something I didn't bother adding - it would be possible but might use for extra memory, and I figured if you're at the more advanced state of using the watchdog you could probably cope with putting it in onInit :) Posted at 2016-07-15 by @allObjects @sacha, any dynamic, time oriented 'thing' should be started by |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2016-07-14 by Sacha
Dear Gordon
I've done some tests with the new watchdog function. My testcode is the following (right side):
doreset=false;
setInterval(function() { if(doreset===false) { console.log('kick'); E.kickWatchdog(); } },20000);
E.enableWatchdog(25,false);
save();
You will see in the console every 20 seconds 'kick'. E.kickWatchdog is called.
Then please set the var doreset to true:
After a few seconds the pico will reset. Then please reconnect to the console.
You will see the output of 'kick' again.
Please give the variable doreset again the value of true.
On the console 'kick' messages are gone. E.kickWatchdog is not called anymore.
But the pico does not reset after more that 25 seconds. Please see the attached screenshot.
Do I understand something wrong ? It only resets once ?
Thanks
Sacha
Attachments:
Beta Was this translation helpful? Give feedback.
All reactions