mirror of https://github.com/arendst/Tasmota.git
Firmware upload using factory partition
This commit is contained in:
parent
ef776849f8
commit
c8148a623f
|
@ -2,7 +2,7 @@
|
|||
// compressed by tools/unishox/compress-html-uncompressed.py
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
|
||||
const size_t HTTP_HEAD_LAST_SCRIPT_SIZE = 355;
|
||||
const size_t HTTP_HEAD_LAST_SCRIPT_SIZE = 346;
|
||||
const char HTTP_HEAD_LAST_SCRIPT_COMPRESSED[] PROGMEM = "\x30\x2F\x83\xAD\xCE\x46\xB1\x0E\xE9\xDE\x3D\xA6\x77\xF5\x47\xC3\x8C\xEA\x2D\x3E"
|
||||
"\x09\x81\x8B\x1A\xFA\x8E\x86\xA1\x6F\xE6\x45\xE6\x13\x0E\xB3\xE5\x61\x04\x77\x4F"
|
||||
"\xBD\xE1\x82\xE8\xEA\x1C\x2E\xAB\x38\xEA\xA6\x6C\xAB\xFB\xB3\xAB\xCC\x26\x1D\x1F"
|
||||
|
@ -13,7 +13,6 @@ const char HTTP_HEAD_LAST_SCRIPT_COMPRESSED[] PROGMEM = "\x30\x2F\x83\xAD\xCE\x4
|
|||
"\x04\x1C\x87\x44\x3E\xCF\x7C\xF3\x04\x7C\xB0\xF0\x7B\xA8\xED\x9D\xB3\xC1\xEE\x3D"
|
||||
"\xC0\x89\xC1\x77\x8C\x1D\xDF\x03\x02\xE0\xBC\xE8\x28\xC0\x2F\x70\x2C\x74\xF5\x19"
|
||||
"\x04\xCE\x82\x6F\x86\x05\x66\x47\xCF\x1D\xA3\xEC\x70\x58\x19\xA1\xF6\x79\x9F\x7D"
|
||||
"\x9C\xCF\xB0\x43\xD7\x47\xC2\x3B\xA6\xB1\x0E\xF1\xE0\xF4\x3B\x3C\x1F\xF4\x65\x1F"
|
||||
"\x86";
|
||||
"\x9C\xCF\xB0\x43\xD7\x47\xC2\x3B\xA6\xB1\x0E\xF1\xE0";
|
||||
|
||||
#define HTTP_HEAD_LAST_SCRIPT Decompress(HTTP_HEAD_LAST_SCRIPT_COMPRESSED,HTTP_HEAD_LAST_SCRIPT_SIZE).c_str()
|
|
@ -0,0 +1,32 @@
|
|||
/////////////////////////////////////////////////////////////////////
|
||||
// compressed by tools/unishox/compress-html-uncompressed.py
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
|
||||
const size_t HTTP_HEAD_LAST_SCRIPT32_SIZE = 771;
|
||||
const char HTTP_HEAD_LAST_SCRIPT32_COMPRESSED[] PROGMEM = "\x30\x2F\x83\xAD\xCE\x46\xB1\x0E\xE9\xDE\x3D\xA6\x77\xF5\x47\xC3\x8C\xEA\x2D\x3E"
|
||||
"\x09\x81\x8B\x1A\xFA\x8E\x86\xA1\x6F\xE6\x45\xE6\x13\x0E\xB3\xE5\x61\x04\x77\x4F"
|
||||
"\xBD\xE1\x82\xE8\xEA\x1C\x2E\xAB\x38\xEA\xA6\x6C\xAB\xFB\xB3\xAB\xCC\x26\x1D\x1F"
|
||||
"\x67\x78\xF0\x3E\x2B\x42\x67\x77\x4E\x81\x3E\x1E\xA1\x47\xE1\xF2\x8E\xF1\xED\xD3"
|
||||
"\x07\x77\x4F\x7A\x8F\x7C\xEF\x1E\xDD\x3D\xEA\x3D\xF3\xDE\x3E\xFA\xC6\xB3\xEC\xF7"
|
||||
"\xCF\x87\x77\x4F\x7A\x8F\x7C\xE8\x2A\x2B\xFC\x57\x55\xFD\x1C\x2E\x99\xDD\x3E\xF4"
|
||||
"\x43\xEC\xEF\x1F\xA3\xF4\x77\x4F\xE0\x27\x57\xEB\x1A\xCF\xB3\xBC\x77\x8E\xF1\xDA"
|
||||
"\x04\x1C\x87\x44\x3E\xCF\x7C\xF3\x04\x7C\xB0\xF0\x7B\xA8\xED\x9D\xB3\xC1\xEE\x3D"
|
||||
"\xC0\x89\xC1\x77\x8C\x1D\xDF\x03\x02\xE0\xBC\xE8\x28\xC0\x2F\x70\x2C\x74\xF5\x19"
|
||||
"\x04\xCE\x82\x6F\x86\x05\x66\x47\xCF\x1D\xA3\xEC\x70\x58\x19\xA1\xF6\x79\x9F\x7D"
|
||||
"\x9C\xCF\xB0\x43\xD7\x47\xC2\x3B\xA6\xB1\x0E\xF1\xE0\x11\x76\x41\x67\x76\x8E\xF1"
|
||||
"\xED\x63\x8E\xE9\xF6\x60\xE5\x9F\x67\x78\x81\x2B\x21\x04\x2C\x5D\x8E\x3B\xA7\xD9"
|
||||
"\x83\x94\x40\x9B\x68\x10\x73\xD3\xC5\x1D\x0C\x67\xC6\x9D\x3C\x2C\x70\xDD\xA3\xBA"
|
||||
"\x77\x8F\x2A\x01\x8B\xC2\x09\x80\xE8\xEE\xD0\x20\xF0\x84\x6C\x3E\x73\x1F\x44\x6C"
|
||||
"\x21\xA4\x11\x0A\xAA\x18\x5F\x66\xA1\x6F\xD4\x77\x4E\xF1\xE0\xD8\x74\xC1\x8F\x8E"
|
||||
"\xE9\xF6\x43\xC4\xCA\x8F\xB3\xA8\xFB\x3B\x05\x9C\xC3\xB4\x42\xCE\x61\xF0\x8C\x07"
|
||||
"\x47\xEA\xC6\x69\xF0\xFB\x3A\xAB\xE2\xD9\xDE\x3C\x1B\x0E\x99\xDF\x76\x21\x97\xAA"
|
||||
"\xE9\x86\x2A\x2B\xF8\x79\x9F\x0E\xE9\xDE\x3E\x1F\x87\xB7\x4C\x1D\xD3\x61\xD3\xEE"
|
||||
"\xC4\x32\x2F\x55\xD3\x3E\x1F\x0E\x61\xFA\x3F\x44\x6C\x3A\x7A\xAE\x85\xF8\xF8\x7C"
|
||||
"\x39\x4D\x90\x20\xEB\x3E\x3E\x1B\x0E\x9F\x7E\x19\x9D\xE6\x54\xCD\x94\x78\xD3\x07"
|
||||
"\x77\xC7\xC3\xE1\xF6\x62\xC2\xF3\x3E\xCE\xF7\x9D\x15\x68\xD7\x82\xE8\xEE\x9D\xD3"
|
||||
"\xBC\x7C\x3F\x0F\x68\x20\xF0\x26\x78\x3D\xC7\x51\xCE\x6D\x9D\xE2\x04\x3C\x26\xBE"
|
||||
"\x2D\x9F\x67\x7B\xC2\xCE\xED\x1D\xE3\xC1\xEE\x61\x79\xA0\x59\xD6\x8E\x33\xBC\x7B"
|
||||
"\x48\x15\x33\x53\x94\xDB\x3B\xC7\x83\xDC\x78\x3D\xC7\x82\x36\x1D\x3C\xF8\x43\xBA"
|
||||
"\x77\x8F\x1F\x74\x2F\xFC\x8C\x58\x5E\x67\x83\xDC\x7A\x1D\x9E\x0F\xFA\x32\x8F\xC3";
|
||||
|
||||
#define HTTP_HEAD_LAST_SCRIPT32 Decompress(HTTP_HEAD_LAST_SCRIPT32_COMPRESSED,HTTP_HEAD_LAST_SCRIPT32_SIZE).c_str()
|
|
@ -18,4 +18,4 @@ const char HTTP_HEAD_LAST_SCRIPT[] PROGMEM =
|
|||
"}"
|
||||
"}"
|
||||
"wl(jd);" // Add name='' to any id='' in input,button,textarea,select
|
||||
"</script>";
|
||||
;
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
const char HTTP_HEAD_LAST_SCRIPT32[] PROGMEM =
|
||||
"function jd(){" // Add label name='' based on provided id=''
|
||||
"var t=0,i=document.querySelectorAll('input,button,textarea,select');"
|
||||
"while(i.length>=t){"
|
||||
"if(i[t]){"
|
||||
"i[t]['name']=(i[t].hasAttribute('id')&&(!i[t].hasAttribute('name')))?i[t]['id']:i[t]['name'];"
|
||||
"}"
|
||||
"t++;"
|
||||
"}"
|
||||
"}"
|
||||
"function sf(s){"
|
||||
"var t=0,i=document.querySelectorAll('.hf');"
|
||||
"while(i.length>=t){"
|
||||
"if(i[t]){"
|
||||
"i[t].style.display=s?'block':'none';"
|
||||
"}"
|
||||
"t++;"
|
||||
"}"
|
||||
"}"
|
||||
"wl(jd);" // Add name='' to any id='' in input,button,textarea,select
|
||||
// experimental
|
||||
"function su(t){"
|
||||
// "console.log('su()');"
|
||||
"eb('f3').style.display='none';"
|
||||
"eb('f2').style.display='block';"
|
||||
"t.form.submit();"
|
||||
"}"
|
||||
"function fct(t){"
|
||||
// "console.log('running fct');"
|
||||
// "console.log(t);"
|
||||
"var x=new XMLHttpRequest();"
|
||||
"x.open('GET','/u4?u4=fct&api=',true);"
|
||||
"x.onreadystatechange=()=>{"
|
||||
// "console.log('x.readyState=%%i x.status=%%i',x.readyState,x.status);"
|
||||
"if(x.readyState==4&&x.status==200){"
|
||||
"var s=x.responseText;"
|
||||
// "console.log('responseText:'+s);"
|
||||
"if(s=='false')setTimeout(()=>{fct(t);},6000);"
|
||||
"if(s=='true')su(t);"
|
||||
"}else if(x.readyState==4&&x.status==0){"
|
||||
"setTimeout(()=>{fct(t);},2000);" // retry in 2 seconds
|
||||
"};"
|
||||
"};"
|
||||
"x.send();"
|
||||
// "console.log('after send');"
|
||||
"return false;"
|
||||
"}"
|
||||
"</script>";
|
|
@ -372,6 +372,7 @@
|
|||
#define D_OTA_URL "OTA Url"
|
||||
#define D_START_UPGRADE "Begin opgradering"
|
||||
#define D_UPGRADE_BY_FILE_UPLOAD "Gradeer op volgens lêeroplaai"
|
||||
#define D_UPLOAD_FACTORY "Switching to safeboot partition"
|
||||
#define D_UPLOAD_STARTED "Oplaai begin"
|
||||
#define D_UPGRADE_STARTED "Opgradering is begin"
|
||||
#define D_UPLOAD_DONE "Oplaai gedoen"
|
||||
|
|
|
@ -372,6 +372,7 @@
|
|||
#define D_OTA_URL "Адрес на сървър за OTA"
|
||||
#define D_START_UPGRADE "Начало на обновяване"
|
||||
#define D_UPGRADE_BY_FILE_UPLOAD "Обновяване от файл"
|
||||
#define D_UPLOAD_FACTORY "Switching to safeboot partition"
|
||||
#define D_UPLOAD_STARTED "Качване"
|
||||
#define D_UPGRADE_STARTED "Обновяване"
|
||||
#define D_UPLOAD_DONE "Качването завърши"
|
||||
|
|
|
@ -372,6 +372,7 @@
|
|||
#define D_OTA_URL "URL OTA"
|
||||
#define D_START_UPGRADE "Start aktualizace"
|
||||
#define D_UPGRADE_BY_FILE_UPLOAD "Aktualizace nahráním souboru"
|
||||
#define D_UPLOAD_FACTORY "Switching to safeboot partition"
|
||||
#define D_UPLOAD_STARTED "Nahrávání zahájeno"
|
||||
#define D_UPGRADE_STARTED "Zahájení aktualizace"
|
||||
#define D_UPLOAD_DONE "Nahrávání ukončeno"
|
||||
|
|
|
@ -372,6 +372,7 @@
|
|||
#define D_OTA_URL "OTA-URL"
|
||||
#define D_START_UPGRADE "Update starten"
|
||||
#define D_UPGRADE_BY_FILE_UPLOAD "Update Datei hochladen"
|
||||
#define D_UPLOAD_FACTORY "Switching to safeboot partition"
|
||||
#define D_UPLOAD_STARTED "Upload gestartet"
|
||||
#define D_UPGRADE_STARTED "Update gestartet"
|
||||
#define D_UPLOAD_DONE "Upload abgeschlossen"
|
||||
|
|
|
@ -372,6 +372,7 @@
|
|||
#define D_OTA_URL "OTA URL"
|
||||
#define D_START_UPGRADE "Εκκίνηση αναβάθμισης"
|
||||
#define D_UPGRADE_BY_FILE_UPLOAD "Αναβάθμιση με μεταφόρτωση αρχείου"
|
||||
#define D_UPLOAD_FACTORY "Switching to safeboot partition"
|
||||
#define D_UPLOAD_STARTED "Η μεταφόρτωση ξεκίνησε"
|
||||
#define D_UPGRADE_STARTED "Η αναβάθμιση ξεκίνησε"
|
||||
#define D_UPLOAD_DONE "Η μεταφόρτωση ολοκληρώθηκε"
|
||||
|
|
|
@ -372,6 +372,7 @@
|
|||
#define D_OTA_URL "OTA Url"
|
||||
#define D_START_UPGRADE "Start upgrade"
|
||||
#define D_UPGRADE_BY_FILE_UPLOAD "Upgrade by file upload"
|
||||
#define D_UPLOAD_FACTORY "Switching to safeboot partition"
|
||||
#define D_UPLOAD_STARTED "Upload started"
|
||||
#define D_UPGRADE_STARTED "Upgrade started"
|
||||
#define D_UPLOAD_DONE "Upload done"
|
||||
|
|
|
@ -372,6 +372,7 @@
|
|||
#define D_OTA_URL "OTA Url"
|
||||
#define D_START_UPGRADE "Comenzar actualización"
|
||||
#define D_UPGRADE_BY_FILE_UPLOAD "Actualizar cargando archivo bin"
|
||||
#define D_UPLOAD_FACTORY "Switching to safeboot partition"
|
||||
#define D_UPLOAD_STARTED "Cargando archivo"
|
||||
#define D_UPGRADE_STARTED "Actualización iniciada"
|
||||
#define D_UPLOAD_DONE "Carga finalizada"
|
||||
|
|
|
@ -372,6 +372,7 @@
|
|||
#define D_OTA_URL "URL OTA"
|
||||
#define D_START_UPGRADE "Lancer la mise à jour"
|
||||
#define D_UPGRADE_BY_FILE_UPLOAD "Mise à jour par téléchargement fichier"
|
||||
#define D_UPLOAD_FACTORY "Switching to safeboot partition"
|
||||
#define D_UPLOAD_STARTED "Téléchargement lancé"
|
||||
#define D_UPGRADE_STARTED "Mise à jour lancée"
|
||||
#define D_UPLOAD_DONE "Téléchargement terminé"
|
||||
|
|
|
@ -372,6 +372,7 @@
|
|||
#define D_OTA_URL "OTA Url"
|
||||
#define D_START_UPGRADE "Begjin upgrade"
|
||||
#define D_UPGRADE_BY_FILE_UPLOAD "Upgrade op bestân upload"
|
||||
#define D_UPLOAD_FACTORY "Switching to safeboot partition"
|
||||
#define D_UPLOAD_STARTED "Upload begon"
|
||||
#define D_UPGRADE_STARTED "Upgrade begon"
|
||||
#define D_UPLOAD_DONE "Upload dien"
|
||||
|
|
|
@ -372,6 +372,7 @@
|
|||
#define D_OTA_URL "OTA כתובת"
|
||||
#define D_START_UPGRADE "התחל בשדרוג"
|
||||
#define D_UPGRADE_BY_FILE_UPLOAD "שדרוג דרך קובץ נכשל"
|
||||
#define D_UPLOAD_FACTORY "Switching to safeboot partition"
|
||||
#define D_UPLOAD_STARTED "העלאה מתחילה"
|
||||
#define D_UPGRADE_STARTED "שדרוג מתחיל"
|
||||
#define D_UPLOAD_DONE "העלאה הסתיימה"
|
||||
|
|
|
@ -372,6 +372,7 @@
|
|||
#define D_OTA_URL "OTA URL"
|
||||
#define D_START_UPGRADE "Frissítés"
|
||||
#define D_UPGRADE_BY_FILE_UPLOAD "Frissítés helyi fájllal"
|
||||
#define D_UPLOAD_FACTORY "Switching to safeboot partition"
|
||||
#define D_UPLOAD_STARTED "Feltöltés elindítva"
|
||||
#define D_UPGRADE_STARTED "Frissítés elindítva"
|
||||
#define D_UPLOAD_DONE "Feltöltés kész"
|
||||
|
|
|
@ -372,6 +372,7 @@
|
|||
#define D_OTA_URL "URL OTA"
|
||||
#define D_START_UPGRADE "Esegui aggiornamento"
|
||||
#define D_UPGRADE_BY_FILE_UPLOAD "Aggiornamento tramite file locale"
|
||||
#define D_UPLOAD_FACTORY "Switching to safeboot partition"
|
||||
#define D_UPLOAD_STARTED "Caricamento..."
|
||||
#define D_UPGRADE_STARTED "Aggiornamento..."
|
||||
#define D_UPLOAD_DONE "Caricamento completato"
|
||||
|
|
|
@ -372,6 +372,7 @@
|
|||
#define D_OTA_URL "OTA Url"
|
||||
#define D_START_UPGRADE "업그레이드 시작"
|
||||
#define D_UPGRADE_BY_FILE_UPLOAD "파일에서 업로드해 업그레이드"
|
||||
#define D_UPLOAD_FACTORY "Switching to safeboot partition"
|
||||
#define D_UPLOAD_STARTED "업로드 시작됨"
|
||||
#define D_UPGRADE_STARTED "업그레이드 시작됨"
|
||||
#define D_UPLOAD_DONE "업그레이드 완료"
|
||||
|
|
|
@ -372,6 +372,7 @@
|
|||
#define D_OTA_URL "OTA Url"
|
||||
#define D_START_UPGRADE "Start opwaarderen"
|
||||
#define D_UPGRADE_BY_FILE_UPLOAD "Opwaarderen dmv verzenden bestand"
|
||||
#define D_UPLOAD_FACTORY "Switching to safeboot partition"
|
||||
#define D_UPLOAD_STARTED "Verzending gestart"
|
||||
#define D_UPGRADE_STARTED "Opwaarderen gestart"
|
||||
#define D_UPLOAD_DONE "Opwaarderen klaar"
|
||||
|
|
|
@ -372,6 +372,7 @@
|
|||
#define D_OTA_URL "Adres serwera"
|
||||
#define D_START_UPGRADE "Aktualizuj"
|
||||
#define D_UPGRADE_BY_FILE_UPLOAD "Aktualizacja z pliku"
|
||||
#define D_UPLOAD_FACTORY "Switching to safeboot partition"
|
||||
#define D_UPLOAD_STARTED "Wgrywanie rozpoczęte"
|
||||
#define D_UPGRADE_STARTED "Aktualizacja rozpoczęta"
|
||||
#define D_UPLOAD_DONE "Wgrywanie zakończone"
|
||||
|
|
|
@ -372,6 +372,7 @@
|
|||
#define D_OTA_URL "OTA URL"
|
||||
#define D_START_UPGRADE "Iniciar atualização"
|
||||
#define D_UPGRADE_BY_FILE_UPLOAD "Atualização por arquivo local"
|
||||
#define D_UPLOAD_FACTORY "Switching to safeboot partition"
|
||||
#define D_UPLOAD_STARTED "Início do envio"
|
||||
#define D_UPGRADE_STARTED "Atualização iniciada"
|
||||
#define D_UPLOAD_DONE "Atualização finalizada"
|
||||
|
|
|
@ -372,6 +372,7 @@
|
|||
#define D_OTA_URL "Url OTA"
|
||||
#define D_START_UPGRADE "Iniciar atualização"
|
||||
#define D_UPGRADE_BY_FILE_UPLOAD "Atualizar por envio de ficheiro"
|
||||
#define D_UPLOAD_FACTORY "Switching to safeboot partition"
|
||||
#define D_UPLOAD_STARTED "Envio Iniciado"
|
||||
#define D_UPGRADE_STARTED "Atualização Iniciada"
|
||||
#define D_UPLOAD_DONE "Atualização Finalizada"
|
||||
|
|
|
@ -372,6 +372,7 @@
|
|||
#define D_OTA_URL "OTA Url"
|
||||
#define D_START_UPGRADE "Porneste actualizare"
|
||||
#define D_UPGRADE_BY_FILE_UPLOAD "Actualizare prin încărcare fișier"
|
||||
#define D_UPLOAD_FACTORY "Switching to safeboot partition"
|
||||
#define D_UPLOAD_STARTED "Încărcare începută"
|
||||
#define D_UPGRADE_STARTED "Actualizare începută"
|
||||
#define D_UPLOAD_DONE "Încărcare terminată"
|
||||
|
|
|
@ -372,6 +372,7 @@
|
|||
#define D_OTA_URL "OTA Url"
|
||||
#define D_START_UPGRADE "Начать обновление"
|
||||
#define D_UPGRADE_BY_FILE_UPLOAD "Обновление путем загрузки файлов"
|
||||
#define D_UPLOAD_FACTORY "Switching to safeboot partition"
|
||||
#define D_UPLOAD_STARTED "Загрузка началась"
|
||||
#define D_UPGRADE_STARTED "Обновление началось"
|
||||
#define D_UPLOAD_DONE "Загрузка завершена"
|
||||
|
|
|
@ -372,6 +372,7 @@
|
|||
#define D_OTA_URL "URL OTA"
|
||||
#define D_START_UPGRADE "Spustiť aktualizáciu"
|
||||
#define D_UPGRADE_BY_FILE_UPLOAD "Aktualizácia nahraním súboru"
|
||||
#define D_UPLOAD_FACTORY "Switching to safeboot partition"
|
||||
#define D_UPLOAD_STARTED "Nahrávanie spustené"
|
||||
#define D_UPGRADE_STARTED "Aktualizácia spustená"
|
||||
#define D_UPLOAD_DONE "Nahrávanie ukončené"
|
||||
|
|
|
@ -372,6 +372,7 @@
|
|||
#define D_OTA_URL "OTA Url"
|
||||
#define D_START_UPGRADE "Starta uppdatering"
|
||||
#define D_UPGRADE_BY_FILE_UPLOAD "Uppgradering via filuppladdning"
|
||||
#define D_UPLOAD_FACTORY "Switching to safeboot partition"
|
||||
#define D_UPLOAD_STARTED "Uppladdning startad"
|
||||
#define D_UPGRADE_STARTED "Uppgradeing startad"
|
||||
#define D_UPLOAD_DONE "Uppladdning klar"
|
||||
|
|
|
@ -372,6 +372,7 @@
|
|||
#define D_OTA_URL "OTA Url"
|
||||
#define D_START_UPGRADE "Yükseltmeyi başlat"
|
||||
#define D_UPGRADE_BY_FILE_UPLOAD "Dosya kullanrak yükset"
|
||||
#define D_UPLOAD_FACTORY "Switching to safeboot partition"
|
||||
#define D_UPLOAD_STARTED "Yükleme başlatıldı"
|
||||
#define D_UPGRADE_STARTED "YÜkestlme başlatıldı"
|
||||
#define D_UPLOAD_DONE "Yükleme Tamamlandı"
|
||||
|
|
|
@ -372,6 +372,7 @@
|
|||
#define D_OTA_URL "OTA URL"
|
||||
#define D_START_UPGRADE "Почати оновлення"
|
||||
#define D_UPGRADE_BY_FILE_UPLOAD "Оновлення шляхом завантаження файлів"
|
||||
#define D_UPLOAD_FACTORY "Switching to safeboot partition"
|
||||
#define D_UPLOAD_STARTED "Завантаження почалось"
|
||||
#define D_UPGRADE_STARTED "Оновлення почалось"
|
||||
#define D_UPLOAD_DONE "Завантаження завершено"
|
||||
|
|
|
@ -372,6 +372,7 @@
|
|||
#define D_OTA_URL "Đường dẫn OTA"
|
||||
#define D_START_UPGRADE "Bắt đầu nâng cấp"
|
||||
#define D_UPGRADE_BY_FILE_UPLOAD "Nâng cấp thông qua tải lên tệp"
|
||||
#define D_UPLOAD_FACTORY "Switching to safeboot partition"
|
||||
#define D_UPLOAD_STARTED "Bắt đầu tải lên"
|
||||
#define D_UPGRADE_STARTED "Bắt đầu nâng cấp"
|
||||
#define D_UPLOAD_DONE "Hoàn thành tải tệp"
|
||||
|
|
|
@ -372,6 +372,7 @@
|
|||
#define D_OTA_URL "OTA 地址"
|
||||
#define D_START_UPGRADE "开始升级"
|
||||
#define D_UPGRADE_BY_FILE_UPLOAD "通过文件升级"
|
||||
#define D_UPLOAD_FACTORY "Switching to safeboot partition"
|
||||
#define D_UPLOAD_STARTED "开始上传"
|
||||
#define D_UPGRADE_STARTED "开始升级"
|
||||
#define D_UPLOAD_DONE "上传完成"
|
||||
|
|
|
@ -372,6 +372,7 @@
|
|||
#define D_OTA_URL "OTA網址"
|
||||
#define D_START_UPGRADE "開始升級"
|
||||
#define D_UPGRADE_BY_FILE_UPLOAD "透過檔案升級"
|
||||
#define D_UPLOAD_FACTORY "Switching to safeboot partition"
|
||||
#define D_UPLOAD_STARTED "已開始上傳"
|
||||
#define D_UPGRADE_STARTED "已開始升級"
|
||||
#define D_UPLOAD_DONE "已上傳完成"
|
||||
|
|
|
@ -209,10 +209,12 @@ const char HTTP_SCRIPT_INFO_END[] PROGMEM =
|
|||
|
||||
#ifdef USE_UNISHOX_COMPRESSION
|
||||
#include "./html_compressed/HTTP_HEAD_LAST_SCRIPT.h"
|
||||
#include "./html_compressed/HTTP_HEAD_LAST_SCRIPT32.h"
|
||||
#include "./html_compressed/HTTP_HEAD_STYLE1.h"
|
||||
#include "./html_compressed/HTTP_HEAD_STYLE2.h"
|
||||
#else
|
||||
#include "./html_uncompressed/HTTP_HEAD_LAST_SCRIPT.h"
|
||||
#include "./html_uncompressed/HTTP_HEAD_LAST_SCRIPT32.h"
|
||||
#include "./html_uncompressed/HTTP_HEAD_STYLE1.h"
|
||||
#include "./html_uncompressed/HTTP_HEAD_STYLE2.h"
|
||||
#endif
|
||||
|
@ -354,6 +356,16 @@ const char HTTP_FORM_RST_UPG[] PROGMEM =
|
|||
"</div>"
|
||||
"<div id='f2' style='display:none;text-align:center;'><b>" D_UPLOAD_STARTED " ...</b></div>";
|
||||
|
||||
// upload via factory partition
|
||||
const char HTTP_FORM_RST_UPG_FCT[] PROGMEM =
|
||||
"<form method='post' action='u2' enctype='multipart/form-data'>"
|
||||
"<br><input type='file' name='u2'><br>"
|
||||
"<br><button type='submit' onclick='eb(\"f1\").style.display=\"none\";eb(\"f3\").style.display=\"block\";return fct(this);'>" D_START " %s</button></form>"
|
||||
"</fieldset>"
|
||||
"</div>"
|
||||
"<div id='f3' style='display:none;text-align:center;'><b>" D_UPLOAD_FACTORY " ...</b></div>"
|
||||
"<div id='f2' style='display:none;text-align:center;'><b>" D_UPLOAD_STARTED " ...</b></div>";
|
||||
|
||||
const char HTTP_FORM_CMND[] PROGMEM =
|
||||
"<br><textarea readonly id='t1' cols='340' wrap='off'></textarea><br><br>"
|
||||
"<form method='get' onsubmit='return l(1);'>"
|
||||
|
@ -844,7 +856,11 @@ void WSContentSendStyle_P(const char* formatP, ...) {
|
|||
WSContentSend_P(HTTP_SCRIPT_COUNTER);
|
||||
}
|
||||
}
|
||||
#ifdef ESP32
|
||||
WSContentSend_P(HTTP_HEAD_LAST_SCRIPT32);
|
||||
#else
|
||||
WSContentSend_P(HTTP_HEAD_LAST_SCRIPT);
|
||||
#endif
|
||||
|
||||
WSContentSend_P(HTTP_HEAD_STYLE1, WebColor(COL_FORM), WebColor(COL_INPUT), WebColor(COL_INPUT_TEXT), WebColor(COL_INPUT),
|
||||
WebColor(COL_INPUT_TEXT), WebColor(COL_CONSOLE), WebColor(COL_CONSOLE_TEXT), WebColor(COL_BACKGROUND));
|
||||
|
@ -2286,7 +2302,15 @@ void HandleRestoreConfiguration(void)
|
|||
WSContentStart_P(PSTR(D_RESTORE_CONFIGURATION));
|
||||
WSContentSendStyle();
|
||||
WSContentSend_P(HTTP_FORM_RST);
|
||||
#ifdef ESP32
|
||||
if (EspSingleOtaPartition() && !EspRunningFactoryPartition()) {
|
||||
WSContentSend_P(HTTP_FORM_RST_UPG_FCT, PSTR(D_RESTORE));
|
||||
} else {
|
||||
WSContentSend_P(HTTP_FORM_RST_UPG, PSTR(D_RESTORE));
|
||||
}
|
||||
#else
|
||||
WSContentSend_P(HTTP_FORM_RST_UPG, PSTR(D_RESTORE));
|
||||
#endif
|
||||
if (WifiIsInManagerMode()) {
|
||||
WSContentSpaceButton(BUTTON_MAIN);
|
||||
} else {
|
||||
|
@ -2511,7 +2535,15 @@ void HandleUpgradeFirmware(void) {
|
|||
WSContentStart_P(PSTR(D_FIRMWARE_UPGRADE));
|
||||
WSContentSendStyle();
|
||||
WSContentSend_P(HTTP_FORM_UPG, SettingsText(SET_OTAURL));
|
||||
#ifdef ESP32
|
||||
if (EspSingleOtaPartition() && !EspRunningFactoryPartition()) {
|
||||
WSContentSend_P(HTTP_FORM_RST_UPG_FCT, PSTR(D_UPGRADE));
|
||||
} else {
|
||||
WSContentSend_P(HTTP_FORM_RST_UPG, PSTR(D_UPGRADE));
|
||||
}
|
||||
#else
|
||||
WSContentSend_P(HTTP_FORM_RST_UPG, PSTR(D_UPGRADE));
|
||||
#endif
|
||||
WSContentSpaceButton(BUTTON_MAIN);
|
||||
WSContentStop();
|
||||
|
||||
|
@ -2955,8 +2987,9 @@ void HandleSwitchFactory(void)
|
|||
Webserver->send(302, "text/plain", "");
|
||||
}
|
||||
}
|
||||
Web.upload_file_type = UPL_TASMOTA;
|
||||
}
|
||||
#endif
|
||||
#endif // ESP32
|
||||
|
||||
/*-------------------------------------------------------------------------------------------*/
|
||||
|
||||
|
|
Loading…
Reference in New Issue