Files
MeshCore/variants/sensecap_indicator-espnow/platformio.ini
T
mikecarper 8c7f4df1cd feat(radio): enable fast profile switching across direct SX1262 boards
Add acknowledged SetFs and packet-cache shortcuts for SX1262, extend the LR1110 FS-mode fast path with buffered SPI, and keep the expander-backed Indicator on its previous path. Include HIL fixtures, validation notes, and regression tests.
2026-09-21 22:57:22 -07:00

201 lines
8.2 KiB
INI

[SenseCapIndicator-ESPNow]
extends = esp32_base
board = esp32-s3-devkitc-1
board_build.arduino.memory_type = qio_opi
board_build.flash_mode = qio
board_build.psram_type = opi
board_upload.flash_size = 8MB
board_upload.maximum_size = 8388608
board_build.partitions = default.csv
build_flags =
${esp32_base.build_flags}
-D MESH_PRIMARY_ESPNOW=1
-D PIN_BOARD_SDA=39
-D PIN_BOARD_SCL=40
-D BOARD_HAS_PSRAM
-D DISPLAY_CLASS=SCIndicatorDisplay
-D DISPLAY_LINES=21
-D LINE_LENGTH=53
-D DISABLE_WIFI_OTA=1
-D IO_EXPANDER=0x40
-D IO_EXPANDER_IRQ=42
-D DISPLAY_ROTATION=1
; Render the established 160x160 UI into a 320x320 internal canvas, then
; scale it 1.5x onto the 480x480 panel. The 4-bit canvas stays out of PSRAM
; to protect RGB scanout, but consumes 51,200 instead of 115,200 bytes of
; scarce internal RAM. Full Indicator overlays start native and retain this
; compact profile only for ESP-NOW + BLE.
-D UI_ZOOM=1.5f
-D UI_COORD_SCALE=2
-D UI_BUFFER_COLOR_DEPTH=4
; Keep instructions/network status above a dedicated high-contrast BLE PIN
; block instead of painting the PIN over the home-page instruction.
-D UI_DEDICATED_PAIRING_BLOCK=1
; Add a seventh home page with the latest retained message per channel.
-D UI_MESSAGES_HOME_PAGE=1
; Use fractional smooth-font scaling for the full inbox's Message/age header
; and channel selector, reclaiming space without shrinking touch targets.
-D UI_COMPACT_MESSAGE_STATUS=1
; One reader navigation bar handles buttons and touch. Keep the selected
; channel in the header instead of duplicating controls in a bottom bar.
-D UI_BUTTON_READER_HINT=1
-D UI_READER_TOUCH_BAR=1
-D UI_MESSAGE_CHANNEL_FOOTER=0
-D AUTO_OFF_MILLIS=300000UL
-D USB_MESSAGE_PREVIEW_MILLIS=300000UL
; Retain every byte of a maximum-length 160-byte chat message. The generic
; 78-byte preview is intended for small displays and left most of this panel
; unused while silently truncating longer text.
-D UI_MSG_PREVIEW_SIZE=161
-D UI_RADIO_REFRESH_MILLIS=1000UL
; Use the configured five-minute timeout literally on this USB-powered LCD.
-D UI_USB_AUTO_OFF_MULTIPLIER=1UL
; GPIO 38 cannot wake the ESP32-S3 from the no-wakeup hibernate path.
; Keep this USB-powered target on and use the display timeout instead.
-D UI_NO_HIBERNATE
-D UI_RECENT_LIST_SIZE=9
-D UI_SENSORS_PAGE=1
-D PIN_USER_BTN=38
; Allow a deliberate three/four-click cadence on the physical top button.
; Don't let a synchronous RGB redraw swallow edges between those clicks.
-D MOMENTARY_BUTTON_MULTI_CLICK_MS=450
-D UI_DEFER_RENDER_DURING_BUTTON_GESTURE=1
-D HAS_TOUCH
-D TOUCH_REVERSE_SWIPE
-D TOUCH_REVERSE_VERTICAL_SWIPE=0
; The panel's physical X axis is mirrored. Swipe direction is corrected
; separately; stationary taps also need visual left/right hit testing.
-D TOUCH_MIRROR_TAP_X
-D TOUCH_SEPARATE_VERTICAL_SWIPES
; The outer 15% remains available for Previous/Next taps; the middle 70%
; is Select. This makes the primary tap target much easier on a 480px panel.
-D TOUCH_CENTER_ZONE_PERCENT=70
-I variants/sensecap_indicator-espnow
build_src_filter = ${esp32_base.build_src_filter}
+<../variants/sensecap_indicator-espnow/*.cpp>
+<helpers/esp32/ESPNOWRadio.cpp>
+<helpers/ui/LGFXDisplay.cpp>
+<helpers/sensors/*>
lib_deps=${esp32_base.lib_deps}
adafruit/Adafruit BusIO @ ^1.17.2
lovyan03/LovyanGFX @ ^1.2.7
; D1L and D1Pro route the onboard SX1262's control pins through the TCA9535
; expander. Keep the original ESP-NOW target above for Indicators without the
; LoRa hardware, and use this target for the LoRa-capable models.
[SenseCapIndicator-LoRa]
extends = SenseCapIndicator-ESPNow
build_flags =
${SenseCapIndicator-ESPNow.build_flags}
-UMESH_PRIMARY_ESPNOW
-D SENSECAP_INDICATOR_LORA
-D USE_SX1262
-D MC_SX1262_FAST_PROFILE_SWITCH=1
; Radio control and BUSY/IRQ use a shared I2C expander. Keep the previously
; enabled owned-RX path, but not the direct-I/O SetFs/packet shortcuts.
-D MC_SX1262_FAST_FS=0
-D MC_SX1262_FAST_PACKET_CACHE=0
-D MC_SX1262_SPI_HZ=8000000
-D RADIO_CLASS=CustomSX1262
-D WRAPPER_CLASS=IndicatorSX1262Wrapper
-D P_LORA_SCLK=41
-D P_LORA_MISO=47
-D P_LORA_MOSI=48
-D P_LORA_NSS=64
-D P_LORA_RESET=65
-D P_LORA_BUSY=66
-D P_LORA_DIO_1=67
-D SX126X_DIO2_AS_RF_SWITCH=true
-D SX126X_DIO3_TCXO_VOLTAGE=2.4
-D SX126X_CURRENT_LIMIT=140
-D SX126X_RX_BOOSTED_GAIN=1
-D LORA_TX_POWER=22
-D MAX_LORA_TX_POWER=22
-D RECOVERABLE_EXTERNAL_RADIO
build_src_filter = ${SenseCapIndicator-ESPNow.build_src_filter}
-<helpers/esp32/ESPNOWRadio.cpp>
lib_deps = ${SenseCapIndicator-ESPNow.lib_deps}
[env:SenseCapIndicator-ESPNow_comp_radio_usb]
extends = SenseCapIndicator-ESPNow
build_flags =
${SenseCapIndicator-ESPNow.build_flags}
-I examples/companion_radio/ui-new
-D MAX_CONTACTS=350
-D MAX_GROUP_CHANNELS=40
-D ENABLE_USB_INTERFACE
; NOTE: DO NOT ENABLE --> -D MESH_PACKET_LOGGING=1
; NOTE: DO NOT ENABLE --> -D MESH_DEBUG=1
; NOTE: DO NOT ENABLE --> -D ESPNOW_DEBUG_LOGGING=1
build_src_filter = ${SenseCapIndicator-ESPNow.build_src_filter}
+<../examples/companion_radio/ui-new/*.cpp>
+<../examples/companion_radio/*.cpp>
lib_deps =
${SenseCapIndicator-ESPNow.lib_deps}
densaugeo/base64 @ ~1.4.0
[env:SenseCapIndicator-LoRa_comp_radio_usb]
extends = SenseCapIndicator-LoRa
build_flags =
${SenseCapIndicator-LoRa.build_flags}
-I examples/companion_radio/ui-new
-D MAX_CONTACTS=350
-D MAX_GROUP_CHANNELS=40
-D ENABLE_USB_INTERFACE
; NOTE: DO NOT ENABLE --> -D MESH_PACKET_LOGGING=1
; NOTE: DO NOT ENABLE --> -D MESH_DEBUG=1
build_src_filter = ${SenseCapIndicator-LoRa.build_src_filter}
+<../examples/companion_radio/ui-new/*.cpp>
+<../examples/companion_radio/*.cpp>
lib_deps =
${SenseCapIndicator-LoRa.lib_deps}
densaugeo/base64 @ ~1.4.0
; Keep the recoverable USB Companion link while also exposing the same framed
; protocol over WiFi TCP port 5000. Placeholder credentials deliberately start
; WebConfig in setup-AP mode on a fresh device; saved NVS credentials win on
; later boots.
[env:SenseCapIndicator-LoRa_comp_radio_usb_wifi]
extends = env:SenseCapIndicator-LoRa_comp_radio_usb
; Two 2.5 MiB OTA slots fit the combined display/WiFi image. The custom map
; deliberately leaves the existing NVS and SPIFFS offsets unchanged so moving
; an already-configured USB Indicator to this build preserves its identity,
; channels, radio settings, and WiFi credentials.
board_build.partitions = variants/sensecap_indicator-espnow/dual_ota_2560k_preserve_spiffs.csv
; The Wi-Fi font recovery client gets fresh NTP time before opening TLS to the
; official GitHub Git Blob REST API. It verifies the pinned size and SHA-256;
; the RP2040 independently verifies CRC32. A per-client Sectigo E46 PEM avoids
; process-global bundle state and expires 2046-03-21. GitHub's unauthenticated
; limit is 60 requests/hour/source IP, so a current font never starts a fetch.
; build.sh also enables this path for both Indicator Full layouts.
build_flags =
${env:SenseCapIndicator-LoRa_comp_radio_usb.build_flags}
-D INDICATOR_WIFI_FONT_RECOVERY=1
-D WIFI_DEBUG_LOGGING=1
-D WIFI_SSID='"myssid"'
-D WIFI_PWD='"mypwd"'
-D DEFAULT_WIFI_POWER_SAVE_MODE=0
; If neither the USB nor WiFi Companion link supplies authoritative time,
; begin evaluating independently sourced LoRa timestamps after two minutes.
-D COMPANION_MESH_CLOCK_SYNC=1
-D MESH_CLOCK_SYNC_STARTUP_DELAY_MILLIS=120000ULL
-D MESH_CLOCK_SYNC_REQUIRED_SAMPLES_DEFAULT=3
build_src_filter =
${env:SenseCapIndicator-LoRa_comp_radio_usb.build_src_filter}
+<helpers/esp32/*.cpp>
lib_deps =
${env:SenseCapIndicator-LoRa_comp_radio_usb.lib_deps}
; Later Indicator LoRa boards can carry an ESP32-S3-WROOM-1-N16R2 instead of
; the original 8 MiB flash / 8 MiB octal-PSRAM arrangement. Keep this as an
; explicit image: PSRAM line mode is selected before application startup and
; cannot be safely auto-detected by one binary.
[env:SenseCapIndicator-LoRa-N16R2_comp_radio_usb_wifi]
extends = env:SenseCapIndicator-LoRa_comp_radio_usb_wifi
board_build.arduino.memory_type = qio_qspi
board_build.flash_mode = qio
board_build.psram_type = qspi
board_upload.flash_size = 16MB
board_upload.maximum_size = 16777216
board_build.partitions = variants/sensecap_indicator-espnow/dual_ota_6400k_preserve_spiffs.csv