(0.15.x) wait for LEDs output to finish before OS calls that potentially suspend interrupts#5435
Open
softhack007 wants to merge 21 commits into0_15_xfrom
Open
(0.15.x) wait for LEDs output to finish before OS calls that potentially suspend interrupts#5435softhack007 wants to merge 21 commits into0_15_xfrom
softhack007 wants to merge 21 commits into0_15_xfrom
Conversation
f.close() writes buffered data to flash, and shortly suspends all other interrupts during writing. This can lead to LEDs flickering, especially on 8266 or -C3 that don't have the RMTHI driver.
reduces code duplication
two more places where flickering can be reduced
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
only in async paths (webserver context)
to prevent repeated attempts to close a closed file handle.
softhack007
commented
Mar 22, 2026
I overlooked that this method already existed -> merged both definitions.
willmmiles
reviewed
Mar 22, 2026
if strip.suspend() was received in the middle of effect rendering, the final strip.show() is skipped => trigger request should not reset if suspended.
* remove statements for 8266 - 8266 UART output is not affected by paused interrupts * add statement for risc-v boards
avoids random LED flashing during OTA This is only partly related to the PR scope, but its a good idea any way so I added it here
* only resume if suspended by OTA * remove resume() from unrelated path
softhack007
commented
Mar 23, 2026
suspend/resume is already handled internally in ota_update.cpp
softhack007
commented
Mar 23, 2026
* presets.json sending via webserver * cfg.json copy / compare / restore
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.
Add a short wait time before calling file.close() and ESP.getFreeHeap(), to prevent LED glitches caused by interrupt stalls.
potential fix for #5427
Summary by CodeRabbit