Commit Graph
44 Commits
Author SHA1 Message Date
liquidraver 6ef03fb10e Merge branch 'master' into dev 2026-07-03 19:58:07 +02:00
liquidraver fc940d27ba sync with dev 2026-07-02 13:13:26 +02:00
Matthew Burton 43f455393e added colour and fixed set tx adc not sticking 2026-06-29 20:22:52 +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 7d7a64ff5a fix: airtime LDRO threshold must track driver (was BW-blind sf>=11)
getEstAirtimeFor() set LDRO from `sf >= 11`, correct only at BW125. Now
matches the driver's should_enable_ldro() (t_sym > 16.38 ms) so the
estimate's DE tracks hardware DE on every SF/BW. Also drop dead
calcRxDelay() + unused MAX_RX_DELAY_MILLIS.
2026-05-29 15:48:48 +02:00
liquidraver 66fc25557d simplify LoRaRadioBase: merge configureRx/Tx into configure(bool) 2026-05-29 13:51:49 +02:00
liquidraver 3441caf8b0 new rx busy latch 2026-05-14 22:24:48 +02:00
liquidraver 6919c3511c rx_boost state is undefined at boot (minor fix)
every LBT-retried flood packet loses its priority (fixed)
witching between LBT and non-LBT mode (or any cad.mode change) could silently skip full reconfiguration and leave the radio in the wrong mode (fixed)
2026-05-08 09:50:52 +02:00
liquidraver 2a8cc88262 fix fast path LBT CAD mode 2026-05-07 11:37:09 +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 e8f14442bf ramp time to 800us and duty cycle to 13/3 2026-05-05 14:52:05 +02:00
liquidraver ee2990fd16 hwconfig failsafe and duty cycle 10/6->10/4 (tests showed better reception) 2026-05-05 10:46:58 +02:00
liquidraver 9a1569c511 make rx duty cycle tuning more easy 2026-05-04 15:09:26 +02:00
liquidraver 1a956aa86a remove hot path RX, re-done the math, solves nothing, eats battery 2026-05-02 12:13:29 +02:00
liquidraver 9282ac8c9c stay in full RX after TX for 3 seconds
agc reset on every lora_recv_duty_cycle entry
2026-05-01 20:46:12 +02:00
liquidraver 624fc3306c tune duty cycling 2026-05-01 08:58:55 +02:00
liquidraver a81f27aea4 implement "isradioready" for early returns in rx duty cycling 2026-04-30 21:54:59 +02:00
liquidraver 7c31045bd4 fix hang near noisefloorcalibrate 2026-04-30 21:35:06 +02:00
liquidraver f947b6b5b1 increase preamble like vanilla 2026-04-30 12:58:33 +02:00
liquidraver 067e53b474 fix RX duty cycling logic 2026-04-28 15:31:03 +02:00
liquidraver 37eb87efd6 repeater housekeeping bugfix 2026-04-24 14:30:07 +02:00
liquidraver a716d2478f port seeed solar p1 + gps command fixes 2026-04-13 11:48:34 +02:00
liquidraver 4f6b0cca27 fix repeater-observer hybrid freezing 2026-04-09 12:23:27 +02:00
liquidraver 5f9c8b0d99 sx1276: fix loramac-node direction fast-path, resetAGC, add BW 62.5kHz
Three correctness fixes for the SX127x radio adapter on top of
Rastislav's initial sx1276 + patch commits:

1. _loramac_node flag (LoRaRadioBase + SX127xRadio):
   Guard the direction-only fast path in configureTx()/configureRx()
   so loramac-node always calls both Radio.SetTxConfig() and
   Radio.SetRxConfig().  Skipping either leaves TxTimeout=0 in the
   library, causing an immediate TX timeout callback, which prevents
   the _tx_signal from ever being raised and blocks the TX wait thread
   for TX_TIMEOUT_MS (5 s) — a 5-second RX blackout per transmission.
   This was the root cause of "boots but no RX".

