Draw the mode header once when initializing a non-WGN mode - #3
Closed
xmutantson wants to merge 1 commit into
Closed
xmutantson wants to merge 1 commit into
xmutantson wants to merge 1 commit into
Conversation
When the mode screen initializes with a mode other than WGN selected, the WGN branch also runs because its condition treats any uninitialized state as WGN. Both branches then print the mode and S:N lines, and since there is no screen clear or cursor reset between them the second copy lands two text rows lower, leaving a duplicated header on the panel until the next full redraw. Select the WGN branch on the mode alone. Initialization of a non-WGN mode falls through to its own branch and the header is drawn exactly once; WGN behavior is unchanged.
Author
|
Superseded by the consolidated correctness PR #5, which retains this duplicate-header cleanup and combines it with the required serial-control, state-reporting, maintenance, testing, and build-attestation changes. |
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.
Symptom: after the simulator initializes with a mode other than WGN selected (seen with MPG), the front panel shows the mode and S:N header lines twice - four header rows instead of two. The Lvl and CF lines below are unaffected. The duplicate clears on the next mode or parameter redraw, so it is cosmetic, but it recurs.
Root cause: in the mode-screen refresh in loop(), the WGN branch condition is
(intMode == 0) || (! blnInitialized)- any uninitialized state selects the WGN branch regardless of the actual mode. When initializing into MPG (or MPM/MPD), that branch prints the mode + S:N pair, and the mode-specific branch then prints the same pair again. There is no screen clear or cursor reset between the two branches, so the second copy lands two text rows lower instead of overwriting.Fix: select the WGN branch on the mode alone. Initialization of a non-WGN mode falls through to its own branch and draws the header exactly once; WGN behavior is unchanged (its own initialization path still runs identically).
One line changed; no functional/DSP behavior affected - display only.