Commit Graph

9 Commits

Author SHA1 Message Date
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
532a9154b1 Calibrate battery ADC and document LiPo curve
- Add BATTERY_CAL config and debug logging for raw ADC samples
- Use LiPo voltage curve (4.2V full, 2.9V empty) for % mapping
- Document battery calibration, curve, and debug output in README
2026-02-13 23:57:18 +01:00
096b4384d0 Average battery ADC samples
- Read battery 5 times and average for a steadier voltage estimate
2026-02-13 23:57:18 +01:00
e045673a3a Fix OLED autosleep timing and battery sampling cadence
- Track last OLED activity to avoid double timeout; keep power gating on transitions
- Copy TZ before setenv() in timegm_fallback to avoid invalid pointer reuse
- Add BATTERY_SAMPLE_INTERVAL_MS and only refresh cache at batch start when due
- Keep battery sampling to a single ADC read (Arduino core lacks explicit ADC power gating)
2026-02-13 23:57:18 +01:00
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
e480677b49 Add IEC62056 parsing, OLED timing, and batch LoRa send 2026-01-28 01:23:45 +01:00
460b6f86bb Improve power saving and payload safety 2026-01-23 17:32:40 +01:00
8c9520f7e5 feat(battery): round bat_v and derive bat_pct locally 2026-01-20 22:58:56 +01:00
6f308ad590 Initial commit 2026-01-20 01:39:06 +01:00