Commit Graph

2735 Commits

Author SHA1 Message Date
Jakub
27bc015a7c Channel context menu: defer flash write until CANCEL closes menu
savePrefs() is now called once when the user closes the menu with
Back/Cancel, only if the notification state was actually changed
(_ctx_dirty flag). Toggling multiple times before closing still
results in a single write.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 19:28:37 +02:00
Jakub
74e8215d11 Unread badges per category + context menu stays open on action
- newMsg() now takes contact_type; room server messages (ADV_TYPE_ROOM)
  tracked separately in _room_unread; DM badge = msgCount - roomUnread
- MODE_SELECT shows unread badges for all 3 rows: DM, Channels, Rooms
- Room unread cleared when user opens Room Servers list or msgRead(0)
- Channel context menu: ENTER performs action but stays open; only
  CANCEL (Back button) closes it so user can see the updated state

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 19:27:16 +02:00
Jakub
1278d7b793 Settings: contact filter toggles for DM and Room Servers
Adds SECTION_CONTACTS with two items under Settings:
- DM: "fav" (default) / "all" — controlled by dm_show_all in NodePrefs
- Rooms: "all" (default) / "fav" — controlled by room_fav_only in NodePrefs

Both fields default to 0, preserving current behaviour on firmware upgrade.
buildContactList() reads the prefs to filter accordingly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 19:19:44 +02:00
Jakub
0ba1fa3ff4 Messages: add Room Servers as third option alongside DM and Channels
Adds ADV_TYPE_ROOM contacts as a selectable category in the MODE_SELECT
screen. Reuses the existing CONTACT_PICK → MSG_PICK → send flow via a
_room_mode flag; sendMessage() works identically for room servers.
All room server contacts are listed (no favourites filter).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 19:16:26 +02:00
Jakub
ed2978a5a0 Home Messages page: show total unread count (DM + all channels)
Sums getMsgCount() (DM unreads) and getTotalChannelUnread() (sum of
_ch_unread[] across all channels) and displays "N unread" under the
"Messages" heading when non-zero.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 19:11:19 +02:00
Jakub
27384e4fc9 Enable joystick up/down in all WioTrackerL1 companion builds
Moved UI_HAS_JOYSTICK_UPDOWN=1 from _settings-only variants to the
WioTrackerL1CompanionBLE and WioTrackerL1CompanionUSB base configs.
The hardware always had the up/down buttons; the flag was only in
_settings as a temporary testing boundary.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 19:05:41 +02:00
Jakub
a65060161a Direct message: show only favourited companions
The contact picker now lists only contacts of type ADV_TYPE_CHAT
that have the favourite flag set. Shows "No favourites" when none
are starred. Asterisk prefix removed since all entries are favourites.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 18:58:39 +02:00
Jakub
27c93d17dd Per-channel notification settings via long-press context menu
Long-pressing ENTER on a channel in the channel picker opens a
2-item context menu: "Mark all read" and "Notif: default/OFF/ON".
Muted channels still increment the unread counter silently; force-ON
overrides global buzzer mute. Settings persist to flash via NodePrefs
(ch_notif_override / ch_notif_muted bitmasks).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 18:56:26 +02:00
Jakub
21005aa74c WioTrackerL1 UI v1.15.1: bugfixes and UX polish
- Fix placeholder picker colors: dark box + white border, light fill
  for selected item (consistent with rest of UI)
- Fix placeholders not expanded when sending from keyboard (expandMsg
  was only called in MSG_PICK path, not KEYBOARD path)
- Fix sent messages incrementing unread counter: set _phase=CHANNEL_HIST
  before addChannelMsg so viewing=true
- Fix keyboard column inverse mapping on UP from special row
- Remove old_row dead code from QuickMsgScreen keyboard handler
- Alert banner shown only on home screen, suppressed in settings/messages
- Bump FIRMWARE_VERSION to v1.15.1

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 17:19:03 +02:00
Jakub
886ee62015 WioTrackerL1 UI: predefined messages, caps lock, placeholder picker, 139-char limit
- Settings → Messages section: 10 user-editable message slots (M1–M10)
  with on-screen keyboard editor; slot M1 defaults to "OK" on first boot
