mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-04-01 12:59:12 +03:00
upd Nextion upload
This commit is contained in:
@@ -428,7 +428,7 @@ bool ESPNexUpload::upload(Stream &myFile)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// create buffer for read
|
// create buffer for read
|
||||||
uint8_t buff[2048] = {0};
|
uint8_t buff[4096] = {0};
|
||||||
|
|
||||||
// read all data from server
|
// read all data from server
|
||||||
while (_undownloadByte > 0 || _undownloadByte == -1)
|
while (_undownloadByte > 0 || _undownloadByte == -1)
|
||||||
|
|||||||
@@ -445,11 +445,12 @@ public:
|
|||||||
{
|
{
|
||||||
downloadFile(msg);
|
downloadFile(msg);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if (msg.text.indexOf("Next_firmware") != -1)
|
else if (msg.text.indexOf("Next_firmware") != -1)
|
||||||
{
|
{
|
||||||
// удаляем последнее сообщение от бота
|
// удаляем последнее сообщение от бота
|
||||||
_myBot->deleteMessage(_myBot->lastBotMsg());
|
_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)
|
for (std::list<IoTItem *>::iterator it = IoTItems.begin(); it != IoTItems.end(); ++it)
|
||||||
{
|
{
|
||||||
@@ -462,7 +463,6 @@ public:
|
|||||||
OTAfilepath = "";
|
OTAfilepath = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
// -------------- Обработка кнопок меню созданного в сценарии --------------
|
// -------------- Обработка кнопок меню созданного в сценарии --------------
|
||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
else if (auto search = mapBtnMenu.find(msg.text); search != mapBtnMenu.end())
|
else if (auto search = mapBtnMenu.find(msg.text); search != mapBtnMenu.end())
|
||||||
|
|||||||
Reference in New Issue
Block a user