Commit Graph

8 Commits

Author SHA1 Message Date
acidburns def09160d0 refactor lora payload timing
Bump the batch payload codec to schema v4 with separate meter-time and UTC anchors, then use meter seconds for sparse batch slotting and receiver reconstruction.

Update the current 868 MHz bench configuration, allow ACKs from configured receiver short IDs, improve AP-to-STA recovery, quiet the test build, and document the changed protocol in the README.
2026-06-30 12:19:27 +02:00
acidburns 5edb79f372 refactor(build): consolidate envs to production/debug/test; add compiler hardening flags
- Replace 11 per-frequency build environments with 3 role-based targets
  (production, debug, test) using shared [env] base section
- Move LoRa frequency and sender-ID config from build flags into config.h
  so all variants build from the same source
- Add -fstack-protector-strong, -D_FORTIFY_SOURCE=2, -Wformat-security
- Add Unity test framework to lib_deps for pio test support
- Add __pycache__/ to .gitignore
2026-03-17 12:31:16 +01:00
acidburns b9591ce9bb feat(power): 1Hz chunked light-sleep; meter backoff; log throttling
- Replace delay() with light_sleep_chunked_ms() in sender idle path
  (100ms chunks preserve UART FIFO safety at 9600 baud)
- Add ENABLE_LIGHT_SLEEP_IDLE build flag (default: on, fallback: =0)
- Meter reader task: exponential backoff on consecutive poll failures
  (METER_FAIL_BACKOFF_BASE_MS..MAX_MS) to reduce idle Core-0 wakeups
- Configurable SENDER_DIAG_LOG_INTERVAL_MS (5s debug / 30s prod)
- Configurable METER_FRAME_TIMEOUT_CFG_MS, SENDER_CPU_MHZ
- New PlatformIO envs: lowpower, 868-lowpower, lowpower-debug
- Add docs/POWER_OPTIMIZATION.md with measurement plan and Go/No-Go
2026-03-16 16:32:49 +01:00
acidburns 9c5b8fcdb4 Reduce sender power draw (RX windows + CPU/WiFi/ADC/pins)
- Add LoRa idle/sleep/receive-window helpers and use short RX windows for ACK/time sync

- Schedule sender time-sync windows (fast/slow) and track RX vs sleep time in debug

- Lower sender power (80 MHz CPU, WiFi/BT off, reduced ADC sampling, unused pins pulldown)

- Make SERIAL_DEBUG_MODE a build flag, add prod envs with debug off, and document changes
2026-02-13 23:56:36 +01:00
acidburns e229efd427 Add payload codec test envs and enable serial debug 2026-02-13 23:56:36 +01:00
acidburns 68542046de Update ESP32 platform and LoRa batching 2026-02-13 23:56:36 +01:00
acidburns 5f42575b10 Add 868MHz envs, fix MAC id, offset timesync 2026-01-21 21:14:48 +01:00
acidburns 6f308ad590 Initial commit 2026-01-20 01:39:06 +01:00