Commit Graph

3376 Commits

Author SHA1 Message Date
Jakub
2d6d35192b refactor(BaseChatMesh): extract onDiscoveredAdvert to keep upstream signature
Reverts onDiscoveredContact to the upstream 4-param signature, adding a
separate virtual onDiscoveredAdvert(bool was_flood) with a default no-op
implementation. Only MyMesh overrides the new virtual; simple_secure_chat
and any future implementors need no changes on upstream merges.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-08 20:37:22 +02:00
Jakub
ceea1df196 chore: add graphify hooks, CLAUDE.md, and gitignore updates
- .claude/settings.json: PreToolUse hooks redirecting grep/file reads
  to graphify query when graph.json exists
- CLAUDE.md: graphify knowledge graph instructions for Claude Code sessions
- .gitignore: exclude graphify-out/ and .claude/settings.local.json
- .vscode/extensions.json: add comments header

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-07 16:16:38 +02:00
Jakub
cd4c8e3ce6 fix(DataStore): clamp notif_melody_dm/ch to valid range [0-3]
After PR #16 added None (slot=3) to melody options, only notif_melody_ad
had a bounds check. Add matching clamps for dm and ch to prevent stray
bytes from an older prefs file triggering buildMelodyFromPrefs with an
out-of-range slot.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-07 16:13:16 +02:00
vanous
8e1352b24a Settings - Sound: Add Advert scope 2026-06-07 10:53:17 +02:00
vanous
7703b3ae36 Settings - Sound: Allow to set items to None 2026-06-07 09:13:02 +02:00
Jakub
484d8cb093 docs(features): refresh power-saving entry for v1.16 merge
Upstream's native NRF52 companion power-saving (PR #1238) and the preamble
16->32 bump for SF<9 both landed in the v1.16 merge. Update the battery/power
roadmap entry: the MCU now sleeps via board.sleep(0) when !hasPendingWork()
(no toggle — not sleeping only wastes power; it doesn't touch the radio), and
the preamble fix unblocks the CAD RX-windowing experiment on feat/power-saving.
Note the radio_set_*() globals were removed upstream (replace with radio_driver.*)
so that branch will need a rebase.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
v1.16
2026-06-06 17:41:49 +02:00
Jakub
6099b39740 fix(ui): bump splash MESHCORE_VERSION 1.15 -> 1.16
The splash shows the upstream base version from the hardcoded MESHCORE_VERSION
build flag (distinct from FIRMWARE_VERSION, which is our solo version). The
upstream merge bumped FIRMWARE_VERSION to v1.16-solo.0 but left this flag at
1.15. Update all three occurrences (wio + eink) to 1.16.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-06 17:27:48 +02:00
Jakub
f5b3213f80 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
Scott Powell
07a3ca9e05 Merge branch 'dev'
# Conflicts:
#	docs/faq.md
2026-06-06 21:12:43 +10:00
Scott Powell
8c0d5c5b24 * version 1.16.0 2026-06-06 21:09:38 +10:00
ripplebiz
74adda6316 Merge pull request #2702 from meshcore-dev/flood.max.advert
new CLI config: flood.max.advert
2026-06-06 21:05:22 +10:00
Scott Powell
8fc2da5c98 * default now 8, per the will of the peoples. 2026-06-06 21:00:58 +10:00
Liam Cottle
b6454d6251 Merge pull request #2703 from IoTThinks/Fixed-powersaving--in-cli_commands.md-2026-06
Change default power saving setting to 'off'
2026-06-06 16:09:27 +12:00
IoTThinks
6a9a84e8a5 Change default power saving setting to 'off' 2026-06-06 11:04:36 +07:00
Scott Powell
5f6821bb66 * new CLI config: flood.max.advert (default 16) 2026-06-06 13:09:24 +10:00
Scott Powell
397ac6144f * number allocations: Ripple range reserved 2026-06-06 12:45:35 +10:00
Jakub
cacc4e6206 fix(ui): keep hasConnection() BLE-specific; use isClientConnected() only for mute/wake
Self-review caught a regression I'd just introduced: feeding hasConnection()
from isClientConnected() (BLE *or* USB) broke the GPX-export collision warning
in TrailScreen, which relies on hasConnection() meaning "BLE app connected"
(BLE → USB dump is safe; otherwise the app may be on USB → warn).

Correct split:
- hasConnection() ← isBLEConnected() — BLE-specific consumers: BT status
  indicator, pairing PIN, GPX-export warning.
- isClientConnected() (BLE bonded OR open USB-CDC port) used directly only by
  the Auto buzzer mute and message-wake, which should react to either transport.

Builds clean on dual (OLED + e-ink) and pure-BLE.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
v1.15.1
2026-06-05 12:42:14 +02:00
Jakub
3b795f7abc feat(ui): detect USB-CDC connection for Auto mute (BLE or USB)
USB client presence IS detectable on nRF52 after all: (bool)Serial ==
tud_cdc_n_connected() (DTR — a host has the CDC port open). Add
isClientConnected() = BLE-bonded OR USB-CDC-open; DualSerialInterface
overrides it, base defaults to isConnected() (single-transport unchanged).

Wire it so each consumer gets the right signal:
- hasConnection() ← isClientConnected(): Auto buzzer mute + message-wake now
  trigger on BLE or an open USB port (PR #14's intent, done correctly), but
  not on charging-only (no host → DTR low).
- BT status indicator + pairing PIN stay on isBLEConnected() (BLE-specific).

Caveat: a plain serial monitor also asserts DTR, so it counts as connected.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 12:36:49 +02:00
Jakub
4ea67ee950 fix(ui): hasConnection() should track BLE bond, not isConnected()
PR #14 (advert sound) changed setHasConnection() from isBLEConnected() to
isConnected() to also mute on USB — but DualSerialInterface::isConnected() is
hardcoded true (USB is always a send fallback) and ArduinoSerialInterface's is
too ("no way of knowing"), so USB-client presence is undetectable. The result
on every dual build: hasConnection() always true, which broke everything that
means "a companion app is connected":
- Auto buzzer mute → permanently muted (Auto behaved like Off)
- BT status indicator → always shown connected
- message-wake → display never woke for new messages

Revert to isBLEConnected() (the only detectable client signal). Mute-on-USB
isn't achievable; Buzzer = Off covers that case manually.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 12:30:55 +02:00
Jakub
a6ae9e80c8 fix(ble): show pairing PIN on dual (BLE+USB) builds
The Bluetooth-page PIN prompt was gated on hasConnection(), which is fed by
the serial interface's isConnected(). DualSerialInterface::isConnected()
always returns true (USB always "connected"), so waiting_for_pair was always
false and the PIN was never drawn — on every dual build, i.e. the published
OLED + e-ink firmware. Pure-BLE builds were unaffected (there isConnected()
reflects bond state).

Gate the PIN on actual BLE-bonded state instead: add
AbstractUITask::isBLEConnected() (forwards to BaseSerialInterface::
isBLEConnected(), which DualSerialInterface overrides with the real BLE state
and pure-BLE inherits as its bond-aware isConnected()). The PIN now shows on
the Bluetooth page while BLE is on and not yet bonded.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 12:03:38 +02:00
ripplebiz
53d50aa1ef Merge pull request #2684 from oltaco/rp2040-build-fixes
Build fixes for some RP2040 targets
2026-06-05 12:30:08 +10:00
Liam Cottle
1485d3301b Merge pull request #2463 from NoodlesNZ/fix-stddef
Add stddef.h to fix compilation issue on MacOS
2026-06-05 11:29:44 +12:00
Jakub
2ef8644efe docs: document Advert sound (AD sound) from PR #14
Settings › Sound gains an "AD sound" row, and Auto-Advert notes the audible
"in range" heartbeat: the device chirps on every received advert (any node),
melody chosen by AD sound; there's no off, so silence it via the Buzzer
setting. built-in still chirps.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
v1.15
2026-06-04 17:16:06 +02:00
Jakub
2bbdb7fe6c Merge remote-tracking branch 'origin/wio-unified' into wio-unified
# Conflicts:
#	examples/companion_radio/DataStore.cpp
2026-06-04 17:13:49 +02:00
Liam Cottle
5222ee4d13 Merge pull request #2685 from oltaco/more-build-fixes
Build fixes for nibble_screen_connect and ThinkNode M2
2026-06-05 03:08:10 +12:00
taco
b4b0a0ee0f build fixes for nibble_screen_connect and thinknode_m2 2026-06-05 00:55:02 +10:00
Jakub
fb6d93ffd2 Merge pull request #14 from vanous/advert_sound
Add Advert sound and settings
2026-06-04 16:47:33 +02:00
Jakub
3e2462eaf4 docs(readme): advertise the GPS navigation suite
Add a navigation tagline to the intro and a dedicated "GPS navigation"
feature-highlights block (waypoints, compass, navigate-to-anything,
location sharing, trail, global units); note location nav in the Messages
entry and expand the Tools entry to cover waypoints/compass/navigate.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 16:15:01 +02:00
Jakub
47773ef787 docs: remove release notes file (kept as GitHub release body instead)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 16:07:08 +02:00
Jakub
0c807f62c8 docs: add Solo v1.14 release notes
Release notes covering the navigation suite (waypoints, GPS compass,
navigate-to-point, mesh location share, waypoints in GPX), the global
metric/imperial Units setting, the long-message buffer fix, plus the
existing v1.14 items, under docs/releases/solo-v1.14.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 16:02:46 +02:00
Jakub
c4cea53a40 polish(nav): tidy parseLatLon precision + ping-menu edge cases
- geo::parseLatLon now rounds lat/lon in double (matching the Add-by-coords
  form) instead of through a float cast that lost ~1 m near 1e8.
- NearbyScreen: preserve the ping menu's selected row across a rebuild
  instead of snapping back to "Send" when a result line arrives.
- NearbyScreen: guard the ping-menu input path so a vanished contact
  (selectedStoredPubKey == false) closes the popup rather than acting on an
  uninitialised pub-key buffer.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 15:46:57 +02:00
Jakub
475e3b2c84 fix(nav/map): don't pin a waypoint to centre in the degenerate trail case
When a trail exists but the framed box collapses to one point (e.g. a
single recorded point, or all points coincident, with no GPS fix), the
degenerate branch was drawing waypoint[0] at the centre — but waypoints
aren't folded into the box in trail-priority mode, so a possibly-distant
waypoint appeared at the trail's location. Only centre a waypoint in the
genuine "lone waypoint, no trail" case.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 15:42:36 +02:00
taco
7ce8b66718 build fix for rp2040 companion usb 2026-06-04 23:36:51 +10:00
taco
33ce1c991c add missing radio_init() for rak11310 2026-06-04 23:30:50 +10:00
Jakub
26097d7d68 feat(trail): include waypoints in the GPX export
GPX dumps previously contained only the <trk>. Emit saved waypoints as
<wpt> elements (label → <name>, plus <time> when the RTC was set) before
the track, per GPX 1.1 ordering, in both live and saved-file exports. The
emitter is duck-typed over the waypoint store so Trail.h stays decoupled
from Waypoint.h; labels are XML-escaped. They now import as pins in OsmAnd /
Garmin / GPX Studio alongside the track.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 15:28:21 +02:00
taco
2a8bd3edad pin platform-raspberrypi to 4e22a0d
pins framework-arduinopico @ 1.50600.0+sha.6a1d13e9
2026-06-04 23:21:41 +10:00
Jakub
4f39203790 docs(features): add battery/power optimization backlog item
Capture the plan to multiply battery life via radio power technique (the
dominant draw is continuous RX, not the framework): CAD-based RX windowing
(~10-15mA → ~3-5mA, behind a setting due to the latency tradeoff) and
Adaptive Power Control, inspired by the ZephCore Zephyr port but stayable in
this Arduino tree. GPS power gating explicitly excluded — the device is a
live navigator/trail recorder. Deferred until trail polishing is done; prefer
adopting upstream nRF52 powersaving work.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 14:26:48 +02:00
Jakub
b64eda234f fix(nav): reject non-numeric lat/lon in Add-by-coords
The form's keyboard is the full alphanumeric one, and atof() silently read
a non-numeric entry as 0.0 — so typing letters created a waypoint at
(0, 0). Validate each coordinate with strtod and require the whole field to
be numeric; bad input now reports "Lat/Lon invalid" and saves nothing.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 13:49:22 +02:00
Jakub
08012ef54f feat(nav): show waypoint usage count in the list header
The Waypoints list header now reads "WAYPOINTS <n>/<cap>" (e.g. 3/16) so
it's clear at a glance how many waypoints are stored and how much room is
left before the table is full.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 13:44:00 +02:00
Jakub
6f2bc6529d refactor(nav): move Add-by-coords inside the Waypoints list
Add-by-coords sat in the top-level Trail action popup alongside Mark here.
Move it into the Waypoints view as a trailing "+ Add by coords" row, so the
popup stays focused on trail/marking actions and waypoint management lives
in one place. "Waypoints" is now always shown in the action menu (it hosts
the list, backtrack and the add entry), so the first waypoint can be added
by coordinates even with no trail or saved points yet.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 13:43:01 +02:00
Jakub
cad44216eb feat(nav): Add-by-coords becomes a lat/lon/label form
The on-screen keyboard has no comma or minus, so a single "lat,lon" entry
was unworkable. Replace it with a WP_ADD form: separate Lat / Lon / Label
rows plus Save. Lat/Lon take a magnitude from the keyboard and a hemisphere
(N/S, E/W) toggled with LEFT/RIGHT, so negative coordinates need no minus
key. Save validates the range, auto-names a blank label, and stores the
point via the normal waypoint path.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 13:39:09 +02:00
Jakub
80c14a75ed feat(nav): add a waypoint by typing coordinates
New Trail action "Add by coords" creates a waypoint without a GPS fix: the
keyboard takes a "lat,lon" string (decimal degrees), parsed by the shared
geo::parseLatLon; on success it falls through to the normal label keyboard
(blank → auto WP<n>). Useful for a meeting point or a spot read off a map.
Invalid input reports "Bad coordinates".

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 13:31:53 +02:00
Jakub
5c1ec5ee28 docs(features): mark range test (ping), lock-screen unread, mark-read done
- Range test → : shipped as the Nearby Nodes ping (RTT + SNR, repeatable);
  the dedicated continuous-ping/sparkline screen was not built (kept as future).
- Lock-screen unread count → : total "<n> unread" badge on the lock screen.
- Mark-read at type level →  pointer to the implemented priority entry.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 12:41:11 +02:00
Jakub
93df3a54d0 docs(features): mark navigation cluster shipped; add heading-up backlog
- Waypoints/nav, GPS trail, Backtrack, Compass-to-contact flipped to  with a
  consolidated "shipped" summary noting deltas from the original spec
  (two-char labels, heading tape compass, global Units, mesh location sharing,
  trail-priority map framing, shared geo/gfx helpers).
- New backlog item: heading-up (track-up) map orientation, with the COG-only /
  jitter / fit / grid / e-ink caveats and a lightweight rotate-the-fit plan.
- Audit: record the message-buffer length fix (history/compose sized to
  MAX_TEXT_LEN) as .

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 12:37:46 +02:00
Jakub
a12ff50edd feat(nav/map): frame the trail, clamp distant waypoints to the edge
While a trail exists the map now fits the recorded route (plus the live
position) and no longer folds waypoints into the bounding box, so a far-off
waypoint can't zoom the view out and squash the trail. Waypoints that
project outside the framed area are clamped to the nearest edge (marker +
label) instead of being lost off-screen. With no trail, the view still
auto-fits to the waypoints as before.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 12:30:46 +02:00
Jakub
901c1dcd92 fix(nav/map): keep waypoint labels inside the map rect
The label was always drawn up-and-right of the marker (wx+4, wy-3) and was
dropped entirely if it would clip the right edge — so waypoints near the
top/bottom (and left) edges had their label spill off the map or vanish.
Add an edge-aware placement helper: prefer upper-right, flip to the left
when it would clip the right edge, and clamp vertically so edge/corner
waypoints keep a visible label. Used by both the normal and degenerate
single-point map paths.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 12:26:02 +02:00
Jakub
daaa5b1503 fix(messages): allow full-length text on the compose/send paths too
After widening the history buffers, the compose side was still the
bottleneck: the keyboard capped input at 139 bytes and the quick-message
expand buffers were 140. Raise KB_MAX_LEN to 160 (MeshCore's MAX_TEXT_LEN)
and size the expand/compose buffers to MSG_TEXT_BUF, so a message can be
typed, expanded, sent, stored and displayed at the full protocol length on
every path.

The custom-message editor now passes an explicit max bound to its 140-byte
store, so the wider keyboard buffer can't overflow it; the bot editor
already passed per-field maxima.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 12:15:30 +02:00
Jakub
606f28c34a fix(messages): stop clipping long received messages
Message history buffers were smaller than the over-the-air maximum, so long
messages lost their tail on display. Channel messages carry the sender
embedded as "Name: body" in the payload (up to MAX_TEXT_LEN = 160 B), but
ChHistEntry::text was only 140 B; DmHistEntry::text was just 80 B — and with
Polish text each accented char is two UTF-8 bytes, so the effective limit was
roughly half the visible characters.

Size both history buffers (and the fullscreen/preview split copies) to
MAX_TEXT_LEN + 1 so a full-length message is stored and shown intact. Sender
split buffers widened to the 32-char name limit.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 12:10:26 +02:00
Jakub
54b07a5941 feat(nav): offer Navigate / Save waypoint from the message list too
Previously a shared location was only actionable after opening the message
fullscreen; Hold Enter on a history row only ever offered Reply. Route the
DM and channel list context menus through the same buildFsMenu /
dispatchFsAction path as the fullscreen view, so Navigate / Save waypoint
appear directly on the list row when the selected message carries a
location (Navigate returns to the list on Back).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 11:57:29 +02:00
Liam Cottle
b4038529b5 Merge pull request #2683 from oltaco/techo-card-buildfixes
build fixes for LilyGo T-Echo Card
2026-06-04 21:40:11 +12:00