-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RTC.bootFailedCount should not be increased in case of a wanted reboot #1786
Comments
This value should only increase when a boot is not complete. |
Or something like this... In "Command.h": |
I looked into the source code, but the only places where that value is being altered is here: bool firstLoopConnectionsEstablished = checkConnectionsEstablished() && firstLoop;
if (firstLoopConnectionsEstablished) {
firstLoop = false;
timerAwakeFromDeepSleep = millis(); // Allow to run for "awake" number of seconds, now we have wifi.
// schedule_all_task_device_timers(); Disabled for now, since we are now using queues for controllers.
RTC.bootFailedCount = 0;
saveToRTC();
} and here: //warm boot
if (readFromRTC())
{
RTC.bootFailedCount++;
RTC.bootCounter++;
readUserVarFromRTC(); So I really don't see how this counter could keep counting, unless you're not connecting to the network, or give a command to reboot before the network connection is being made. |
Yeah, I have seen this 2 parts. But it is not working here. :-/ So I added a small helper to see it... In setup(): 1st warm boot: 2nd warm boot 3rd warm boot Normally XXX: should show '0' after each boot. |
Update: I added this helper: I see never a "XXX: Firstloop" in the log. The function is never called!!! Ok, I fixed it. For my purposes I don't need a check for a connection to a controller. I'm already happy when a WiFi connection is done for debugging.... ;-) |
Should I change something in the main version? |
I changed only "checkConnectionsEstablished" to this: |
RTC.bootFailedCount increases in every case of a reboot, but should only increase in case of a unwanted reboot (crash).
The text was updated successfully, but these errors were encountered: