diff --git a/components/services/CMakeLists.txt b/components/services/CMakeLists.txt
index 23b4b943..3f87899f 100644
--- a/components/services/CMakeLists.txt
+++ b/components/services/CMakeLists.txt
@@ -1,5 +1,5 @@
idf_component_register(SRC_DIRS .
- INCLUDE_DIRS .
+ INCLUDE_DIRS . ${IDF_PATH}/components/driver
REQUIRES json tools platform_config display
)
diff --git a/components/wifi-manager/code.js b/components/wifi-manager/code.js
index fed49278..3b51504e 100644
--- a/components/wifi-manager/code.js
+++ b/components/wifi-manager/code.js
@@ -65,7 +65,17 @@ var RefreshAPIIntervalActive = false;
var LastRecoveryState=null;
var LastCommandsState=null;
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(){
if(checkStatusInterval != null){
clearTimeout(checkStatusInterval);
@@ -1096,7 +1106,10 @@ function runCommand(button,reboot) {
},
complete: function(response) {
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 {
advancedtabhtml+='
'+innerhtml;
- advancedtabhtml+='