no sleep while ack pending

This commit is contained in:
2026-02-01 18:27:58 +01:00
parent b4344db828
commit fbd18b2e78

View File

@@ -622,7 +622,7 @@ static void sender_loop() {
uint32_t next_sample_due = g_last_sample_ms + METER_SAMPLE_INTERVAL_MS;
uint32_t next_send_due = g_last_send_ms + METER_SEND_INTERVAL_MS;
uint32_t next_due = next_sample_due < next_send_due ? next_sample_due : next_send_due;
if (next_due > now_ms) {
if (!g_batch_ack_pending && next_due > now_ms) {
watchdog_kick();
light_sleep_ms(next_due - now_ms);
}