Files
clawdmeter/firmware/platformio.ini
T
wenilandClaude Opus 4.8 578bc04248 v2 firmware: HA command channel, battery screen, dynamic Home buttons, tilt-dimmer
Watch-side features developed on the AMOLED-2.06 and shared across all boards:

- BLE command channel (…0005, notify watch→PC) via ble_send_command(); the
  watch stays "dumb" and the daemon maps commands to Home Assistant.
- Battery detail screen + protective low-voltage cutoff; power HAL gains
  battery_mv() / shutdown(), with battery_est.{h,cpp} for the time-left anchor.
- Home screen: dynamic 2-column button grid driven by the desktop config
  (RX "btns" labels); tap notifies {"cmd":"btn","i":N}.
- Dimmer screen: IMU tilt-joystick over the light's brightness / color temp.
  imu_hal_read_accel() added to the HAL (real on 2.06/2.16, no-op elsewhere);
  streams absolute {"cmd":"bri"|"ct","v":..}; daemon seeds the dial via "dim".
  Per-board tilt axis is calibrated with the DIM_CALIB overlay (off by default).

Multi-board fix: enable LV_FONT_MONTSERRAT_20/28 on the 2.16, 1.8 and C6 envs.
Shared ui.cpp uses these glyphs for the launcher tiles and back chevron, so
those three boards had failed to compile since the Phase-2 UI landed. All four
envs now build clean. README: correct the Windows pairing name to "Clawdmeter".

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-09 20:20:04 +03:00

