CMXX - Software updater - update version after firmwaretool update
This commit is contained in:
@@ -67,7 +67,7 @@ async function listenToPort() {
|
|||||||
if (x.indexOf("SN=") > 0 && x.indexOf("HW=") > 0 && x.indexOf("STATE=") > 0)
|
if (x.indexOf("SN=") > 0 && x.indexOf("HW=") > 0 && x.indexOf("STATE=") > 0)
|
||||||
{
|
{
|
||||||
progressBar("60", "Reading device completed", "#04AA6D");
|
progressBar("60", "Reading device completed", "#04AA6D");
|
||||||
setTimeout(getDeviceData, 2000);
|
setTimeout(getDeviceData, 4000);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -160,6 +160,7 @@ function firmwareUpdate(data){
|
|||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
.then(firmware=> {
|
.then(firmware=> {
|
||||||
firmwarelocation = './firmware/'+firmware['software'];
|
firmwarelocation = './firmware/'+firmware['software'];
|
||||||
|
upgraded_version = firmware['version'];
|
||||||
return firmwarelocation;
|
return firmwarelocation;
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -25,12 +25,13 @@ async function createFirmwareUpdate(){
|
|||||||
var f = d.slice(d.length - 2)
|
var f = d.slice(d.length - 2)
|
||||||
hw = 'R'+f;
|
hw = 'R'+f;
|
||||||
}
|
}
|
||||||
|
|
||||||
hex_fw = firmwarelocation.split("/firmware/").pop();
|
hex_fw = firmwarelocation.split("/firmware/").pop();
|
||||||
|
console.log(upgraded_version);
|
||||||
|
|
||||||
var testdetails2 = {
|
var testdetails2 = {
|
||||||
"HW" : hw,
|
"HW" : hw,
|
||||||
"HEX_FW" : hex_fw
|
"HEX_FW" : upgraded_version
|
||||||
}
|
}
|
||||||
|
|
||||||
var testdetails = JSON.stringify(testdetails2);
|
var testdetails = JSON.stringify(testdetails2);
|
||||||
|
|||||||
Reference in New Issue
Block a user