Commit Graph
624 Commits
Author SHA1 Message Date
liquidraver 3055ae9269 Merge pull request #90 from mepholic/fix/gps-duty-boot-ordering
Fix GPS duty interval read before loadPrefs() on repeater/room server
2026-09-19 20:15:09 +02:00
liquidraver f6d637c484 sysworkq 4K platform-wide, c3 heap 44K, native-linux mapped-partition, sx126x 0003 step B reduction 2026-09-19 19:50:18 +02:00
liquidraver edcc40a884 track zephyr main 3e8f38faf93: rebase patches, lora 0.9 api, nrf clock split, s3 heap, lr11xx/lr20xx dc preamble guard, usb kick loop fix 2026-09-19 16:46:14 +02:00
Dan TheisenandClaude Opus 5 3d5fb9461c Fix GPS duty interval read before loadPrefs() on repeater/room server
main_repeater.cpp and main_room_server.cpp applied the GPS duty interval
~55 lines before data_store.loadPrefs() ran, so getNodePrefs()->gps_interval
still held the initNodePrefs() value of 300 s.

That 300 is the *companion* default. loadPrefs() is not a pure read on these
roles: its first-boot path is the only place the 48 h repeater/room-server
default is established, and it persists that to flash so later code can treat
flash as authoritative. A stored value is likewise only in the struct after
loadPrefs() returns. Reading gps_interval before that call therefore cannot
see either the role default or the operator's setting -- only the companion
constant.

Two consequences, on every boot:

  - A stock GPS-equipped repeater duty-cycled its GPS every 5 minutes instead
    of every 48 hours, ~576x more wakeups than intended. On battery nodes this
    is a straight power regression.

  - Any operator value never reached the hardware. "set gps duty 0" (always-on)
    persisted to flash correctly, and `get gps duty` reports the manager's
    now-effective value, so it answered 300 -- readable as a stale default
    rather than as the setting being ignored.

The GPS manager itself is correct: gps_start_acquiring(), the fix-done
callback, gps_enable() and the fresh-fix request all guard standby on
gps_duty_cycling(), so the always-on invariant holds once the manager is
actually told the interval is zero.

Same ordering class as the two bugs already documented in these files -- radio
frequency binding and the LED master switch -- where CLI readback looked right
and the hardware disagreed. main_companion.cpp has always had the correct
order (loadPrefs() at 1461, gps_set_poll_interval_sec() at 1616) and is
unaffected.

