feat: Glass2 secondary OLED support for Cardputer ADV - #12
Open
Swissola wants to merge 1 commit into
Open
Conversation
Adds optional Glass2 (1.51" SSD1309 128x64 OLED) on the Cardputer ADV Grove port (SDA=G2, SCL=G1). Runtime-detected — no Glass2 connected is a silent no-op, so the build works on both ADV and standard Cardputer. - src/glass2.h: driver wrapper (glass2Init/Show/Clear) via M5UnitGLASS2 - CardputerView: initialise() calls glass2Init(); topBar() mirrors the active menu context to line 1; scan callbacks show brand+remote/command on line 1+2; displayScanOver and displayLoading push status strings. No extra lib_deps required — M5UnitGLASS2 is already a transitive dependency through M5Cardputer → M5Unified → M5GFX. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
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
Adds optional support for the M5Stack Glass2 transparent OLED (1.51", 128×64, SSD1309) connected to the Cardputer ADV Grove port (SDA=G2, SCL=G1).
glass2Init()returnsfalseif no Glass2 is connected; all subsequent calls become no-ops. The firmware works unchanged on standard Cardputer hardware.M5UnitGLASS2is already a transitive dependency viaM5Cardputer → M5Unified → M5GFX.What's shown on Glass2
SCAN DONELOADING...Files changed
src/glass2.h— new; driver wrapper (init/show/clear)src/Views/CardputerView.h— include glass2.h, add_g2_contextstatic membersrc/Views/CardputerView.cpp— glass2Init in initialise(); context + show calls in topBar(), displayScanRemote(), displayScanCommand(), displayScanOver(), displayLoading()Hardware tested on