I'm looking at the code example Firmware - TPL5010 in the docs:
Isn't lastWatchdogMillis
being reset to 0 each time the serviceWatchdog
function is called? How can it compare the current millis()
with the previous kick time?
No, it isn't. Because the variable is declared static
, its value is not initialzed when it reenters scope.
It's essentially a global variable, but cannot be accessed outside that function.
1 Like
I see thanks
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.