Commit Graph
43 Commits
Author SHA1 Message Date
liquidraver 38f815a0a1 server roles, event loops, companion transports, storage and prefs.json
Server roles (slice 7)
- CommonCLI split into upstream's shape; region CLI moved into CommonCLI;
  ClientACL, RegionMap, TransportKeyStore and both server meshes in
  upstream shape over an Arduino compat shim (helpers/compat: Arduino.h,
  Stream/Print, Serial, SHA256, FILESYSTEM/File over Zephyr fs)
- room server processAck port; `get acl` prints as upstream
- room: default name Room-XXXX, display/input rotation, live radio UI refresh

Event loops (slice 7b)
- repeater and room server share server_main_common with a ServerRole
  descriptor; shared event bits in src/mesh_events.h
- room server deadline-driven (idle wakes 2.2/s -> 0.08/s); companion
  loop() runs on housekeeping (closes the lazy contact-flush gap)
- `get loop.wakes` in debug builds (CONFIG_ZEPHCORE_LOOP_WAKE_STATS)

Companion transports and WiFi (slice 8)
- upstream MultiSerialInterface: BLE, USB/UART and TCP are each a
  BaseSerialInterface, every connected transport gets every frame;
  CompanionSerial holds a lossless reply; shared frame_txq for BLE/TCP
- SerialCompanionTransport and LinuxTCPTransport replaced by
  TcpCompanionTransport; ZephyrBLE split (gatt layout, DFU)
- WiFi companion (upstream wifi.ssid/pwd/enabled CLI, TCP port 5000) on
  boards declaring `capabilities: wifi` in zephcore.yml: the PSRAM
  ESP32-S3 boards, plus Heltec V3 (140 contacts), Wireless Tracker (130)
  and both C6 boards (280); ESP32-S3 without PSRAM gets bounded WiFi
  buffers and a measured 72 KB heap; PSRAM boards' internal heap 72 KB
- TCP queues: own depth (ZEPHCORE_TCP_QUEUE_SIZE=8), RX waits instead
  of dropping
- RAM: companion ClientACL dropped; main/BT-TX/TCP stacks sized from
  measured peaks (-7 KB nRF companions, -9 KB ESP32 companions)
- ESP32 WiFi stopped working under ~200 frames/s unicast. Fixed by:
  patches/zephyr/0017 never block the WiFi task in the RX callback;
  patches/zephyr/0018 lock shared_multi_heap (heap corruption with the
  WiFi heap in PSRAM); patches/modules/hal_espressif/0001 backport of
  hal_espressif af97fb02df (PSRAM realloc)

Storage and prefs (slice 9)
- prefs are now prefs.json through upstream's ConfigSerializer (ported
  verbatim), with upstream's key names for shared fields and ZephCore's
  own under "zc"; on first boot the binary new_prefs / repeater prefs is
  migrated and kept, so a downgrade still boots with the old settings
- helpers/PrefsCodec: both legacy binary layouts (companion 272 B,
  server 311 B) as Zephyr-free codecs; sanitizeNodePrefs is the only
  validator
- fix: server prefs could be replaced by a truncated file when a write
  failed; identity, prefs and channel writes go through one checked
  atomic replace (ZephyrFsUtil)
- fix: a corrupt cad_auto byte turned adaptive CAD off instead of the
  default on
- fix: a deliberate 300 s GPS duty on a repeater was rewritten to 48 h
  on every boot (that migration now runs on legacy files only)
- one identity loader for all roles (IdentityFile); an unusable key
  file is always parked as .bad before regenerating
- server store no longer stamps repeater defaults on room server and
  observer; companion first-boot volume policy moved into the store
  (adoptVolume)
- ZephyrDataStore 1435 -> ~850 lines
2026-09-25 08:34:21 +02:00
liquidraver fd2cbe9d62 radio: extract CadController and NoiseFloorEstimator, one prefs source
- CadController (stats, window, re-anchor, visits, staircase, safety,
  starvation relax) and NoiseFloorEstimator split out of LoRaRadioBase
  behind a 4-call CadHw interface; Zephyr-free, host unit tests added
- prefs mandatory: setPrefs() before begin(), LoRaConfig fallbacks and the
  companion/observer placeholder prefs removed; LoRaConfig is the one
  defaults source (invalid-prefs fallback now uses the board TX default)