- Keyboard: add Caps Lock [^] button — stays highlighted when active,
  all letters display and insert as uppercase until toggled off
- Keyboard: add [{}] placeholder picker overlay — inserts {loc} or {time}
  into the message at cursor position; available in both compose and
  settings slot editor
- Max message length raised to 139 chars to match the companion app;
  ChHistEntry text buffer extended to 140 chars
- NodePrefs: custom_msgs slot size extended to 140 chars per slot
- KB constants (KB_MAX_LEN, KB_CHARS, etc.) moved before SettingsScreen
  so both SettingsScreen and QuickMsgScreen can reference them

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 16:52:24 +02:00
Jakub
85c9857521 WioTrackerL1: redesign companion UI (channels, keyboard, msg preview)
- QuickMsg → Message screen: channel history, on-screen keyboard, custom message first
- Channel history: RAM ring buffer (32 entries, 80 chars), fullscreen view with word-wrap scroll
- After channel send: stay in history, own message shown as "Me: ..."
- MsgPreview: one message per screen with up/down nav, ENTER opens fullscreen scroll
- Monochromatic display: all color usage corrected to DARK/LIGHT only
- Top bar: battery icon, BT muted indicator, splash "Plus for Wio"
- KB_MAX_LEN: 64 → 100 chars; channel text buffer: 52 → 80 chars

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 15:56:30 +02:00
Jakub
8c4ecf542c Enable sensors page for Wio Tracker companion builds
UI_SENSORS_PAGE=1 activates the existing sensor display screen in
HomeScreen — shows temperature, pressure, humidity, voltage and other
LPP-formatted sensor data from connected I2C sensors (BME280, etc.).
BME280 support is already included via sensor_base build flags.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 08:36:39 +02:00
Jakub
acab1efe77 Splash screen: show unofficial build marker for Plus builds
Add FIRMWARE_PLUS_BUILD compile flag to both companion sections in
platformio.ini. When set, SplashScreen shows "+ unofficial build" in
yellow below the build date. Avoids runtime string parsing — the
existing version stripping logic (cuts at first dash) is unchanged.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-10 22:58:46 +02:00
Jakub
2f28a7b3b1 Fix FIRMWARE_VERSION: append -Plus in build.sh, not platformio.ini
build.sh sets FIRMWARE_VERSION via PLATFORMIO_BUILD_FLAGS — hardcoding
it in platformio.ini caused a macro redefinition conflict. Instead,
build_wio_tracker_l1_firmwares() now appends "-Plus" to the env var
before calling build_firmware(), so the final version string becomes
e.g. v1.15.0-Plus-abcdef.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-10 22:53:36 +02:00
Jakub
ec0f701589 Set custom FIRMWARE_VERSION for Wio Tracker companion builds
Override the upstream FIRMWARE_VERSION define via build_flags so all
companion radio builds (USB and BLE) show "v1.15.0-Plus" on the splash
screen. The #ifndef guard in MyMesh.h makes this override automatic.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-10 22:51:46 +02:00
Jakub
81363690f2 SettingsScreen: skip flash write if no settings changed
Track dirty state per-field in handleInput. savePrefs() on exit only
if at least one value was actually modified. Buzzer is excluded — it
already saves immediately via toggleBuzzer(). markClean() resets the
flag each time the settings screen is opened.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-10 22:12:29 +02:00
Jakub
d35c7d2d74 Fix null pointer dereferences in SettingsScreen index helpers
lowBatIndex(), autoOffIndex(), gpsIntervalIndex() each called
getNodePrefs() independently without null check, while renderItem()
had its own guarded copy. Added null checks consistent with the rest
of the class. Also initialize _node_prefs to NULL in UITask constructor.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-10 20:26:05 +02:00
Jakub
3abc5e1e1c Battery %: use LiPo discharge curve with variable shutdown threshold
Replace linear voltage-to-percent formula with a LiPo discharge curve
lookup table and linear interpolation. The curve is then rescaled so
that low_batt_mv (configurable shutdown threshold) maps to 0% and
4200mV maps to 100%, preserving the non-linear shape regardless of
the chosen threshold.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-10 19:47:12 +02:00
Jakub
202060af12 QuickMsgScreen: show only companion (chat) contacts
Filter contact list to ADV_TYPE_CHAT only — excludes repeaters, rooms,
and sensors which cannot receive direct chat messages.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-10 18:58:13 +02:00
Jakub
76904f2ec5 Fix: use out_path_len instead of path_len in QuickMsgScreen
ContactInfo has out_path_len, not path_len.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-10 18:53:52 +02:00
Jakub
3f871c00f6 QuickMsgScreen: sort favourites first, mark with asterisk
Favourite contacts (flags & 0x01 set by companion app) appear at the
top of the contact picker, marked with '*'. Non-favourites appear
below. The favourite bit is already synced by the existing protocol
via CMD_ADD_UPDATE_CONTACT — no protocol changes needed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-10 18:52:31 +02:00
Jakub
85afda7e46 Add hardware watchdog and QuickMsgScreen
Watchdog: nRF52840 hardware WDT with 30s timeout, runs during sleep.
Resets device if main loop stalls for >30s. Pets in every loop()
iteration so normal operation never triggers it.

