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
This commit is contained in:
2026-03-16 16:32:49 +01:00
parent 99aae76404
commit b9591ce9bb
7 changed files with 489 additions and 20 deletions

View File

@@ -9,4 +9,5 @@ void power_configure_unused_pins_sender();
void read_battery(MeterData &data);
uint8_t battery_percent_from_voltage(float voltage_v);
void light_sleep_ms(uint32_t ms);
void light_sleep_chunked_ms(uint32_t total_ms, uint32_t chunk_ms);
void go_to_deep_sleep(uint32_t seconds);