Websocket auto serverinfo responder (#443)

* serverinfo cb

* remove webui cron

* missing header file

* tcp connection should trigger to
This commit is contained in:
brindosch
2017-06-17 23:29:04 +02:00
committed by GitHub
parent 91c7637a2b
commit d3707cb118
12 changed files with 166 additions and 38 deletions

View File

@@ -51,7 +51,6 @@ function connectionLostAction()
{
if(!connectionLost)
{
window.clearInterval(cronId);
connectionLost = true;
connectionTimer = window.setInterval(tryReconnect, 4000);
}

View File

@@ -37,7 +37,6 @@ function restartAction()
{
if(!connectionLost)
{
window.clearInterval(cronId);
connectionLost = true;
connectionTimer = window.setInterval(tryReconnect, 1000);
}

View File

@@ -15,7 +15,6 @@ var jsonPort = 19444;
var websocket = null;
var hyperion = {};
var wsTan = 1;
var cronId = 0;
var ledStreamActive = false;
var imageStreamActive = false;
var loggingStreamActive = false;
@@ -32,13 +31,6 @@ function initRestart()
connectionLostDetection('restart');
}
function cron()
{
requestServerInfo();
$(hyperion).trigger({type:"cron"});
}
function connectionLostDetection(type)
{
if ( watchdog > 2 )
@@ -82,7 +74,6 @@ function initWebSocket()
$(hyperion).on("cmd-serverinfo", function(event) {
watchdog = 0;
});
cronId = window.setInterval(cron,2000);
};
websocket.onclose = function (event) {