enter_deepsleep cleanup wait logic
This commit is contained in:
parent
a0f3d89295
commit
d23bc3535e
@ -117,10 +117,9 @@ void enter_deepsleep(const uint64_t wakeup_sec = 60,
|
|||||||
// wait a while (max 100 sec) to clear send queues
|
// wait a while (max 100 sec) to clear send queues
|
||||||
ESP_LOGI(TAG, "Waiting until send queues are empty...");
|
ESP_LOGI(TAG, "Waiting until send queues are empty...");
|
||||||
for (i = 100; i > 0; i--) {
|
for (i = 100; i > 0; i--) {
|
||||||
if (!allQueuesEmtpy())
|
if (allQueuesEmtpy())
|
||||||
vTaskDelay(pdMS_TO_TICKS(1000));
|
|
||||||
else
|
|
||||||
break;
|
break;
|
||||||
|
vTaskDelay(pdMS_TO_TICKS(1000));
|
||||||
}
|
}
|
||||||
|
|
||||||
// shutdown LMIC safely, waiting max 100 sec
|
// shutdown LMIC safely, waiting max 100 sec
|
||||||
|
Loading…
Reference in New Issue
Block a user