CMXX - Software updater - update version after firmwaretool update

This commit is contained in:
“VeLiTi”
2024-11-26 11:10:34 +01:00
parent 79edab3cc6
commit e3a728e73b
2 changed files with 7 additions and 5 deletions

View File

@@ -67,7 +67,7 @@ async function listenToPort() {
if (x.indexOf("SN=") > 0 && x.indexOf("HW=") > 0 && x.indexOf("STATE=") > 0)
{
progressBar("60", "Reading device completed", "#04AA6D");
setTimeout(getDeviceData, 2000);
setTimeout(getDeviceData, 4000);
return;
}
}
@@ -160,6 +160,7 @@ function firmwareUpdate(data){
.then(response => response.json())
.then(firmware=> {
firmwarelocation = './firmware/'+firmware['software'];
upgraded_version = firmware['version'];
return firmwarelocation;
})

View File

@@ -26,11 +26,12 @@ async function createFirmwareUpdate(){
hw = 'R'+f;
}
hex_fw = firmwarelocation.split("/firmware/").pop();
hex_fw = firmwarelocation.split("/firmware/").pop();
console.log(upgraded_version);
var testdetails2 = {
"HW" : hw,
"HEX_FW" : hex_fw
"HEX_FW" : upgraded_version
}
var testdetails = JSON.stringify(testdetails2);