Repository navigation
Pass detection preferences to M5GFX and stop assuming rejected boards - #399
Merged
Merged
Conversation
Call Display.setDetectConfig() with cfg.fallback_board before Display.init(), so a provisional detection result that differs from it is not constructed and the fallback is selected instead.
Pass a positive BOARD_ID to M5GFX as the fixed board. M5Unified selects the accepted fixed board first and keeps it when display startup fails; an explicit fallback for a different board is ignored with a warning. On ESP32-S3, the early GPIO46 hold is applied for a fixed board only when that board uses GPIO46 for power hold.
The package default is used only when nothing was detected. Restrict it to boards no detector can reject: StampPico (PICO-D4), AtomPsram (PICO-V3), StampS3/StampS3Mini, StampC3U and StampP4/StampP4X stay. ESP32 D0WDQ6 (all members have detectors) and other ESP32 packages without M5 boards return unknown instead of TimerCam/AtomLite. ESP32-C6, ESP32-H2 and ESP32-C5 return unknown instead of NanoC6/NanoH2/StampC5; StampC6 and StampC5 arrive as display candidates. Unknown boards get no board-specific power hold, LEDs or buttons; on ESP32 the generic internal I2C (G21/G22) is still started. A TimerCam whose RTC does not answer no longer holds G33; use the TimerCam board definition, cfg.fallback_board or BOARD_ID. Arduino board-definition selections are unchanged.
ainyan03
force-pushed
the
detect_positive_evidence
branch
from
October 10, 2026 23:23
c3d484c to
ecf8ac1
Compare
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
Follows the M5GFX board detection rework (requires m5stack/M5GFX#345).
cfg.fallback_boardis passed to M5GFX throughDisplay.setDetectConfig()beforeDisplay.init(), so a provisional detection result that differs from it does not build the wrong display.BOARD_IDis now an accepted, fixed firmware identity: M5GFX starts that board directly (no other families, no NVS). M5Unified selects it first and keeps it even when display startup fails. With a fixedBOARD_ID, the early ESP32-S3 GPIO46 hold is applied only when that board uses GPIO46 for power hold.Behavior changes
cfg.fallback_boardorBOARD_ID.getDisplayCount()1 → 0).Testing
Built together with the M5GFX change on the M5Unified / M5GFX CI versions (Arduino and ESP-IDF), and checked on 41 devices. This PR's CI fetches M5GFX from the develop branch, so it fails until the M5GFX change is merged.