diff --git a/src/modules/display/Nextion/ESPNexUpload.cpp b/src/modules/display/Nextion/ESPNexUpload.cpp index ad58883f..1eaf5403 100644 --- a/src/modules/display/Nextion/ESPNexUpload.cpp +++ b/src/modules/display/Nextion/ESPNexUpload.cpp @@ -428,7 +428,7 @@ bool ESPNexUpload::upload(Stream &myFile) #endif // create buffer for read - uint8_t buff[2048] = {0}; + uint8_t buff[4096] = {0}; // read all data from server while (_undownloadByte > 0 || _undownloadByte == -1) diff --git a/src/modules/exec/Telegram_v2/Telegram_v2.cpp b/src/modules/exec/Telegram_v2/Telegram_v2.cpp index 46b2d95d..5c457431 100644 --- a/src/modules/exec/Telegram_v2/Telegram_v2.cpp +++ b/src/modules/exec/Telegram_v2/Telegram_v2.cpp @@ -445,22 +445,22 @@ public: { downloadFile(msg); } - else if (msg.text.indexOf("Next_firmware") != -1) + } + else if (msg.text.indexOf("Next_firmware") != -1) + { + // удаляем последнее сообщение от бота + _myBot->deleteMessage(_myBot->lastBotMsg()); + if (msg.data.indexOf("Firmware") != -1 && OTAfilepath != "") { - // удаляем последнее сообщение от бота - _myBot->deleteMessage(_myBot->lastBotMsg()); - if (msg.data.indexOf("Firmware") != -1) + for (std::list::iterator it = IoTItems.begin(); it != IoTItems.end(); ++it) { - for (std::list::iterator it = IoTItems.begin(); it != IoTItems.end(); ++it) + if ((*it)->getSubtype() == "NextionUpload" || (*it)->getSubtype() == "Nextion") { - if ((*it)->getSubtype() == "NextionUpload" || (*it)->getSubtype() == "Nextion") - { - _myBot->sendMessage("Nextion firmware ...", _chatID); - (*it)->uploadNextionTlgrm(OTAfilepath); - } + _myBot->sendMessage("Nextion firmware ...", _chatID); + (*it)->uploadNextionTlgrm(OTAfilepath); } - OTAfilepath = ""; - } + } + OTAfilepath = ""; } } // -------------- Обработка кнопок меню созданного в сценарии --------------