QuickMsgScreen: new UI screen accessible from home screen pages.
Two-phase UI: contact picker (shows all contacts with hop count),
then predefined message picker (location, I'm OK, need help, on my
way, ETA 10min, ETA 30min). Location message uses live GPS fix if
available. Sends via the_mesh.sendMessage() and shows sent/error alert.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-10 18:45:35 +02:00
Jakub
0fc12b60fe Add RTC time persistence to flash
Save last known unix timestamp to /rtc_save on shutdown and restore it
on startup, so the clock shows correct time immediately after restart
without waiting for GPS fix.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-10 18:23:25 +02:00
Jakub
6cf8544979 feat(wio-tracker-l1): energy optimizations
- CPU sleep: board.sleep(0) in main loop puts NRF52 into WFE/sd_app_evt_wait
  between iterations; wakes on any interrupt (radio, BLE, timer). Largest
  power saving of the three changes.

- VBAT_ENABLE gating: voltage divider now powered only during ADC read
  (HIGH for 10ms, then LOW). Previously stayed HIGH continuously.
  Fixed in both variant.cpp (init) and WioTrackerL1Board::getBattMilliVolts().

- LED off with display: PIN_LED is cleared when auto-off triggers and
  restored (handed back to userLedHandler) when display wakes. Avoids
  idle LED current draw during screen-off periods.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-10 18:01:59 +02:00
Jakub
463692e923 docs: add Wio Tracker L1 feature documentation 2026-05-10 17:55:59 +02:00
Jakub
00722e3a95 ci: add Wio Tracker L1 firmware build and release workflow
Builds and releases only the _settings companion firmware variants
(USB and BLE) which contain the settings screen with display brightness,
buzzer, TX power, auto-off, GPS interval, timezone, low battery threshold,
and battery display mode.

Triggers on tags matching 'wio-tracker-*' (e.g. wio-tracker-v1.0.0)
or manually via workflow_dispatch. Creates a draft GitHub release.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-10 15:37:14 +02:00
Jakub
20b7aa080b build: include _settings companion firmware variants in release builds
Adds suffix matching for WioTrackerL1 _settings builds (with settings screen)
so they are picked up automatically by the companion firmware build workflow.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-10 15:34:07 +02:00
Jakub
a6ef2f703b feat(wio-tracker-l1): add settings screen and companion radio improvements
Settings screen (UI_HAS_JOYSTICK_UPDOWN build variant):
- Display brightness (5 levels, contrast curve tuned for SH1106 non-linearity)
- Buzzer on/off (respected at startup, no more forced unmute)
- TX power (2–22 dBm)
- Auto-off delay (5s / 15s / 30s / 60s / never)
- GPS update interval (off / 30s / 1min / 5min / 15min / 30min)
- Timezone offset (UTC-12..+14) for clock screen
- Low battery auto-shutdown threshold (off / 3.0–3.5V, default 3.4V)
- Battery display mode (icon / % / voltage)

