From 17996ce87cfbab74b0f574ab5b2568f40794e9c1 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Sat, 8 May 2021 15:26:23 +0200 Subject: [PATCH] Prep for MQTT Settings save --- tasmota/i18n.h | 3 +++ tasmota/tasmota.h | 2 +- tasmota/xdrv_01_webserver.ino | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tasmota/i18n.h b/tasmota/i18n.h index ce307c2cb..232380acf 100644 --- a/tasmota/i18n.h +++ b/tasmota/i18n.h @@ -27,6 +27,7 @@ \*********************************************************************************************/ #define D_JSON_ABORTED "Aborted" +#define D_JSON_ACK "Ack" #define D_JSON_ACTIVE "Active" #define D_JSON_ADDRESS "Address" #define D_JSON_AIRQUALITY "AirQuality" @@ -104,6 +105,7 @@ #define D_JSON_IMPORT_POWER "ImportPower" #define D_JSON_IMPORT_REACTIVE "ImportReactive" #define D_JSON_INFRARED "Infrared" +#define D_JSON_INVALID_FILE_TYPE "Invalid filetype or buffer" #define D_JSON_UNKNOWN "Unknown" #define D_JSON_LIGHT "Light" #define D_JSON_LINK_COUNT "LinkCount" @@ -111,6 +113,7 @@ #define D_JSON_LOW "Low" #define D_JSON_MAC "Mac" #define D_JSON_MASK "Mask" +#define D_JSON_MD5_MISMATCH "MD5 mismatch" #define D_JSON_MEMORY_ERROR "Memory error" #define D_JSON_MINIMAL "minimal" #define D_JSON_MODEL "Model" diff --git a/tasmota/tasmota.h b/tasmota/tasmota.h index c037d9070..1a1bb82ef 100644 --- a/tasmota/tasmota.h +++ b/tasmota/tasmota.h @@ -275,7 +275,7 @@ enum EmulationOptions {EMUL_NONE, EMUL_WEMO, EMUL_HUE, EMUL_MAX}; enum TopicOptions { CMND, STAT, TELE, nu1, RESULT_OR_CMND, RESULT_OR_STAT, RESULT_OR_TELE }; -enum UploadTypes { UPL_TASMOTA, UPL_SETTINGS, UPL_EFM8BB1, UPL_TASMOTACLIENT, UPL_EFR32, UPL_SHD, UPL_CCL, UPL_UFSFILE }; +enum UploadTypes { UPL_TASMOTA = 1, UPL_SETTINGS, UPL_EFM8BB1, UPL_TASMOTACLIENT, UPL_EFR32, UPL_SHD, UPL_CCL, UPL_UFSFILE }; enum ExecuteCommandPowerOptions { POWER_OFF, POWER_ON, POWER_TOGGLE, POWER_BLINK, POWER_BLINK_STOP, POWER_OFF_NO_STATE = 8, POWER_ON_NO_STATE, POWER_TOGGLE_NO_STATE, diff --git a/tasmota/xdrv_01_webserver.ino b/tasmota/xdrv_01_webserver.ino index a952ac419..f0f77ee26 100644 --- a/tasmota/xdrv_01_webserver.ino +++ b/tasmota/xdrv_01_webserver.ino @@ -2773,7 +2773,7 @@ void HandleUploadLoop(void) { #endif // USE_ZIGBEE_EZSP if (error != 0) { // AddLog(LOG_LEVEL_DEBUG, PSTR(D_LOG_UPLOAD "Transfer error %d"), error); - Web.upload_error = error + (100 * Web.upload_file_type); // Add offset to discriminate transfer errors + Web.upload_error = error + (100 * (Web.upload_file_type -1)); // Add offset to discriminate transfer errors return; } }