Files
MeshCore-Solo/variants/wio-tracker-l1-eink/platformio.ini

97 lines
2.9 KiB
INI
Raw Normal View History

2025-09-20 21:45:13 +02:00
[WioTrackerL1Eink]
extends = nrf52_base
board = seeed-wio-tracker-l1
board_build.ldscript = boards/nrf52840_s140_v7_extrafs.ld
board_upload.maximum_size = 708608
2025-09-20 21:45:13 +02:00
build_flags = ${nrf52_base.build_flags}
${sensor_base.build_flags}
2025-09-20 21:45:13 +02:00
-I lib/nrf52/s140_nrf52_7.3.0_API/include
-I lib/nrf52/s140_nrf52_7.3.0_API/include/nrf52
-I variants/wio-tracker-l1
-I examples/companion_radio/ui-new
feat(screenshot): extend e-ink screenshot support via GxEPD2 patch - Add lib/GxEPD2-patch/src/GxEPD2_BW.h: local patched copy of GxEPD2_BW.h that exposes getBuffer()/getBufferSize() under ENABLE_SCREENSHOT guard. Include guard (_GxEPD2_BW_H_) prevents double-inclusion of the installed library version. - GxEPDDisplay.h: use patched header via relative include when ENABLE_SCREENSHOT so the patch takes precedence over the installed lib (PlatformIO adds library paths before -I build_flags). - DisplayDriver.h: add virtual getBuffer()/getBufferSize()/getDisplayType() defaults (nullptr/0/0) under ENABLE_SCREENSHOT. - SH1106Display.h / SSD1306Display.h / GxEPDDisplay.h: add concrete overrides; getDisplayType() returns 0 (OLED) or 1 (e-ink). - MyMesh.cpp/h: replace fragile C-cast with virtual dispatch in handleScreenshotRequest(); extend 5-byte header to 6 bytes by appending display_type so the host tool can decode the correct pixel layout. - tools/screenshot.py: parse 6-byte header; add eink_buffer_to_image() that decodes the row-major MSB-first GxEPD2 buffer with DISPLAY_ROTATION=1 (phys_x = 127-ly, phys_y = lx); dispatch on display_type. - variants/wio-tracker-l1-eink/platformio.ini: add [env:WioTrackerL1Eink_companion_dual_dev] with ENABLE_SCREENSHOT. - variants/wio-tracker-l1/platformio.ini: unchanged (OLED env already exists). Builds verified: WioTrackerL1Eink_companion_dual_dev SUCCESS, WioTrackerL1Eink_companion_radio_ble SUCCESS (unaffected). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 01:03:47 +02:00
-I lib/GxEPD2-patch/src
2025-09-20 21:45:13 +02:00
-D WIO_TRACKER_L1
-D WIO_TRACKER_L1_EINK
-D USE_SX1262
2025-09-20 21:45:13 +02:00
-D RADIO_CLASS=CustomSX1262
-D WRAPPER_CLASS=CustomSX1262Wrapper
-D LORA_TX_POWER=22
-D SX126X_CURRENT_LIMIT=140
-D SX126X_RX_BOOSTED_GAIN=1
-D EINK_DISPLAY_MODEL=GxEPD2_213_B74
-D DISPLAY_ROTATION=1
-D GPS_BAUD_RATE=9600
-D ENV_PIN_SDA=PIN_WIRE1_SDA
-D ENV_PIN_SCL=PIN_WIRE1_SCL
-D DISABLE_DIAGNOSTIC_OUTPUT
-D AUTO_OFF_MILLIS=0
2025-09-20 21:45:13 +02:00
-D MAX_CONTACTS=350
-D MAX_GROUP_CHANNELS=40
-D OFFLINE_QUEUE_SIZE=256
-D DISPLAY_CLASS=GxEPDDisplay
2025-10-18 13:10:17 +02:00
-D UI_HAS_JOYSTICK=1
-D UI_HAS_JOYSTICK_UPDOWN=1
2025-09-20 21:45:13 +02:00
-D PIN_BUZZER=12
-D QSPIFLASH=1
-D FIRMWARE_SOLO_BUILD=1
-D MESHCORE_VERSION='"1.16"'
2025-09-20 21:45:13 +02:00
-D UI_SENSORS_PAGE=1
-D BLE_PIN_CODE=123456
build_src_filter = ${nrf52_base.build_src_filter}
+<WioTrackerL1Board.cpp>
+<../variants/wio-tracker-l1>
+<helpers/ui/GxEPDDisplay.cpp>
2025-09-20 21:45:13 +02:00
+<helpers/ui/MomentaryButton.cpp>
+<helpers/ui/buzzer.cpp>
+<helpers/nrf52/SerialBLEInterface.cpp>
+<helpers/sensors>
2025-09-20 21:45:13 +02:00
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
lib_deps = ${nrf52_base.lib_deps}
${sensor_base.lib_deps}
adafruit/Adafruit GFX Library @ ^1.12.1
2025-09-20 21:45:13 +02:00
adafruit/RTClib @ ^2.1.3
zinggjm/GxEPD2 @ 1.6.2
bakercp/CRC32 @ ^2.0.0
2025-09-20 21:45:13 +02:00
densaugeo/base64 @ ~1.4.0
end2endzone/NonBlockingRTTTL@^1.3.0
; BLE only
[env:WioTrackerL1Eink_companion_radio_ble]
extends = WioTrackerL1Eink
extra_scripts = post:create-uf2.py
2025-09-20 21:45:13 +02:00
debug_tool=stlink
; Dual BLE+USB
[env:WioTrackerL1Eink_companion_dual]
extends = WioTrackerL1Eink
build_flags = ${WioTrackerL1Eink.build_flags}
-D DUAL_SERIAL=1
extra_scripts = post:create-uf2.py
feat(screenshot): extend e-ink screenshot support via GxEPD2 patch - Add lib/GxEPD2-patch/src/GxEPD2_BW.h: local patched copy of GxEPD2_BW.h that exposes getBuffer()/getBufferSize() under ENABLE_SCREENSHOT guard. Include guard (_GxEPD2_BW_H_) prevents double-inclusion of the installed library version. - GxEPDDisplay.h: use patched header via relative include when ENABLE_SCREENSHOT so the patch takes precedence over the installed lib (PlatformIO adds library paths before -I build_flags). - DisplayDriver.h: add virtual getBuffer()/getBufferSize()/getDisplayType() defaults (nullptr/0/0) under ENABLE_SCREENSHOT. - SH1106Display.h / SSD1306Display.h / GxEPDDisplay.h: add concrete overrides; getDisplayType() returns 0 (OLED) or 1 (e-ink). - MyMesh.cpp/h: replace fragile C-cast with virtual dispatch in handleScreenshotRequest(); extend 5-byte header to 6 bytes by appending display_type so the host tool can decode the correct pixel layout. - tools/screenshot.py: parse 6-byte header; add eink_buffer_to_image() that decodes the row-major MSB-first GxEPD2 buffer with DISPLAY_ROTATION=1 (phys_x = 127-ly, phys_y = lx); dispatch on display_type. - variants/wio-tracker-l1-eink/platformio.ini: add [env:WioTrackerL1Eink_companion_dual_dev] with ENABLE_SCREENSHOT. - variants/wio-tracker-l1/platformio.ini: unchanged (OLED env already exists). Builds verified: WioTrackerL1Eink_companion_dual_dev SUCCESS, WioTrackerL1Eink_companion_radio_ble SUCCESS (unaffected). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 01:03:47 +02:00
; Dual BLE+USB with added Solo
[env:WioTrackerL1Eink_companion_solo_dual]
extends = WioTrackerL1Eink
feat(companion): live location sharing, Locator geofencing, trail auto-pause Squash merge of feat/location-beacon-alerts-autopause (v1.21). Features: - Live Location Sharing — broadcast position as movement-gated [LOC] messages to a channel or contact; live shares show as map pins with distance/bearing in Nearby Nodes and a status-bar indicator. [LOC] is parsed in DMs, channel messages and room messages; DM shares name the sender. - Locator (geofence) — arm a geofence around a saved waypoint or a person (live [LOC] or last-known position), alert on arrive/leave or near/far, with an optional homing beeper (gated to arrive/both modes). Arm from Tools > Locator, Nearby Nodes, or Waypoints; target picker lists favourites first, clearable via a "None" entry. Active target is drawn as a flag on the map. - One active target shared across Locator / Navigate / Map via a single resolver (resolvePersonPos / activeTargetPos) that prefers a live [LOC] share over the last-advertised GPS fix. - Follow live contacts — Navigate to a live-sharing contact follows them as they move and adds an ETA line; quick-share your own position from the Map. - Map & status-bar upgrades — home mini-map gets a north marker, scale tick, and a connected trail line (was disconnected dots); status line shows tracked-node count, an arrow + distance to the active Locator/Nav target (falling back to the nearest live-tracked contact); GPS fix icon in the top status bar, shown only on GPS boards with GPS enabled. - Trail auto-pause — recording freezes on stops (banking elapsed time, breaking the map line across the idle gap) and resumes on movement without ending the session. - Streaming trail simplification — GPS points are simplified in-stream via a fixed-corridor (Reumann-Witkam) pass tuned for fidelity: straight runs collapse to their endpoints, curves stay bounded to the Min-dist tolerance, so the 512-point buffer covers a far longer route than a flat point budget would suggest. - Collapsible Tools (Location / Comms / System sections, fold-in-place like Settings) and page-indicator icons on the home carousel. - Waypoint coordinate editor — add a waypoint by scroll-editing lat/lon digit by digit. Fixes: - Critical: low-heap hang and contact loss on RAM-tight builds. Halved message-history scrollback rings (recovering ~14 KB free heap) and made contacts/channels/prefs persistence atomic (temp file + rename), so an interrupted save can no longer corrupt or wipe the store. - Serial.write() bounded so a stalled USB host can't hang the device. - Nearby Nodes: live [LOC] senders respect the type filter, sort by shared position, and the list refreshes so live shares bubble up. - Map: live contacts are labelled before waypoints. - GPS status icon hidden when GPS is off in Settings. - Splash screen no longer truncates a pre-release tag's own dash (e.g. v1.21-rc1) when stripping the build's commit-hash suffix. - Null-guarded the Locator target picker; clamped loc-share channel index on load. Under the hood: - -Os size optimisation on the e-ink and GAT562 30S solo envs. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 19:04:21 +02:00
; Optimise for size, not speed: the nRF52 Arduino core defaults to -Ofast
; (≈ -O3 + -ffast-math), which bloats flash by ~200 KB on this feature-rich
; solo build. -Os keeps every feature, fits comfortably, and is actually safer
; for float (no fast-math reassociation). Speed is irrelevant for the UI/mesh.
build_unflags = -Ofast
build_flags = ${WioTrackerL1Eink.build_flags}
-D DUAL_SERIAL=1
-D ENABLE_SCREENSHOT
feat(companion): live location sharing, Locator geofencing, trail auto-pause Squash merge of feat/location-beacon-alerts-autopause (v1.21). Features: - Live Location Sharing — broadcast position as movement-gated [LOC] messages to a channel or contact; live shares show as map pins with distance/bearing in Nearby Nodes and a status-bar indicator. [LOC] is parsed in DMs, channel messages and room messages; DM shares name the sender. - Locator (geofence) — arm a geofence around a saved waypoint or a person (live [LOC] or last-known position), alert on arrive/leave or near/far, with an optional homing beeper (gated to arrive/both modes). Arm from Tools > Locator, Nearby Nodes, or Waypoints; target picker lists favourites first, clearable via a "None" entry. Active target is drawn as a flag on the map. - One active target shared across Locator / Navigate / Map via a single resolver (resolvePersonPos / activeTargetPos) that prefers a live [LOC] share over the last-advertised GPS fix. - Follow live contacts — Navigate to a live-sharing contact follows them as they move and adds an ETA line; quick-share your own position from the Map. - Map & status-bar upgrades — home mini-map gets a north marker, scale tick, and a connected trail line (was disconnected dots); status line shows tracked-node count, an arrow + distance to the active Locator/Nav target (falling back to the nearest live-tracked contact); GPS fix icon in the top status bar, shown only on GPS boards with GPS enabled. - Trail auto-pause — recording freezes on stops (banking elapsed time, breaking the map line across the idle gap) and resumes on movement without ending the session. - Streaming trail simplification — GPS points are simplified in-stream via a fixed-corridor (Reumann-Witkam) pass tuned for fidelity: straight runs collapse to their endpoints, curves stay bounded to the Min-dist tolerance, so the 512-point buffer covers a far longer route than a flat point budget would suggest. - Collapsible Tools (Location / Comms / System sections, fold-in-place like Settings) and page-indicator icons on the home carousel. - Waypoint coordinate editor — add a waypoint by scroll-editing lat/lon digit by digit. Fixes: - Critical: low-heap hang and contact loss on RAM-tight builds. Halved message-history scrollback rings (recovering ~14 KB free heap) and made contacts/channels/prefs persistence atomic (temp file + rename), so an interrupted save can no longer corrupt or wipe the store. - Serial.write() bounded so a stalled USB host can't hang the device. - Nearby Nodes: live [LOC] senders respect the type filter, sort by shared position, and the list refreshes so live shares bubble up. - Map: live contacts are labelled before waypoints. - GPS status icon hidden when GPS is off in Settings. - Splash screen no longer truncates a pre-release tag's own dash (e.g. v1.21-rc1) when stripping the build's commit-hash suffix. - Null-guarded the Locator target picker; clamped loc-share channel index on load. Under the hood: - -Os size optimisation on the e-ink and GAT562 30S solo envs. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 19:04:21 +02:00
-Os
extra_scripts = post:create-uf2.py
feat(screenshot): extend e-ink screenshot support via GxEPD2 patch - Add lib/GxEPD2-patch/src/GxEPD2_BW.h: local patched copy of GxEPD2_BW.h that exposes getBuffer()/getBufferSize() under ENABLE_SCREENSHOT guard. Include guard (_GxEPD2_BW_H_) prevents double-inclusion of the installed library version. - GxEPDDisplay.h: use patched header via relative include when ENABLE_SCREENSHOT so the patch takes precedence over the installed lib (PlatformIO adds library paths before -I build_flags). - DisplayDriver.h: add virtual getBuffer()/getBufferSize()/getDisplayType() defaults (nullptr/0/0) under ENABLE_SCREENSHOT. - SH1106Display.h / SSD1306Display.h / GxEPDDisplay.h: add concrete overrides; getDisplayType() returns 0 (OLED) or 1 (e-ink). - MyMesh.cpp/h: replace fragile C-cast with virtual dispatch in handleScreenshotRequest(); extend 5-byte header to 6 bytes by appending display_type so the host tool can decode the correct pixel layout. - tools/screenshot.py: parse 6-byte header; add eink_buffer_to_image() that decodes the row-major MSB-first GxEPD2 buffer with DISPLAY_ROTATION=1 (phys_x = 127-ly, phys_y = lx); dispatch on display_type. - variants/wio-tracker-l1-eink/platformio.ini: add [env:WioTrackerL1Eink_companion_dual_dev] with ENABLE_SCREENSHOT. - variants/wio-tracker-l1/platformio.ini: unchanged (OLED env already exists). Builds verified: WioTrackerL1Eink_companion_dual_dev SUCCESS, WioTrackerL1Eink_companion_radio_ble SUCCESS (unaffected). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 01:03:47 +02:00
; Dual BLE+USB with screenshot support (development/debug)
[env:WioTrackerL1Eink_companion_dual_dev]
extends = WioTrackerL1Eink
build_flags = ${WioTrackerL1Eink.build_flags}
-D DUAL_SERIAL=1
-D ENABLE_SCREENSHOT
Merge upstream/main (v1.16.0) into wio-unified Merge 254 upstream commits. Highlights relevant to the Wio fork: native NRF52 companion power-saving (sleep when !hasPendingWork), preamble 16->32 for SF<9, generic sensor-registration model, CMD_SEND_RAW_PACKET, isEink() display abstraction, KEEP_DISPLAY_ON_USB, contacts-sync/transient fixes. Conflicts resolved (11 files): - buzzer.h/.cpp: keep NRF52 include guard + our begin()->startup(); fold in upstream doc comment. - platformio (wio + eink): keep our slim env layout, add upstream kiss_modem env (+ debug_tool=stlink on eink ble). - GxEPDDisplay.h: take upstream isEink() override. - EnvironmentSensorManager.h: take upstream's wider #if guard. - DataStore.cpp: take upstream saveContacts(filter) signature, keep our ::openWrite (member openWrite would shadow the global 2-arg overload). - main.cpp: keep our watchdog init + add board.onBootComplete(); adopt upstream's `if(!hasPendingWork()) sleep` loop. - MyMesh.h: version -> v1.16-solo.0, build date 6 Jun 2026. - MyMesh.cpp: keep both CMD codes (SCREENSHOT 66 + RAW_PACKET 65), both field inits, both handlers, our screenshot fns + upstream saveContacts/save_filter, upstream hasPendingWork() + our MyMeshBot include. - UITask.cpp: keep our solo splash/clock page/snprintf/buzzer init; merge auto-off (+ opt-in KEEP_DISPLAY_ON_USB); merge low-batt shutdown (our EMA + prefs threshold + upstream's !isExternalPowered() guard and eink-aware delay). Post-merge drift fixes (upstream API/architecture changes, not conflicts): - applyTxPower(): radio_set_tx_power() removed upstream -> radio_driver.setTxPower(). - Sensor refactor dropped the per-sensor *_initialized flags our getAvailableLPPTypes() relied on; removed that override and the SENSORS page now derives available LPP types from the populated sensors_lpp buffer. README kept ours via .gitattributes merge=ours. Builds verified on all 5 Wio envs (dual, eink dual, radio_ble, dual_dev, eink_dual_dev). Not yet hardware-verified. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-06 17:21:41 +02:00
[env:WioTrackerL1Eink_kiss_modem]
extends = WioTrackerL1Eink
build_src_filter = ${WioTrackerL1Eink.build_src_filter}
+<../examples/kiss_modem/>