Battery:
- EMA filter (alpha=0.2) on ADC readings to smooth voltage spikes from uneven load
- Battery % calculated using low_batt_mv as 0% anchor
- Mute icon repositions dynamically based on battery display width

Clock screen on HomeScreen showing time/date with timezone support.

Build:
- _settings variants added for USB and BLE companion radio builds
- Automatic UF2 generation on every build via create-uf2.py post-script
- UI_HAS_JOYSTICK_UPDOWN flag guards joystick_up/down to avoid breaking other boards

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-10 15:18:35 +02:00
ripplebiz
1a7b3614a8 Merge pull request #2388 from OhYou-0/lilygo-teth-elite-board-support
Add LilyGo T-ETH Elite SX1262 board support
2026-04-28 14:34:11 +10:00
Liam Cottle
03a13aed30 Merge pull request #2413 from keithtweed/patch-1
Update script link in FAQ 4.7 to the repo of the fork
2026-04-27 14:17:19 +12:00
ripplebiz
fed8d36d03 Merge pull request #2412 from LitBomb/patch-25
Removed links to outdated resources and links
2026-04-27 12:14:23 +10:00
Keith Tweed
b948369d71 Update script link in FAQ 4.7 2026-04-26 19:51:33 -06:00
uncle lit
34db93150a Removed links to outdated resources and links
Removed links to outdated resources and links
2026-04-26 18:35:02 -07:00
Liam Cottle
528bf3f61e add FUNDING.yml 2026-04-26 00:24:40 +12:00
OhYou-0
68360157ec Add LilyGo T-ETH Elite board support 2026-04-24 10:16:19 -07:00
liamcottle
ecd0cfc1c1 update discord links 2026-04-24 15:57:34 +12:00
Scott Powell
dee3e26ac0 Merge branch 'dev'
# Conflicts:
#	docs/faq.md
2026-04-19 11:35:03 +10:00
Scott Powell
3751785400 * version 1.15.0 2026-04-19 11:27:55 +10:00
Scott Powell
49b37d5622 * minor bounds fix 2026-04-18 21:32:41 +10:00
ripplebiz
35b5548c0c Merge pull request #2328 from recrof/xiao_c3-companion-fix
fix: remove sensors from xiao c3 companion because of bootloops
2026-04-18 20:44:15 +10:00
Liam Cottle
54a48da6b5 Merge pull request #2306 from petrkr/otaupdate2
SDK3.x: Fix OTA includes, bump Async version
2026-04-18 19:56:56 +12:00
Rastislav Vysoky
0899f66034 fix: remove sensors from xiao c3 companion because of bootloops 2026-04-18 09:42:27 +02:00
Liam Cottle
acdb41fcf9 Merge pull request #2103 from robekl/docs-radio-rxgain
docs: add radio.rxgain command reference
2026-04-18 19:05:43 +12:00
Liam Cottle
352fe5f4ae Merge pull request #2315 from jirogit/fix/wireless-paper-companion-usb
feat: add USB Companion Radio env for Heltec Wireless Paper
2026-04-18 18:45:38 +12:00
liamcottle
cfe4b0b9a5 bleuart service stay registered first to prevent gatt cache issues on android when already paired 2026-04-18 14:43:47 +12:00
Liam Cottle
77d737beb9 Merge pull request #2323 from txkbaldlaw/updated-companion-dfu-from-mt
Add support for Companion BLE OTA updates on nRF devices
2026-04-18 12:17:16 +12:00
txkbaldlaw
96a16c238a Additional Update to FAQs regarding Companion OTA 2026-04-17 16:17:12 -05:00
txkbaldlaw
4f9764b1b4 Update FAQ to include Companion OTA DFU updates 2026-04-17 10:56:51 -05:00
Scott Powell
d7a3d41843 Merge branch 'default-scope' into dev 2026-04-17 16:30:19 +10:00
Scott Powell
91f3fa0bdf * CLI: 'region put ...' now defaults to flood allowed 2026-04-17 15:11:10 +10:00