main/task_user.c

changeset 51
5035385299f6
parent 44
e52d11b8f252
child 52
90a36619b07b
equal deleted inserted replaced
50:aae0056bc20b 51:5035385299f6
10 10
11 EventGroupHandle_t xEventGroupUser; ///< Events User task 11 EventGroupHandle_t xEventGroupUser; ///< Events User task
12 esp_timer_handle_t timerHandle; ///< Seconds timer 12 esp_timer_handle_t timerHandle; ///< Seconds timer
13 uint32_t SecsCount = 0; ///< Seconds counter 13 uint32_t SecsCount = 0; ///< Seconds counter
14 uint32_t UserTimer = 0; ///< User inactive timeout 14 uint32_t UserTimer = 0; ///< User inactive timeout
15 uint32_t AlarmTimer = 0; ///< Alarm timer
15 int Main_Loop2 = -1; ///< Effective menu 16 int Main_Loop2 = -1; ///< Effective menu
16 int New_Loop2 = ML2_INIT; ///< New menu 17 int New_Loop2 = ML2_INIT; ///< New menu
17 int SubMenu = 0; ///< Submenu number 18 int SubMenu = 0; ///< Submenu number
18 int SubOffset = 0; ///< Submenu offset 19 int SubOffset = 0; ///< Submenu offset
19 u8g2_t u8g2; ///< A structure which will contain all the data for one display 20 u8g2_t u8g2; ///< A structure which will contain all the data for one display
72 xEventGroupClearBits(xEventGroupUser, TASK_USER_BUSY); 73 xEventGroupClearBits(xEventGroupUser, TASK_USER_BUSY);
73 u8g2_SetPowerSave(&u8g2, 1); 74 u8g2_SetPowerSave(&u8g2, 1);
74 } 75 }
75 if (UserTimer) { 76 if (UserTimer) {
76 UserTimer--; 77 UserTimer--;
78 }
79
80 if (AlarmTimer == 1) {
81 ESP_LOGI(TAG, "Alarm Timer timeout");
82 Main_Loop1 = ML1_INIT;
83 }
84
85 if (AlarmTimer) {
86 AlarmTimer--;
77 } 87 }
78 } 88 }
79 89
80 90
81 91

mercurial