Skip to content

begin(): external displays follow cfg.clear_display - #416

Merged
lovyan03 merged 1 commit into
m5stack:developfrom
ainyan03:keep_display_on_init
Oct 23, 2026
Merged

lovyan03 merged 1 commit into
m5stack:developfrom
ainyan03:keep_display_on_init

Conversation

@ainyan03

Copy link
Copy Markdown
Contributor

Refs m5stack/M5GFX#370.

Problem

begin() initialized the external displays (Module Display, Unit OLED / MiniOLED / GLASS / GLASS2 / LCD, Module RCA, Unit RCA) with init() regardless of cfg.clear_display, so they were reset and cleared even when the sketch asked to keep the display. The internal display and Unit PoE-P4 (display out) already followed the flag.

Change

The eight external displays are initialized the same way as the internal one: init() when cfg.clear_display is true, init_without_reset(false) otherwise. The default (clear_display = true) is unchanged.

The panel side of #370 (EPD and LED panels wiping the image during init, and the host buffer of the OLED / GLASS units being cleared in init() so that this path does not send an uninitialized buffer) is m5stack/M5GFX#375; this change needs that one. Atom Display still uses init_without_reset() unconditionally (it does not clear even with clear_display = true); unchanged here.

Test

  • Build: ESP32 / S3 / C3 / C5 / C6 / C61 / H2 / P4 with Arduino core 2.x / 3.x and ESP-IDF 5.1 to 6.1. CI on the fork passed.
  • No external display was available for a hardware check; the change mirrors the existing Unit PoE-P4 branch.

Module Display, Unit OLED / MiniOLED / GLASS / GLASS2 / LCD, Module RCA
and Unit RCA were initialized with init() regardless of cfg.clear_display,
so they were reset and cleared even when the sketch asked to keep the
display (m5stack/M5GFX#370). They now follow the flag like the internal
display and Unit PoE-P4: init() when it is true, init_without_reset(false)
otherwise. The default is unchanged.
@lovyan03
lovyan03 merged commit 69e2b6d into m5stack:develop Oct 23, 2026
30 checks passed
@ainyan03
ainyan03 deleted the keep_display_on_init branch October 23, 2026 05:42
@ainyan03 ainyan03 mentioned this pull request Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants