diff --git a/examples/0009-esp8266_esp32_process_OTA_MQTT/0009-esp8266_esp32_process_OTA_MQTT.ino b/examples/0009-esp8266_esp32_process_OTA_MQTT/0009-esp8266_esp32_process_OTA_MQTT.ino index ce5cda9b..f1553288 100644 --- a/examples/0009-esp8266_esp32_process_OTA_MQTT/0009-esp8266_esp32_process_OTA_MQTT.ino +++ b/examples/0009-esp8266_esp32_process_OTA_MQTT/0009-esp8266_esp32_process_OTA_MQTT.ino @@ -41,10 +41,10 @@ // Firmware title and version used to compare with remote version, to check if an update is needed. // Title needs to be the same and version needs to be different --> downgrading is possible #if THINGSBOARD_ENABLE_PROGMEM -constexpr char CURRENT_FIRMWARE_TITLE[] PROGMEM = "TEST"; +const std::string CURRENT_FIRMWARE_TITLE PROGMEM = "TEST"; constexpr char CURRENT_FIRMWARE_VERSION[] PROGMEM = "1.0.0"; #else -constexpr char CURRENT_FIRMWARE_TITLE[] = "TEST"; +const std::string CURRENT_FIRMWARE_TITLE = "TEST"; constexpr char CURRENT_FIRMWARE_VERSION[] = "1.0.0"; #endif diff --git a/src/OTA_Update_Callback.cpp b/src/OTA_Update_Callback.cpp index c0c173bd..15c45d3f 100644 --- a/src/OTA_Update_Callback.cpp +++ b/src/OTA_Update_Callback.cpp @@ -31,7 +31,7 @@ OTA_Update_Callback::OTA_Update_Callback(progressFn progressCb, function endCb,c void OTA_Update_Callback::Set_Progress_Callback(progressFn progressCb) { m_progressCb = progressCb; } -const std::string OTA_Update_Callback::Get_Firmware_Title() const { +std::string OTA_Update_Callback::Get_Firmware_Title() const { return m_fwTitel; } diff --git a/src/OTA_Update_Callback.h b/src/OTA_Update_Callback.h index 129e64f3..17d9d655 100644 --- a/src/OTA_Update_Callback.h +++ b/src/OTA_Update_Callback.h @@ -105,7 +105,7 @@ class OTA_Update_Callback : public Callback { /// @brief Gets the current firmware title, used to decide if an OTA firmware update is already installed and therefore should not be downladed, /// this is only done if the title of the update and the current firmware title are the same because if they are not then this firmware is meant for another device type /// @return Current firmware title of the device - const std::string Get_Firmware_Title() const; + std::string Get_Firmware_Title() const; /// @brief Sets the current firmware title, used to decide if an OTA firmware update is already installed and therefore should not be downladed, /// this is only done if the title of the update and the current firmware title are the same because if they are not then this firmware is meant for another device type