main/updates.c

changeset 53
20c14b06f255
parent 47
1ab1f4a8c328
child 74
34da2d2b12d5
equal deleted inserted replaced
52:90a36619b07b 53:20c14b06f255
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 18
18 19
19 static void http_cleanup(esp_http_client_handle_t client) 20 static void http_cleanup(esp_http_client_handle_t client)
20 { 21 {
21 esp_http_client_close(client); 22 esp_http_client_close(client);
34 esp_ota_handle_t update_handle = 0; 35 esp_ota_handle_t update_handle = 0;
35 int timeout = 600; 36 int timeout = 600;
36 37
37 ESP_LOGI(TAG, "Update begin"); 38 ESP_LOGI(TAG, "Update begin");
38 update_running = 1; 39 update_running = 1;
40 AlarmTimer = 0;
39 screen_updating("Stop meten", NULL); 41 screen_updating("Stop meten", NULL);
40 42
41 for (;;) { 43 for (;;) {
42 vTaskDelay(100 / portTICK_PERIOD_MS); 44 vTaskDelay(100 / portTICK_PERIOD_MS);
43 if (Main_Loop1 == ML1_DONE) 45 if (Main_Loop1 == ML1_DONE)

mercurial