Apply upstream PR #2197: Add M5Stack CoreInk support and e‑ink optimizations#30
Apply upstream PR #2197: Add M5Stack CoreInk support and e‑ink optimizations#30
Conversation
Co-authored-by: KuriGohan-Kamehameha <16231581+KuriGohan-Kamehameha@users.noreply.github.com> (cherry picked from commit 10dffc8)
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8515dd1272
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (isScreenOff) { | ||
| isScreenOff = false; | ||
| dimmer = false; | ||
| getBrightness(); | ||
| vTaskDelay(pdMS_TO_TICKS(200)); | ||
| return true; | ||
| } else if (dimmer) { | ||
| dimmer = false; | ||
| getBrightness(); | ||
| vTaskDelay(pdMS_TO_TICKS(200)); | ||
| return true; |
There was a problem hiding this comment.
Restore brightness when waking a dimmed/off LCD
On non-eink boards, this wake path now only clears isScreenOff and returns, but no longer resets dimmer or reapplies configured brightness. After power-save fade-out, turnOffDisplay() has already set brightness to 0, so the first keypress is consumed by wakeUpScreen() and the display remains dark instead of waking visibly, which breaks normal interaction after idle timeout.
Useful? React with 👍 / 👎.
| priColor = 0xFFFF; | ||
| secColor = 0xFFFF; | ||
| bgColor = 0x0000; | ||
| colorInverted = 0; |
There was a problem hiding this comment.
Preserve e-ink invert setting loaded from config
This unconditionally forces colorInverted back to 0 during validation on HAS_EINK, overriding the value that was just read from setting["colorInverted"]. As a result, users can toggle B/W inversion in the menu and save it, but every reboot resets runtime behavior to non-inverted (e.g. begin_tft() will always apply normal polarity), so the setting is not persistent.
Useful? React with 👍 / 👎.
Motivation
workbranch so the diff and review can be performed locally.Description
boards/m5stack-coreink/includinginterface.cpp,m5stack-coreink.ini,pins_arduino.handboards/_boards_json/m5stack-coreink.jsonto enable building for the CoreInk device.interface.cppand adjusted settings hooks such as_setBrightnessandInputHandler.lib/HAL/display/m5gfx.*,include/tftLogger.h, and related display functions (color/uint16 handling, pushImage fallback, text/draw helpers).README.mdand added aboards/m5stack-coreink/readme.mdwith build instructions and notes.Testing
git fetch https://github.com/BruceDevices/firmware pull/2197/head:pr2197and inspected the PR ref; the fetch completed successfully. (succeeded)94c6863a,9fa00e65) onto branchworkand resolved amodify/deleteconflict forboards/m5stack-coreink/readme.mdbefore continuing the cherry‑pick; the cherry‑pick and conflict resolution were completed and committed. (succeeded)git status --short --branch,git log --oneline -n 5andgit show --stat --oneline -n 2to confirm the new commits and file changes are present; those checks succeeded. (succeeded)boards/*,README.md,lib/HAL/display/*,include/tftLogger.h, etc.) usingnl/file listing to confirm content was applied; inspection commands completed. (succeeded)No build or runtime unit tests were executed in this session; only VCS operations and file inspections were run to apply and verify the upstream changes.
Codex Task