mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-06 11:36:59 +03:00
Fix build issue - release
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
idf_component_register(SRC_DIRS .
|
idf_component_register(SRC_DIRS .
|
||||||
INCLUDE_DIRS .
|
INCLUDE_DIRS . ${IDF_PATH}/components/driver
|
||||||
REQUIRES json tools platform_config display
|
REQUIRES json tools platform_config display
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -65,7 +65,17 @@ var RefreshAPIIntervalActive = false;
|
|||||||
var LastRecoveryState=null;
|
var LastRecoveryState=null;
|
||||||
var LastCommandsState=null;
|
var LastCommandsState=null;
|
||||||
var output = '';
|
var output = '';
|
||||||
|
function delay_msg(t, v) {
|
||||||
|
return new Promise(function(resolve) {
|
||||||
|
setTimeout(resolve.bind(null, v), t)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
Promise.prototype.delay = function(t) {
|
||||||
|
return this.then(function(v) {
|
||||||
|
return delay_msg(t, v);
|
||||||
|
});
|
||||||
|
}
|
||||||
function stopCheckStatusInterval(){
|
function stopCheckStatusInterval(){
|
||||||
if(checkStatusInterval != null){
|
if(checkStatusInterval != null){
|
||||||
clearTimeout(checkStatusInterval);
|
clearTimeout(checkStatusInterval);
|
||||||
@@ -1096,7 +1106,10 @@ function runCommand(button,reboot) {
|
|||||||
},
|
},
|
||||||
complete: function(response) {
|
complete: function(response) {
|
||||||
console.log('reboot call completed');
|
console.log('reboot call completed');
|
||||||
getCommands();
|
Promise.resolve().delay(5000).then(function(v) {
|
||||||
|
console.log('Getting updated commands');
|
||||||
|
getCommands();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -1177,7 +1190,7 @@ function getCommands() {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
advancedtabhtml+='<br>'+innerhtml;
|
advancedtabhtml+='<br>'+innerhtml;
|
||||||
advancedtabhtml+='<div class="buttons"><input id="btn-'+ command.name + '" type="button" class="btn btn-danger btn-sm" cmdname="'+command.name+'" value="'+command.name+'" onclick="runCommand(this);"></div></div><td></tr>';
|
advancedtabhtml+='<div class="buttons"><input id="btn-'+ command.name + '" type="button" class="btn btn-danger btn-sm" cmdname="'+command.name+'" value="'+command.name+'" onclick="runCommand(this, false);"></div></div><td></tr>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user