Repository navigation
New AutoDetectDisplay for SH1106 and SSD1306 - #3651
Merged
ripplebiz merged 1 commit intoOct 21, 2026
Merged
Conversation
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.
This PR adds a new
AutoDetectDisplayclass which probes for anSH1106display, or falls back to using theSSD1306.The WisMesh Pocket v2 requires the
SSD1306driver, and the WisMesh Pocket v3 requires theSH1106driver.With this PR, we won't need to introduce a new variant specifically for the WisMesh Pocket v3, as it can now continue to use the existing RAK4631 variant.
Display detection is done at runtime, so both display drivers need to be compiled in. The
UIColortheme variables were complaining about redeclaration, so I've opted to make one of them weak for now. There is likely a better way to go about this, but both drivers have the same values, so for now it's not important.The
SSD1306is not auto detected, and is instead used by default if theSH1106is not detected. Some of these displays and their cheap clones don't report status correctly. So adding detection here might break some boards.We can look to add dynamic detection for the
SSD1306later if required, and potentially expand this to other display drivers.The RAK4631 variant has had all env targets updated from
SSD1306DisplaytoAutoDetectDisplay.