Repository navigation
Conversation
This branch has not been deployed
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.
ui-new compares render, alert and auto-off deadlines directly against millis(). A deadline just after the 32-bit wrap can therefore be treated as already expired before the wrap, or postponed afterwards. Its shutdown sound timeout also subtracts 2500 from the current time before comparing, which underflows during the first 2.5 seconds of uptime.
Use signed deadline differences for the short UI deadlines and unsigned elapsed time for the shutdown wait. Use the existing zero refresh marker consistently instead of the stale absolute value 100. Reserve zero for forced refresh/no active alert, including the exact-zero wrap case when scheduling a new deadline. This does not change display navigation or the configured timeout durations.
Validation:
python test/ui_new_timing/run.pypassed on Windows.python3 test/ui_new_timing/run.py --sanitizepassed under Linux ASan/UBSan.python test/ui_new_timing/run.py --source-ref 42ded8da646c7fbe9ccb8c522441f7aa87767344fails against the original timing code, as expected.pio run -e muzi_base_uno_superIO_companion_radio_blepassed against dev with RadioLib 7.8.1.git diff --checkpassed.The standalone harness compiles the actual UITask timing expressions and alert method with a 32-bit clock. Cases cover before/at/after deadlines, 0xFFFFFFFF wrap, disabled alerts, forced refresh at high uptime, exact-zero scheduling, and early-boot shutdown waiting. Other UI timers outside these paths are not changed.