File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change 1111#include "freertos/FreeRTOS.h"
1212#include "freertos/event_groups.h"
1313#include "freertos/task.h"
14+
1415#include "driver/rtc_io.h"
1516
1617#include "core/os.h"
@@ -36,13 +37,11 @@ static void os_pwr_task_handle(void *pvParameters)
3637 portMAX_DELAY
3738 );
3839
40+ ESP_LOGW (OS_PWR_TAG , "waiting for unfinished jobs...." );
41+ vTaskDelay (500 / portTICK_RATE_MS );
42+
3943 EventBits_t uxBits = xEventGroupGetBits (user_event_group );
4044 if (uxBits & OS_PWR_SLEEP_BIT ) {
41- for (int i = 3 ; i > 0 ; i -- ) {
42- ESP_LOGW (OS_PWR_TAG , "sleeping in %ds" , i );
43- vTaskDelay (1000 / portTICK_RATE_MS );
44- }
45-
4645 xEventGroupWaitBits (
4746 user_event_group ,
4847 sleep_wait_bits ,
@@ -68,11 +67,6 @@ static void os_pwr_task_handle(void *pvParameters)
6867 ESP_LOGW (OS_PWR_TAG , "sleep now" );
6968 esp_deep_sleep_start ();
7069 } else if (uxBits & OS_PWR_RESET_BIT ) {
71- for (int i = 3 ; i > 0 ; i -- ) {
72- ESP_LOGW (OS_PWR_TAG , "resetting in %ds" , i );
73- vTaskDelay (1000 / portTICK_RATE_MS );
74- }
75-
7670 xEventGroupWaitBits (
7771 user_event_group ,
7872 reset_wait_bits ,
You can’t perform that action at this time.
0 commit comments