Files
MeshCore-Solo/variants/wio-tracker-l1/platformio.ini
MarekZegare4 57774d41f3 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

177 lines
5.4 KiB
INI

[WioTrackerL1]
extends = nrf52_base
board = seeed-wio-tracker-l1
board_build.ldscript = boards/nrf52840_s140_v7.ld
build_flags = ${nrf52_base.build_flags}
${sensor_base.build_flags}
-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
-D WIO_TRACKER_L1
-D USE_SX1262
-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 PIN_OLED_RESET=-1
-D GPS_BAUD_RATE=9600
build_src_filter = ${nrf52_base.build_src_filter}
+<WioTrackerL1Board.cpp>
+<../variants/wio-tracker-l1>
+<helpers/ui/SH1106Display.cpp>
+<helpers/sensors>
lib_deps= ${nrf52_base.lib_deps}
${sensor_base.lib_deps}
adafruit/Adafruit SH110X @ ^2.1.13
adafruit/Adafruit GFX Library @ ^1.12.1
[env:WioTrackerL1_repeater]
extends = WioTrackerL1
build_src_filter = ${WioTrackerL1.build_src_filter}
+<../examples/simple_repeater>
build_flags =
${WioTrackerL1.build_flags}
-D ADVERT_NAME='"WioTrackerL1 Repeater"'
-D ADMIN_PASSWORD='"password"'
-D MAX_NEIGHBOURS=50
-D DISPLAY_CLASS=SH1106Display
; -D MESH_PACKET_LOGGING=1
; -D MESH_DEBUG=1
lib_deps = ${WioTrackerL1.lib_deps}
adafruit/RTClib @ ^2.1.3
[env:WioTrackerL1_room_server]
extends = WioTrackerL1
build_src_filter = ${WioTrackerL1.build_src_filter}
+<../examples/simple_room_server>
build_flags = ${WioTrackerL1.build_flags}
-D ADVERT_NAME='"WioTrackerL1 Room"'
-D ADMIN_PASSWORD='"password"'
-D ROOM_PASSWORD='"hello"'
-D DISPLAY_CLASS=SH1106Display
; -D MESH_PACKET_LOGGING=1
; -D MESH_DEBUG=1
lib_deps = ${WioTrackerL1.lib_deps}
adafruit/RTClib @ ^2.1.3
[WioTrackerL1CompanionUSB]
extends = WioTrackerL1
board_build.ldscript = boards/nrf52840_s140_v7_extrafs.ld
board_upload.maximum_size = 708608
build_flags = ${WioTrackerL1.build_flags}
-I examples/companion_radio/ui-new
-D MAX_CONTACTS=350
-D MAX_GROUP_CHANNELS=40
-D DISPLAY_CLASS=SH1106Display
-D UI_HAS_JOYSTICK=1
-D UI_HAS_JOYSTICK_UPDOWN=1
-D OFFLINE_QUEUE_SIZE=256
-D PIN_BUZZER=12
-D QSPIFLASH=1
-D FIRMWARE_SOLO_BUILD=1
-D MESHCORE_VERSION='"1.16"'
-D UI_SENSORS_PAGE=1
; NOTE: DO NOT ENABLE --> -D MESH_PACKET_LOGGING=1
; NOTE: DO NOT ENABLE --> -D MESH_DEBUG=1
build_src_filter = ${WioTrackerL1.build_src_filter}
+<helpers/ui/MomentaryButton.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/ui/SH1106Display.cpp>
+<helpers/ui/buzzer.cpp>
lib_deps = ${WioTrackerL1.lib_deps}
adafruit/RTClib @ ^2.1.3
densaugeo/base64 @ ~1.4.0
end2endzone/NonBlockingRTTTL@^1.3.0
[env:WioTrackerL1_companion_radio_usb]
extends = WioTrackerL1CompanionUSB
[env:WioTrackerL1_companion_radio_usb_settings]
extends = WioTrackerL1CompanionUSB
build_flags = ${WioTrackerL1CompanionUSB.build_flags}
-D UI_HAS_JOYSTICK_UPDOWN=1
extra_scripts = post:create-uf2.py
[WioTrackerL1CompanionBLE]
extends = WioTrackerL1
board_build.ldscript = boards/nrf52840_s140_v7_extrafs.ld
board_upload.maximum_size = 708608
build_flags = ${WioTrackerL1.build_flags}
-I examples/companion_radio/ui-new
-D MAX_CONTACTS=350
-D MAX_GROUP_CHANNELS=40
-D BLE_PIN_CODE=123456
-D BLE_DEBUG_LOGGING=1
-D OFFLINE_QUEUE_SIZE=256
-D DISPLAY_CLASS=SH1106Display
-D UI_HAS_JOYSTICK=1
-D UI_HAS_JOYSTICK_UPDOWN=1
-D PIN_BUZZER=12
-D QSPIFLASH=1
-D ADVERT_NAME='"@@MAC"'
-D FIRMWARE_SOLO_BUILD=1
-D MESHCORE_VERSION='"1.16"'
-D UI_SENSORS_PAGE=1
-D ENV_PIN_SDA=PIN_WIRE1_SDA
-D ENV_PIN_SCL=PIN_WIRE1_SCL
; -D MESH_PACKET_LOGGING=1
; -D MESH_DEBUG=1
build_src_filter = ${WioTrackerL1.build_src_filter}
+<helpers/nrf52/SerialBLEInterface.cpp>
+<helpers/ui/MomentaryButton.cpp>
+<helpers/ui/buzzer.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
lib_deps = ${WioTrackerL1.lib_deps}
adafruit/RTClib @ ^2.1.3
densaugeo/base64 @ ~1.4.0
end2endzone/NonBlockingRTTTL@^1.3.0
[env:WioTrackerL1_companion_radio_ble]
extends = WioTrackerL1CompanionBLE
[env:WioTrackerL1_companion_radio_ble_settings]
extends = WioTrackerL1CompanionBLE
build_flags = ${WioTrackerL1CompanionBLE.build_flags}
-D UI_HAS_JOYSTICK_UPDOWN=1
extra_scripts = post:create-uf2.py
[WioTrackerL1CompanionDual]
extends = WioTrackerL1CompanionBLE
build_flags = ${WioTrackerL1CompanionBLE.build_flags}
-D DUAL_SERIAL=1
-UBLE_DEBUG_LOGGING
[env:WioTrackerL1_companion_dual]
extends = WioTrackerL1CompanionDual
build_flags = ${WioTrackerL1CompanionDual.build_flags}
-D UI_HAS_JOYSTICK_UPDOWN=1
extra_scripts = post:create-uf2.py
[env:WioTrackerL1_companion_solo_dual]
extends = WioTrackerL1CompanionDual
; 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 = ${WioTrackerL1CompanionDual.build_flags}
-D UI_HAS_JOYSTICK_UPDOWN=1
-D ENABLE_SCREENSHOT
-Os
extra_scripts = post:create-uf2.py
[env:WioTrackerL1_companion_dual_dev]
extends = WioTrackerL1CompanionDual
build_flags = ${WioTrackerL1CompanionDual.build_flags}
-D UI_HAS_JOYSTICK_UPDOWN=1
-D DUAL_SERIAL=1
-D ENABLE_SCREENSHOT
[env:WioTrackerL1_kiss_modem]
extends = WioTrackerL1
build_src_filter = ${WioTrackerL1.build_src_filter}
+<../examples/kiss_modem/>