mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-22 07:28:19 +03:00
Improved OTA (empty firmware directory)
This commit is contained in:
@@ -13,7 +13,7 @@ function getbasepath(){
|
||||
{
|
||||
// host = "http://192.168.2.219"; // jomjol interner test
|
||||
// host = "http://192.168.178.46"; // jomjol interner test
|
||||
host = "http://192.168.178.46"; // jomjol interner Real
|
||||
host = "http://192.168.178.44"; // jomjol interner Real
|
||||
// host = "http://192.168.43.191";
|
||||
// host = "."; // jomjol interner localhost
|
||||
|
||||
|
||||
@@ -140,7 +140,7 @@ function prepareOnServer() {
|
||||
var nameneu = document.getElementById("newfile").value;
|
||||
filePath = nameneu.split(/[\\\/]/).pop();
|
||||
|
||||
/* first delete the old firmware */
|
||||
/* first delete the old firmware AND empty the /firmware directory*/
|
||||
xhttp.onreadystatechange = function() {
|
||||
if (xhttp.readyState == 4) {
|
||||
stopProgressTimer();
|
||||
@@ -159,7 +159,7 @@ function prepareOnServer() {
|
||||
|
||||
startProgressTimer("Server preparations...");
|
||||
|
||||
var _toDo = basepath + "/ota?delete=" + filePath;
|
||||
var _toDo = basepath + "/ota?task=emptyfirmwaredir";
|
||||
xhttp.open("GET", _toDo, true);
|
||||
xhttp.send();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user