Add M5Stack Cardputer Advanced (Cap LoRa-1262) companion firmware support#2496
Open
hdcasey wants to merge 2 commits intomeshcore-dev:mainfrom
Open
Add M5Stack Cardputer Advanced (Cap LoRa-1262) companion firmware support#2496hdcasey wants to merge 2 commits intomeshcore-dev:mainfrom
hdcasey wants to merge 2 commits intomeshcore-dev:mainfrom
Conversation
Ports the M5Stack Cardputer Advanced variant originally created by Stachugit (https://github.com/Stachugit/MeshCore-Cardputer-ADV) to the v1.15.0 codebase, making it buildable against the current upstream. All Cardputer-specific code (hardware variant, keyboard UI, display driver) is the work of Stachugit. This PR contributes it upstream so future releases include official Cardputer support without manual porting. New files (originally by Stachugit): - boards/m5stack_cardputer.json - variants/m5stack_cardputer/ - src/helpers/ui/M5CardputerDisplay.{h,cpp} - examples/companion_radio/ui-keyboard/ - examples/companion_radio/UITask.h v1.15.0 API compatibility changes: - NodePrefs: add screen_timeout_seconds - MyMesh: expose saveContacts(), saveChannels(), factoryReset() as public - MyMesh: add queueOutgoingMessageForBLE() Build target: env:M5stack_cardputer_cap_lora1262_companion RAM: 49.9% | Flash: 42.2% of 8MB partition Co-Authored-By: Stachugit <https://github.com/Stachugit> Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
7d8a7dd to
1a30cbb
Compare
- MAX_CONTACTS: 200 → 100 saves ~26 KB of internal DRAM (BSS) - OFFLINE_QUEUE_SIZE: 256 → 64 saves ~24 KB - Remove lvgl/lvgl: library was in lib_deps but never initialized anywhere; display driver uses LovyanGFX (via M5Cardputer), not LVGL - Remove CONFIG_BT_BTC_TASK_STACK_SIZE / CONFIG_BLUEDROID_PINNED_TO_CORE_* / CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_* / CONFIG_BT_GATT_MAX_SR_ATTRIBUTES: these are IDF Kconfig options and have no effect as Arduino build flags - Remove LV_CONF_INCLUDE_SIMPLE / LV_COMP_CONF_INCLUDE_SIMPLE (LVGL gone) - Remove MESH_DEBUG=1 (debug logging not appropriate for production build) Result: static RAM 163 KB → 111 KB (34%), freeing 52 KB for BLE stack and runtime heap. ESP32-S3 has 8 MB PSRAM for dynamic allocations. 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
This PR ports the M5Stack Cardputer Advanced + Cap LoRa-1262 variant originally created by @Stachugit (repo) to the v1.15.0 codebase.
All Cardputer-specific code — hardware variant, keyboard-driven UI, and LVGL display driver — is the work of Stachugit. This PR contributes it upstream so future MeshCore releases include official Cardputer ADV support without manual porting.
Hardware
HEADLESS_UI=1)Files (all originally by Stachugit)
boards/m5stack_cardputer.json— PlatformIO board definitionvariants/m5stack_cardputer/— Hardware variant (SX1262 pinout, TCXO, GPS)src/helpers/ui/M5CardputerDisplay.{h,cpp}— LVGL display driverexamples/companion_radio/ui-keyboard/— Keyboard-driven companion UIexamples/companion_radio/UITask.h— Dispatcher (HEADLESS_UI=1→ui-keyboard, elseui-new)v1.15.0 API compatibility changes
Three small changes to bridge Stachugit's UI code to the updated v1.15.0 API:
NodePrefs: addedscreen_timeout_secondsfieldMyMesh: movedsaveContacts(),saveChannels(), addedfactoryReset()to public sectionMyMesh: addedqueueOutgoingMessageForBLE()implementationBuild
RAM: 49.9% (163KB / 320KB) | Flash: 42.2% (1.34MB / 3.18MB)
Test plan
🤖 Generated with Claude Code