upd Nextion upload

This commit is contained in:
Mit4el
2024-05-09 18:58:11 +03:00
parent 2eec5d2982
commit 3e4345e06c
2 changed files with 13 additions and 13 deletions

View File

@@ -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)

View File

@@ -445,11 +445,12 @@ public:
{
downloadFile(msg);
}
}
else if (msg.text.indexOf("Next_firmware") != -1)
{
// удаляем последнее сообщение от бота
_myBot->deleteMessage(_myBot->lastBotMsg());
if (msg.data.indexOf("Firmware") != -1)
if (msg.data.indexOf("Firmware") != -1 && OTAfilepath != "")
{
for (std::list<IoTItem *>::iterator it = IoTItems.begin(); it != IoTItems.end(); ++it)
{
@@ -462,7 +463,6 @@ public:
OTAfilepath = "";
}
}
}
// -------------- Обработка кнопок меню созданного в сценарии --------------
// -------------------------------------------------------------------------
else if (auto search = mapBtnMenu.find(msg.text); search != mapBtnMenu.end())