15 Commits
Author SHA1 Message Date
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 4e880df81a set leds on/off 2026-07-31 08:27:10 +02:00
liquidraver f8f62cd65b drop serial on reboot for ESP 2026-07-04 11:21:10 +02:00
liquidraver 18b63bd6f5 Add Lilygo T-beam 1.2 (SX1262) 2026-06-14 14:00:51 +02:00
liquidraver 2ad185bab4 license "refactor" :) 2026-06-07 22:47:17 +02:00
liquidraver 7c46f4a343 legacy code cleanup 2026-06-07 13:02:07 +02:00
liquidraver 28a8a6999d nrf companion auto-shutdown 2026-06-05 09:27:24 +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 d03deda313 port adc.multiplier command 2026-04-22 10:49:41 +02:00
liquidraver 0e5e71563c logging cleanup 2026-03-29 09:51:53 +02:00
liquidraver 6cb80a31af thinknode fixes 2026-03-02 15:37:36 +01:00
liquidraver 73222600b2 merge everything important up until d05d6abab8b52c0f20a0f85a0939c74bc762b4ad meschore/dev 2026-02-22 13:41:57 +01:00
liquidraver 9034e87a7f companion radio set + tempradio bugfixes, touch 1200 support 2026-02-21 15:11:16 +01:00
liquidraver 8d1823d0b6 First iteration that seems to work 2026-02-20 12:43:13 +01:00