Add IEC62056 parsing, OLED timing, and batch LoRa send
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user