main/updates.c

changeset 78
e03d729aecb8
parent 74
34da2d2b12d5
equal deleted inserted replaced
77:15dc572a7fcb 78:e03d729aecb8
12 static const char *TAG = "update"; 12 static const char *TAG = "update";
13 int update_running = 0; ///< Not zero if update is running. 13 int update_running = 0; ///< Not zero if update is running.
14 14
15 extern u8g2_t u8g2; ///< Structure for the display. 15 extern u8g2_t u8g2; ///< Structure for the display.
16 extern int Main_Loop1; 16 extern int Main_Loop1;
17 extern uint32_t AlarmTimer; 17 extern uint32_t LoopTimer;
18 18
19 19
20 static void http_cleanup(esp_http_client_handle_t client) 20 static void http_cleanup(esp_http_client_handle_t client)
21 { 21 {
22 esp_http_client_close(client); 22 esp_http_client_close(client);
35 esp_ota_handle_t update_handle = 0; 35 esp_ota_handle_t update_handle = 0;
36 int timeout = 600; 36 int timeout = 600;
37 37
38 ESP_LOGI(TAG, "Update begin"); 38 ESP_LOGI(TAG, "Update begin");
39 update_running = 1; 39 update_running = 1;
40 AlarmTimer = 0; 40 LoopTimer = 0;
41 screen_updating("Stop meten", NULL); 41 screen_updating("Stop meten", NULL);
42 42
43 for (;;) { 43 for (;;) {
44 vTaskDelay(100 / portTICK_PERIOD_MS); 44 vTaskDelay(100 / portTICK_PERIOD_MS);
45 if (Main_Loop1 == ML1_DONE) 45 if (Main_Loop1 == ML1_DONE)

mercurial