2. SX127xRadio::resetAGC() override:
   The base-class resetAGC() calls startReceive() after hwResetAGC().
   During async RX the loramac-node modem mutex is STATE_BUSY, so
   lora_recv_async() returns -EBUSY, which sets _in_recv_mode = 0 and
   corrupts the receive state machine.  Override skips the call
   entirely — the loramac-node driver self-manages AGC.

3. BW 62.5 kHz support in loramac-node/sx1276.c + patch:
   Rastislav's 0004-lora-sx127x-62k5-bandwidth.patch adds BW_62_KHZ
   support to sx12xx_common.c (Zephyr side) but not to the loramac-
   node library itself.  Without this fix bandwidth index 3 hits the
   "while(1)" fatal guard in SX1276SetRxConfig/SX1276SetTxConfig.
   This commit patches sx1276.c directly and adds
   patches/modules/loramac-node/0001-sx1276-bw62k5.patch so the fix
   survives west update.  CMakeLists.txt is extended to apply module
   patches via the existing zephcore_apply_patches() mechanism.
2026-04-08 08:30:17 +02:00
liquidraver 33fa19a7f5 comment overhaul 2026-03-28 20:53:59 +01:00
liquidraver 57d392b124 close the 5ms race window before TX 2026-03-23 13:33:08 +01:00
liquidraver 68e2d1f598 update dutycycling and LBT to match newest zephyr API-s 2026-03-23 10:50:02 +01:00
liquidraver 4bd84ddf7e APC first test 2026-03-14 14:01:10 +01:00
liquidraver a71da9ba70 guard noisefloor sampling and agcreset while in rx duty cycle 2026-03-07 15:28:50 +01:00
liquidraver 2584e237f6 led switcher page in ui
rx duty cycle + noise floor measurement marriage
ui fixes
2026-03-06 22:15:13 +01:00
liquidraver 2d4b0c0a67 tweak noise floor reading 2026-03-05 16:34:28 +01:00
liquidraver 30379ee48a LoRaRadioBase volatile → atomic_t
LR1110 BUSY pin → interrupt-driven
2026-03-04 22:36:34 +01:00
liquidraver a4e96fa6e6 separate main events from housekeeping ones 2026-03-04 21:08:21 +01:00
liquidraver b3e3d4147b noise floor logic update (plus formatter cleanup) 2026-03-04 13:18:40 +01:00
liquidraver 383f23f448 port upstream: AGC reset, autoadd max hops, noise floor EMA, fixes
- AGC reset: proper warm sleep + Calibrate(ALL) + image recal for both
  SX126x and LR1110 (was cancel+restart / no-op respectively)
- Guard AGC reset against mid-receive (matches upstream RadioLib)
- Noise floor calibration: replace blocking 64-sample burst with
  single-sample EMA (alpha=1/8) per housekeeping tick — zero blocking,
  better temporal spread for real-world noise floor tracking
- Auto-add max hops: filter new contacts by hop count (NodePrefs,
  BaseChatMesh, CompanionMesh, ZephyrDataStore persistence)
- Fix CommonCLI memcmp("prefs", 4) → 5
2026-03-03 23:26:58 +01:00
liquidraver 225b59e0e5 rx duty cycle rework 2026-02-27 08:51:39 +01:00
liquidraver ced260c8c3 t1000 fixes 2026-02-26 14:34:18 +01:00
liquidraver 403914d126 rework sx and lr1110, improve BLE sync 2026-02-25 14:19:25 +01:00
liquidraver 6c7d52e725 t1000 gps fix 2026-02-24 15:50:11 +01:00
liquidraver 1332df0461 future-proof lora rx queue 2026-02-22 15:19:03 +01:00
liquidraver b6bc46b921 ESP OTA first implementation 2026-02-22 13:09:18 +01:00
liquidraver 521955bc05 clamp TX on station G2, refactor "set af" 2026-02-21 20:19:16 +01:00
liquidraver 8d1823d0b6 First iteration that seems to work 2026-02-20 12:43:13 +01:00