diff --git a/html/script.js b/html/script.js index 2429b19a4..6671bdcba 100644 --- a/html/script.js +++ b/html/script.js @@ -348,10 +348,16 @@ function wsProcessQueue() { } else { //set wsBusy flag that we are waiting for a response wsBusy=true; - //set timeout to clear flag and try next message if response isn't recieved - wsTimerId=setTimeout(wsReadyToSend,2000); - //get next message from queue and send it. + //get next message from queue. message=wsQueue.shift(); + //set timeout to clear flag and try next message if response isn't recieved. Short timeout for message types that don't generate a response. + if(['T0','T1','T2','T3','X6'].indexOf(message.substr(0,2))) { + timeout=40; + } else { + timeout=2000; + } + wsTimerId=setTimeout(wsReadyToSend,timeout); + //send it. console.log('WS sending ' + message); ws.send(message); } diff --git a/wshandler.h b/wshandler.h index 6db4d5c4c..fcf1ce3bb 100644 --- a/wshandler.h +++ b/wshandler.h @@ -45,6 +45,9 @@ extern bool reboot; // Reboot flag T0 - Disable Testing T1 - Static Testing + T2 - Chase Test + T3 - Rainbow Test + T4 - View Stream S1 - Set Network Config S2 - Set Device Config @@ -52,6 +55,7 @@ extern bool reboot; // Reboot flag X1 - Get RSSI X2 - Get E131 Status Xh - Get Heap + XU - Get Uptime X6 - Reboot */