Repository navigation
Moved reset of reboot reason to main program - #1153
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The check and reset of data about reboot reason was managed by the webserver. Moved this code to the main program as it makes more sense.
This change was triggered by a report from a customer who experienced reboot, but the reason on the status page was unhelpful because it said "Deep sleep". Deep sleep was introduced in v2.5.6 via #1121 and is there to make sure that the capacitor is charged as high as possible before continuing the boot. But this also caused the data about the previous reboot to be overwritten because the webserver class had already been initialized and reset the data.
Moving the data to the main program makes it possible to keep the cause past multiple deep sleeps, but it would loose the information of type of reboot. That's why deep sleep is disabled in this update, so that it is easier to see reason for a reboot. The program will still pause to charge the capacitor, but be "awake" for the process, and the maximum allowed loops to wait have been increased to 8, which makes it slightly slower, but still works as intended.