Add IEC62056 parsing, OLED timing, and batch LoRa send

This commit is contained in:
2026-01-28 01:22:13 +01:00
parent 449fff1f06
commit e480677b49
8 changed files with 570 additions and 65 deletions

View File

@@ -47,6 +47,14 @@ uint8_t battery_percent_from_voltage(float voltage_v) {
return static_cast<uint8_t>(pct + 0.5f);
}
void light_sleep_ms(uint32_t ms) {
if (ms == 0) {
return;
}
esp_sleep_enable_timer_wakeup(static_cast<uint64_t>(ms) * 1000ULL);
esp_light_sleep_start();
}
void go_to_deep_sleep(uint32_t seconds) {
esp_sleep_enable_timer_wakeup(static_cast<uint64_t>(seconds) * 1000000ULL);
esp_deep_sleep_start();