UpdateManager: reset force flag for normal firmware updates - #19
Open
jamesmulcahy wants to merge 2 commits into
Open
jamesmulcahy wants to merge 2 commits into
jamesmulcahy wants to merge 2 commits into
Conversation
_force_update is set by firmware_update_force but never cleared, so every later firmware_update in the same boot also ran as a forced update (clearing stored checksums and reflashing even when up to date). Clear it when a normal firmware_update command starts. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X7aYyRjzk53Sd7gxF46E3u
The build for original_sonoff rewrote the lockfile target from esp32s3 to esp32; it was committed by mistake. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X7aYyRjzk53Sd7gxF46E3u
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.
Summary
firmware_update_forcesetsUpdateManager::_force_update = true, but nothing ever sets it back tofalse. After one forced update in a boot (successful updates reboot, so this mainly bites when it fails), every laterfirmware_updatecommand also runs as forced: it clears the stored firmware and LittleFS checksums and reflashes even when the panel is already up to date.This sets
_force_update = falsewhen a normalfirmware_updatecommand starts, so the flag always reflects the command that started the current update task. The assignment happens before the task is created and only when no update task is running, so there is no race with the task reading it.🤖 Generated with Claude Code
https://claude.ai/code/session_01X7aYyRjzk53Sd7gxF46E3u