Move the interval and the mode switch that starts acquisition to just after
loadPrefs(). Callback registration stays where it was: it has no prefs
dependency and must precede acquisition.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-19 10:29:54 +00:00
liquidraver 26751c76f2 cherry pick openocd patch from zephyr main 2026-09-18 21:40:41 +02:00
liquidraver 39b9584b20 .editorconfig and .gitattributes 2026-09-18 21:25:19 +02:00
liquidraver ca16cb102e enable nrf54 ADC 2026-09-18 20:41:37 +02:00
liquidraver a78b4ae2ea lower sf fixes 2026-09-17 13:14:37 +02:00
liquidraver 1c2c942849 command reply buffer and tcp oversize fix 2026-09-17 10:59:13 +02:00
liquidraver da0450e511 upstream sync + wio tracker 1w 2026-09-16 11:29:45 +02:00
liquidraver 16518e2196 heltec t1 2026-09-14 09:14:46 +02:00
liquidraver 8c21a1609b lr2021 2.4ghz and seeed evk button fix 2026-09-12 19:46:43 +02:00
liquidraver a1b5cfc724 semtech lr2021 evaluation kit port 2026-09-12 14:54:03 +02:00
liquidraver c969b2fca3 promicro fixes 2026-09-10 22:40:15 +02:00
liquidraver 69cc148fbe properly reset CAD offset when needed 2026-09-10 21:56:52 +02:00
liquidraver 54e333532e PR #80 followup 2026-09-08 23:09:33 +02:00
liquidraver ddfadb9125 Merge pull request #80 from bisbille/pr3-confirm-window
board: fix double-press confirm window on WT2 and V4.3
2026-09-08 23:04:44 +02:00
liquidraver 53cf183a5c esp gps and BT to 9dBm 2026-09-07 22:29:10 +02:00
ZephCore T096 be5e647c6a board: fix double-press confirm window on WT2 and V4.3
Both emit ENTER via a zephyr,input-longpress filter (single button),
same category the Kconfig help text already documents as needing
CONFIG_ZEPHCORE_UI_CONFIRM_WINDOW_MS=3000 instead of the 500ms
default -- two ~1s holds don't fit in 500ms, so the second long press
on shutdown/DFU/offgrid always arrives after the window closed and
just re-arms instead of confirming. T096 already had this set
(board.conf:38); WT2 and V4.3 didn't, apparently missed when their
board.conf was written.
2026-09-05 14:30:20 +02:00
liquidraver eef6a488a2 esp flash fix 2026-09-04 12:14:05 +02:00
liquidraver 1beac007b7 documenting and error handling 2026-09-04 09:23:18 +02:00
liquidraver bdf7348208 CAD offset safety net 2026-09-03 22:47:26 +02:00
liquidraver 7ae467305a transmit airtime fix 2026-09-03 19:02:51 +02:00
liquidraver bcdf125edf bump to 1.17.4 2026-09-03 15:44:47 +02:00
liquidraver 1633274e4f leds refactor/improvement 2026-09-03 14:34:12 +02:00
liquidraver 355ce04b21 numerous more cad fixes and improvements 2026-09-02 22:39:40 +02:00
liquidraver 4b497d66a4 fix sx1262 cad timeout issue 2026-09-02 15:37:07 +02:00
liquidraver 81a43f6dd1 west update and upstream dev sync 2026-09-02 10:01:34 +02:00
liquidraver 7d2e6ffafa fix ina voltage reading 2026-09-02 08:50:19 +02:00
liquidraver 1db0a14c4b get cad fix 2026-09-02 08:42:51 +02:00
liquidraver ba33cebf6a cad improvements 2026-09-01 22:05:29 +02:00
liquidraver efa5240b69 add meshnology w12 2026-08-30 22:29:21 +02:00
liquidraver ccb7fc748d command fixes 2026-08-30 09:27:20 +02:00
liquidraver e1e5863688 cleanup unused variable 2026-08-29 22:45:37 +02:00
liquidraver 90adb20690 bump zephyr 2026-08-29 22:36:08 +02:00
liquidraver 7331ca6c58 sync with upstream but held off the companion CLI 2026-08-29 22:08:59 +02:00
liquidraver ca280c52ed vcontact key fix 2026-08-29 21:26:12 +02:00
liquidraver 5bf3c577c9 tune cad detection across all chips 2026-08-29 17:31:39 +02:00
liquidraver d4363775ae heltec comment updates 2026-08-28 13:48:53 +02:00
liquidraver 6258b2264c refactor CRLF de-duplicator 2026-08-28 11:11:26 +02:00
liquidraver 2a519e11d1 try to guard accidental region load command 2026-08-28 10:59:42 +02:00
liquidraver bc208ade26 detach USB device stack before reboot (esp_restart_noos leaves the PHY attached) 2026-08-28 10:46:46 +02:00
liquidraver 5372f1d8a2 auto-enable esp32s3 USB CDC companion in CMakeLists; board.overlay first in overlay order; esp32s3 download-mode reboot 2026-08-28 10:32:49 +02:00
liquidraver 27ea7e41a5 flash cleaning improvements 2026-08-28 09:41:43 +02:00
liquidraver 8adbe2a648 releasenotes update 2026-08-25 15:23:20 +02:00
liquidraver 2e3f5f3f59 display/input rotate 2026-08-25 15:19:11 +02:00
liquidraver 4632797e3e bump to 1.17.3 2026-08-25 14:26:35 +02:00
liquidraver ea86815c95 fix LNA/FEM control 2026-08-25 14:04:32 +02:00
liquidraver 8c0464ea30 logo thiccification and docs chores 2026-08-24 21:43:40 +02:00
liquidraver 7e73743579 logo2 2026-08-24 17:57:25 +02:00