mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-27 14:42:18 +03:00
Nextion, VerifyOTA? RollBackConfig
This commit is contained in:
@@ -125,8 +125,6 @@ namespace _Broker
|
||||
}
|
||||
}
|
||||
|
||||
bool _debug;
|
||||
|
||||
class BrokerMQTT : public IoTItem
|
||||
{
|
||||
private:
|
||||
@@ -134,7 +132,7 @@ namespace _Broker
|
||||
int _port = 0;
|
||||
String _user;
|
||||
String _pass;
|
||||
//bool _debug;
|
||||
bool _debug;
|
||||
bool _brige;
|
||||
String _server;
|
||||
String _srvUser;
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#ifdef ESP8266
|
||||
#define FB_DYNAMIC
|
||||
#endif
|
||||
|
||||
#include <FastBot.h>
|
||||
#include <map>
|
||||
|
||||
@@ -94,8 +95,8 @@ public:
|
||||
_myBot->tick();
|
||||
if (fl_rollback)
|
||||
{
|
||||
_myBot->tickManual(); // Чтобы отметить сообщение прочитанным
|
||||
#ifdef ESP32
|
||||
_myBot->tickManual(); // Чтобы отметить сообщение прочитанным
|
||||
if (Update.rollBack())
|
||||
{
|
||||
SerialPrint("I", F("Update"), F("Откат OTA успешно выполнен"));
|
||||
@@ -107,6 +108,9 @@ public:
|
||||
SerialPrint("E", F("Update"), F("Откат OTA не выполнен!"));
|
||||
_myBot->sendMessage("Откат OTA не выполнен!", _chatID);
|
||||
}
|
||||
#else
|
||||
SerialPrint("I", F("Update"), F("Откат OTA только в ESP32"));
|
||||
_myBot->sendMessage("Откат OTA поддерживается только в ESP32", _chatID);
|
||||
#endif
|
||||
}
|
||||
// была попытка OTA обновления. Обновляемся после ответа серверу!
|
||||
|
||||
Reference in New Issue
Block a user