257 lines
8.7 KiB
INI
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
[env:waveshare_amoled_216]
platform = https://github.com/pioarduino/platform-espressif32/releases/download/55.03.38-1/platform-espressif32.zip
board = esp32-s3-devkitc-1
framework = arduino
board_build.arduino.memory_type = qio_opi
upload_speed = 921600
monitor_speed = 115200
; Compile shared code + this board's per-board folder; exclude all other
; boards. New ports add a `+<boards/<name>/>` line in their own env block.
build_src_filter =
+<*>
-<boards/>
+<boards/waveshare_amoled_216/>
build_flags =
-DBOARD_AMOLED_216
-DARDUINO_USB_CDC_ON_BOOT=1
-DBOARD_HAS_PSRAM
; AXP2101 PMU
-DXPOWERS_CHIP_AXP2101
; NimBLE config — peripheral, 2 simultaneous connections so the OS can
; hold the HID link (Space key from BOOT button) while the daemon holds
; its own connection for the custom data service.
-DCONFIG_BT_NIMBLE_ROLE_BROADCASTER=1
-DCONFIG_BT_NIMBLE_ROLE_PERIPHERAL=1
-DCONFIG_BT_NIMBLE_ROLE_CENTRAL=0
-DCONFIG_BT_NIMBLE_ROLE_OBSERVER=0
-DCONFIG_BT_NIMBLE_MAX_CONNECTIONS=2
; LVGL config via build flags
-DLV_CONF_SKIP
-DLV_COLOR_DEPTH=16
-DLV_USE_LOG=0
-DLV_USE_BAR=1
-DLV_USE_LABEL=1
-DLV_USE_ARC=1
-DLV_USE_BTN=1
-DLV_USE_LINE=1
-DLV_USE_OBJ=1
-DLV_USE_IMG=1
-DLV_USE_IMAGE=1
-DLV_USE_ANIMIMG=0
-DLV_TICK_CUSTOM=1
-DLV_USE_SNAPSHOT=1
; Montserrat carries the LVGL symbol glyphs (FontAwesome subset) used for the
; v2 launcher tile icons and the back chevron. The brand Styrene/Tiempos fonts
; are Latin-only and have no symbols. Shared ui.cpp needs these on every board.
-DLV_FONT_MONTSERRAT_20=1
-DLV_FONT_MONTSERRAT_28=1
lib_deps =
moononournation/GFX Library for Arduino@^1.5.6
lewisxhe/SensorLib@^0.2.6
lewisxhe/XPowersLib@^0.2.7
lvgl/lvgl@^9.2.0
bblanchon/ArduinoJson@^7.0.0
h2zero/NimBLE-Arduino@^2.1.1
[env:waveshare_amoled_18]
platform = https://github.com/pioarduino/platform-espressif32/releases/download/55.03.38-1/platform-espressif32.zip
board = esp32-s3-devkitc-1
framework = arduino
board_build.arduino.memory_type = qio_opi
board_upload.flash_size = 16MB
board_upload.maximum_size = 16777216
board_build.partitions = default_16MB.csv
upload_speed = 921600
monitor_speed = 115200
; Compile shared code + this board's per-board folder; exclude all other
; boards. New ports add a `+<boards/<name>/>` line in their own env block.
build_src_filter =
+<*>
-<boards/>
+<boards/waveshare_amoled_18/>
build_flags =
-DBOARD_AMOLED_18
-DARDUINO_USB_CDC_ON_BOOT=1
-DBOARD_HAS_PSRAM
; AXP2101 PMU is present on the AMOLED-1.8 board too (battery is optional kit add-on)
-DXPOWERS_CHIP_AXP2101
; NimBLE config — peripheral, 2 simultaneous connections so the OS can
; hold the HID link (Space key from BOOT button) while the daemon holds
; its own connection for the custom data service.
-DCONFIG_BT_NIMBLE_ROLE_BROADCASTER=1
-DCONFIG_BT_NIMBLE_ROLE_PERIPHERAL=1
-DCONFIG_BT_NIMBLE_ROLE_CENTRAL=0
-DCONFIG_BT_NIMBLE_ROLE_OBSERVER=0
-DCONFIG_BT_NIMBLE_MAX_CONNECTIONS=2
; LVGL config via build flags
-DLV_CONF_SKIP
-DLV_COLOR_DEPTH=16
-DLV_USE_LOG=0
-DLV_USE_BAR=1
-DLV_USE_LABEL=1
-DLV_USE_ARC=1
-DLV_USE_BTN=1
-DLV_USE_LINE=1
-DLV_USE_OBJ=1
-DLV_USE_IMG=1
-DLV_USE_IMAGE=1
-DLV_USE_ANIMIMG=0
-DLV_TICK_CUSTOM=1
-DLV_USE_SNAPSHOT=1
; Montserrat carries the LVGL symbol glyphs (FontAwesome subset) used for the
; v2 launcher tile icons and the back chevron. The brand Styrene/Tiempos fonts
; are Latin-only and have no symbols. Shared ui.cpp needs these on every board.
-DLV_FONT_MONTSERRAT_20=1
-DLV_FONT_MONTSERRAT_28=1
lib_deps =
; 1.6.4+ ships Arduino_SH8601 in mainline
moononournation/GFX Library for Arduino@^1.6.4
; SensorLib still used for QMI8658 IMU on AMOLED-1.8
lewisxhe/SensorLib@^0.2.6
lewisxhe/XPowersLib@^0.2.7
lvgl/lvgl@^9.2.0
bblanchon/ArduinoJson@^7.0.0
h2zero/NimBLE-Arduino@^2.1.1
[env:waveshare_amoled_206]
; Waveshare ESP32-S3-Touch-AMOLED-2.06 watch kit. 410x502 CO5300 + FT3168
; touch + AXP2101 PMU + QMI8658 IMU. 32MB flash / 8MB OPI PSRAM. No IO
; expander (reset lines are direct GPIOs), fixed orientation.
platform = https://github.com/pioarduino/platform-espressif32/releases/download/55.03.38-1/platform-espressif32.zip
board = esp32-s3-devkitc-1
framework = arduino
board_build.arduino.memory_type = qio_opi
board_upload.flash_size = 16MB
board_upload.maximum_size = 16777216
board_build.partitions = default_16MB.csv
upload_speed = 921600
monitor_speed = 115200
build_src_filter =
+<*>
-<boards/>
+<boards/waveshare_amoled_206/>
build_flags =
-DBOARD_AMOLED_206
-DARDUINO_USB_CDC_ON_BOOT=1
-DBOARD_HAS_PSRAM
-DXPOWERS_CHIP_AXP2101
; NimBLE config — peripheral, 2 simultaneous connections so the OS can
; hold the HID link while the daemon holds the data-service connection.
-DCONFIG_BT_NIMBLE_ROLE_BROADCASTER=1
-DCONFIG_BT_NIMBLE_ROLE_PERIPHERAL=1
-DCONFIG_BT_NIMBLE_ROLE_CENTRAL=0
-DCONFIG_BT_NIMBLE_ROLE_OBSERVER=0
-DCONFIG_BT_NIMBLE_MAX_CONNECTIONS=2
; LVGL config via build flags
-DLV_CONF_SKIP
-DLV_COLOR_DEPTH=16
-DLV_USE_LOG=0
-DLV_USE_BAR=1
-DLV_USE_LABEL=1
-DLV_USE_ARC=1
-DLV_USE_BTN=1
-DLV_USE_LINE=1
-DLV_USE_OBJ=1
-DLV_USE_IMG=1
-DLV_USE_IMAGE=1
-DLV_USE_ANIMIMG=0
-DLV_TICK_CUSTOM=1
-DLV_USE_SNAPSHOT=1
; Montserrat carries the LVGL symbol glyphs (FontAwesome subset) used for the
; v2 launcher tile icons and the back chevron. The brand Styrene/Tiempos fonts
; are Latin-only and have no symbols.
-DLV_FONT_MONTSERRAT_20=1
-DLV_FONT_MONTSERRAT_28=1
lib_deps =
; 1.6.4+ ships Arduino_CO5300 in mainline
moononournation/GFX Library for Arduino@^1.6.4
lewisxhe/SensorLib@^0.2.6
lewisxhe/XPowersLib@^0.2.7
lvgl/lvgl@^9.2.0
bblanchon/ArduinoJson@^7.0.0
h2zero/NimBLE-Arduino@^2.1.1
[env:waveshare_amoled_216_c6]
; C6 sibling of the AMOLED-2.16. Same panel/touch/PMU/IMU, no PSRAM,
; single-core RISC-V, BLE 5.3 only (no classic BT). If the build fails
; resolving the C6 board, bump pioarduino to a newer 55.x release that
; ships esp32-c6-devkitc-1.
platform = https://github.com/pioarduino/platform-espressif32/releases/download/55.03.38-1/platform-espressif32.zip
board = esp32-c6-devkitc-1
framework = arduino
upload_speed = 921600
monitor_speed = 115200
; Waveshare's C6-AMOLED-2.16 ships with 16 MB flash. The default 1.25 MB
; app partition can't hold this firmware (~1.43 MB) — switch to the
; 16 MB layout that gives the app ~6.5 MB, matching the AMOLED-1.8 env.
board_upload.flash_size = 16MB
board_upload.maximum_size = 16777216
board_build.partitions = default_16MB.csv
build_src_filter =
+<*>
-<boards/>
+<boards/waveshare_amoled_216_c6/>
build_flags =
-DBOARD_AMOLED_216_C6
; C6 has only USB-Serial-JTAG (HWCDC), no native USB-OTG. The Arduino
; core maps Serial → HWCDCSerial only when BOTH flags below are set;
; CDC_ON_BOOT alone selects USBSerial (TinyUSB) which doesn't exist on
; C6 and breaks the build. Without either flag, Serial routes to UART0
; on physical pins and nothing reaches the USB host.
-DARDUINO_USB_CDC_ON_BOOT=1
-DARDUINO_USB_MODE=1
; No -DBOARD_HAS_PSRAM — C6 has no external PSRAM. Shared code
; (main.cpp, splash.cpp) gates on this to pick MALLOC_CAP_INTERNAL
; and shrink LVGL buffers + splash canvas accordingly.
-DXPOWERS_CHIP_AXP2101
-DCONFIG_BT_NIMBLE_ROLE_BROADCASTER=1
-DCONFIG_BT_NIMBLE_ROLE_PERIPHERAL=1
-DCONFIG_BT_NIMBLE_ROLE_CENTRAL=0
-DCONFIG_BT_NIMBLE_ROLE_OBSERVER=0
-DCONFIG_BT_NIMBLE_MAX_CONNECTIONS=2
-DLV_CONF_SKIP
-DLV_COLOR_DEPTH=16
-DLV_USE_LOG=0
-DLV_USE_BAR=1
-DLV_USE_LABEL=1
-DLV_USE_ARC=1
-DLV_USE_BTN=1
-DLV_USE_LINE=1
-DLV_USE_OBJ=1
-DLV_USE_IMG=1
-DLV_USE_IMAGE=1
-DLV_USE_ANIMIMG=0
-DLV_TICK_CUSTOM=1
; Screenshot capture needs a full-frame RGB565 buffer (~460 KB on
; 480×480) which doesn't fit in C6 internal SRAM. send_screenshot
; prints SCREENSHOT_UNSUPPORTED on this board.
-DLV_USE_SNAPSHOT=0
; Montserrat carries the LVGL symbol glyphs (FontAwesome subset) used for the
; v2 launcher tile icons and the back chevron. The brand Styrene/Tiempos fonts
; are Latin-only and have no symbols. Shared ui.cpp needs these on every board.
-DLV_FONT_MONTSERRAT_20=1
-DLV_FONT_MONTSERRAT_28=1
lib_deps =
; this board uses the CO5300 (same controller as the S3 2.16); Arduino_CO5300
moononournation/GFX Library for Arduino@^1.6.4
lewisxhe/SensorLib@^0.2.6
lewisxhe/XPowersLib@^0.2.7
lvgl/lvgl@^9.2.0
bblanchon/ArduinoJson@^7.0.0
h2zero/NimBLE-Arduino@^2.1.1