Repository navigation
Fix ThinkNode M1 e-ink screen blanking after display auto-off - #3649
Closed
plainsbuilder wants to merge 1 commit into
Closed
plainsbuilder wants to merge 1 commit into
plainsbuilder wants to merge 1 commit into
Conversation
Collaborator
|
Thank for this PR, |
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
Fixes the ThinkNode M1 screen going blank shortly after boot on 1.18.0 (#3612, #3601).
Since 1.18.0,
GxEPDDisplay::turnOff()wipes the panel to white and hibernates it. The M5, M8 and T-Echo build withAUTO_OFF_MILLIS=0, so on those boards it only runs when the user asks for it. The M1 still inherits the 15 s default from UITask, so its screen gets wiped 15 s after every boot. Since the random BLE pin is only shown on the home screen, a new phone can't pair, and waking the screen with the button often doesn't redraw until a second press (the status bar goes missing).This adds an opt-in
EINK_KEEP_IMAGE_WHEN_OFFflag. When it is set,turnOff()only switches the backlight off and stops refreshing, leaving the last frame on the panel, which is how the M1 behaved on 1.17.1. It is enabled for the two M1 companion envs only, so the other e-ink boards keep the new behaviour.I didn't go with
AUTO_OFF_MILLIS=0for the M1 because it has noBACKLIGHT_BTN. Its backlight is switched fromturnOn()/turnOff(), so with auto-off disabled the backlight would never come on from a button press. This is meant to get M1 users working again while the common e-ink behaviour discussed in #3612 is worked out, happy to rework it if that goes a different way.Testing
Verified on a ThinkNode M1 with
ThinkNode_M1_companion_radio_ble:Also flashed stock 1.18.0 on an original T-Echo for comparison. It is not affected (
AUTO_OFF_MILLIS=0, soturnOff()is never called on a timer) and was stable, which is why the change is scoped to the M1.All five M1 envs build clean against current dev, plus
LilyGo_T-Echo_companion_radio_ble,ThinkNode_M5_companion_radio_bleandThinkNode_M8_companion_radio_bleas a regression check for the sharedGxEPDDisplaychange.