From 849abae41de5062d454bd8c68326ade67f7e183b Mon Sep 17 00:00:00 2001 From: ok-home Date: Mon, 25 Sep 2023 10:42:33 +0700 Subject: [PATCH] tmp rollback --- private_include/ota_ws_private.h | 6 ++- source/ota_ws.html | 77 ++++++++++++++++++++++---------- source/ota_ws_esp.c | 32 +++++++++++++ source/ota_ws_http.c | 33 +++++++++++--- 4 files changed, 117 insertions(+), 31 deletions(-) diff --git a/private_include/ota_ws_private.h b/private_include/ota_ws_private.h index 110b90b..a391bc6 100644 --- a/private_include/ota_ws_private.h +++ b/private_include/ota_ws_private.h @@ -11,10 +11,14 @@ #define OTA_END "otaEnd" #define OTA_ERROR "otaError" #define OTA_CANCEL "otaCancel" +#define OTA_CHECK_ROLLBACK "otaCheckRollback" +#define OTA_PROCESS_ROLLBACK "otaProcessRollback" #define OTA_CHUNK_SIZE 4096*2 esp_err_t start_ota_ws(void); esp_err_t write_ota_ws(int data_read, uint8_t *ota_write_data); esp_err_t end_ota_ws(void); -esp_err_t abort_ota_ws(void); \ No newline at end of file +esp_err_t abort_ota_ws(void); +bool check_ota_ws_rollback_enable(void); +esp_err_t rollback_ota_ws(bool rollback); \ No newline at end of file diff --git a/source/ota_ws.html b/source/ota_ws.html index 44858ef..29fc417 100644 --- a/source/ota_ws.html +++ b/source/ota_ws.html @@ -69,28 +69,38 @@
- -
- -
- - - -