15 Commits
Author SHA1 Message Date
liquidraver 7b3716bd6a fix M1 GPS power control 2026-06-17 14:15:45 +02:00
liquidraver 2ad185bab4 license "refactor" :) 2026-06-07 22:47:17 +02:00
liquidraver 01fd56a573 wire up RTC to out-of-the-box capable nodes 2026-06-07 12:00:05 +02:00
liquidraver d37b401033 battery: centralized LiPo OCV curve + ADC multiplier corrections
Add a board-aware battery SOC system replacing the two independent
linear approximations that existed in the UI helpers.

New helpers/battery_curve.{h,c}: a 21-point (5% step) OCV lookup table
with integer linear interpolation. The default generic LiPo curve is a
weak symbol — any board can override it by dropping a battery_curve.c
into its board directory. CMakeLists.txt selects the board-specific file
when present, falling back to the generic.

Board.h gains getBattPercent() (default 0); ZephyrBoard implements it
via battery_curve_lookup().

Board-specific curves added for boards with measured cell data:
t1000_e, rak_wismesh_tag, thinknode_m6, sensecap_solar, wio_tracker_l1.

ADC multiplier corrections applied across all nRF52840 boards:
- Boards using a correctly-derived 3600×ratio formula get +0.5% to
  compensate for nRF SAADC gain error (7200→7236, 6300→6332, etc.)
- rak_wismesh_tag, rak3401_1watt, gat562_30s had multipliers copied
  from Arduino's 3.0V AREF formula; corrected to 3600×1.73×1.005=6259
- xiao_nrf52840 (10911) left unchanged — empirically calibrated value
  above the theoretical, assumed already correct for that hardware

get adc.multiplier now reports current mV reading and the board's
curve 100% target, making field calibration self-guiding.
2026-06-03 13:21:06 +02:00
liquidraver 1dde69c653 add t-echo board
fix e-ink displays
fix one-button confirmation bug (eg shutdown)
2026-04-24 10:10:58 +02:00
jakobmn 5d0b66bc4f Update ThinkNode M1 target to match datasheet
- only two leds, red and blue
 - fix pin definition and polarity for leds
 - remove unmapped pins
 - swap buttons, so they match datasheet and marking on buttons
2026-04-18 15:47:15 +02:00
liquidraver ba4b86752d acw: airtime-scale jitter caps, companion surroundings awareness
- flood retransmit jitter now capped at min(2000ms, 6·airtime) instead of
  fixed 2000ms — spreads tighter at SF7, unchanged at SF8
- reactive per-dupe backoff cap now min(2000ms, 12·airtime), keeps
  semantic of "push past ~12 relay slots"
- contention ring 16 → 24 for 50-neighbor hilltops
- companions passively track heard floods (warms EMA without forwarding)
  and spread their own TX by up to min(1000ms, 3·airtime), hopefully
  fixing repeaters missing companion's first transmission

config cleanup:
- move BLE TX buffer bumps (ACL_TX=12 etc.) from zephcore_common.conf to
  esp32_common.conf — the Espressif blob needs them, nRF doesn't, and
  the bumps were overflowing nRF52840 RAM
- remove CONFIG_ZEPHCORE_MAX_CONTACTS=510 overrides from 5 nRF52840
  companion boards; Kconfig default of 350 fits with comfortable margin
  (wio prod: 91% → 79% RAM)
2026-04-17 10:24:12 +02:00
liquidraver 71684af590 rework buttons, add quintuple press for disabling leds 2026-03-16 12:56:10 +01:00
liquidraver d2ffe67420 thinknode m1 fixes 2026-03-14 10:37:49 +01:00
liquidraver 6576c55ad4 cleanup and unification 2026-03-10 16:01:00 +01:00
liquidraver a942f50b29 M1 fixes 2026-03-10 15:44:57 +01:00
liquidraver 57d8cf1c46 ditch arduino's hacky-hacky FS, back to zephyr native
mg24 fix
dfu zip generation fix
2026-03-03 13:46:48 +01:00
liquidraver 6cb80a31af thinknode fixes 2026-03-02 15:37:36 +01:00
liquidraver 99784d5856 update thinknode + example 2026-03-02 08:31:38 +01:00
liquidraver 7081e19b3d add thinknode m1 board + tcxo fixes 2026-03-01 16:20:17 +01:00