- TX-wait thread stack owned by the base; reconfigureWithParams removed
- driver extension headers on the public include path
  (zephyr/drivers/lora/*.h); patch 0003 include updated
- comment diet (image-identical); rationale moved to devdocs LLD 03
2026-09-23 14:33:29 +02:00
liquidraver 3a2f9f5a0a fix 1byte/2byte weirdnesses 2026-09-20 11:13:59 +02:00
liquidraver 39b9584b20 .editorconfig and .gitattributes 2026-09-18 21:25:19 +02:00
liquidraver 8c21a1609b lr2021 2.4ghz and seeed evk button fix 2026-09-12 19:46:43 +02:00
liquidraver 1beac007b7 documenting and error handling 2026-09-04 09:23:18 +02:00
liquidraver 1633274e4f leds refactor/improvement 2026-09-03 14:34:12 +02:00
liquidraver 81a43f6dd1 west update and upstream dev sync 2026-09-02 10:01:34 +02:00
liquidraver ba33cebf6a cad improvements 2026-09-01 22:05:29 +02:00
liquidraver ccb7fc748d command fixes 2026-08-30 09:27:20 +02:00
liquidraver 27ea7e41a5 flash cleaning improvements 2026-08-28 09:41:43 +02:00
liquidraver 2e3f5f3f59 display/input rotate 2026-08-25 15:19:11 +02:00
liquidraver 7d695872d4 implement radio.fem.rxgain 2026-08-22 17:32:41 +02:00
liquidraver 46a6b34bdd switch defaults to sf7/cr5 2026-08-22 11:54:52 +02:00
liquidraver 24e9392cbf a little more corruption defense 2026-08-22 11:47:53 +02:00
liquidraver 9fc3ab7f7e PR70 fix 2026-08-20 21:13:15 +02:00
liquidraver 3494411f83 x1 debug 2026-08-10 19:15:26 +02:00
liquidraver 4e880df81a set leds on/off 2026-07-31 08:27:10 +02:00
liquidraver a705d5b5ce refactor / unify probes 2026-07-29 12:30:47 +02:00
liquidraver 13b5e2fcf3 scrub APC and bump to 1.16.6 2026-07-20 09:55:32 +02:00
liquidraver 432336867b add cad.busycap knob for hilltop repeaters 2026-07-13 10:29:50 +02:00
liquidraver a320a7646d SmartCAD p2 2026-07-12 14:18:07 +02:00
liquidraver dc1239537e SmartCAD p1 2026-07-12 10:48:37 +02:00
liquidraver 46d27a0144 meshtimesync p2 2026-07-03 19:30:53 +02:00
liquidraver 14cb8c61f9 meshtimesync p1 2026-07-03 09:11:43 +02:00
liquidraver c4a1777956 refactor gps manager 2026-06-17 15:42:50 +02:00
liquidraver 572490e909 migrate to NVS, update formatters 2026-06-15 14:08:09 +02:00
liquidraver bf71542751 Make Rxdutycycling Great Again 2026-06-13 08:23:01 +02:00
liquidraver 2ad185bab4 license "refactor" :) 2026-06-07 22:47:17 +02:00
liquidraver ffe9ea652d sync to vanilla 1.16 2026-06-06 16:42:39 +02:00
liquidraver a6d095bc16 edit default prefs 2026-05-12 22:07:02 +02:00
liquidraver 6bc3ba7405 disable default duty cycling + SX driver fixes 2026-05-05 21:56:00 +02:00
liquidraverandClaude Opus 4.7 5e7adfb130 normalize source-file line endings to LF
Add .gitattributes rules so .c/.h/.cpp/.hpp are always stored as LF
(prevents EOL drift from editors with autocrlf-true defaults), and
renormalize the 30 source files that had drifted to CRLF in the index.

Pure mechanical change — `git diff --ignore-cr-at-eol` is empty.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-05 14:56:44 +02:00
liquidraver e18d017b2c refactor repeater prefs changes 2026-04-28 13:49:08 +02:00
liquidraver bf9ad0ef40 tune delay knobs 2026-04-28 13:49:08 +02:00
liquidraver e7219893c6 fix repeater prefs saving 2026-04-27 10:15:37 +02:00
liquidraver 37eb87efd6 repeater housekeeping bugfix 2026-04-24 14:30:07 +02:00
liquidraver e1c04113ca update default prefs 2026-04-14 12:07:52 +02:00
liquidraver 5c3df69621 atomic write (temp + sync + rename) for identity, prefs, and channels 2026-04-13 21:52:40 +02:00
liquidraver 0e5e71563c logging cleanup 2026-03-29 09:51:53 +02:00
liquidraver d45fbf7027 reactive collision avoidance 2026-03-11 12:08:48 +01:00
liquidraver 22efe4da6f fs revert cleanup 2026-03-04 09:21:05 +01:00
liquidraver 8d1823d0b6 First iteration that seems to work 2026-02-20 12:43:13 +01:00