From a2d970fad6e544dbf14d22c961190f3d713aa61f Mon Sep 17 00:00:00 2001 From: Danielv123 Date: Fri, 7 Oct 2016 23:59:15 +0200 Subject: [PATCH] Use the many option for signals instead --- client.js | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/client.js b/client.js index fd2d0802..a900666a 100644 --- a/client.js +++ b/client.js @@ -112,23 +112,30 @@ setInterval(function() { // Fetch combinator signals from the server needle.post(config.masterIP + ":" + config.masterPort + '/readSignal', {since:lastSignalCheck}, function(err, response, body){ if(response && response.body && typeof response.body == "object" && response.body[0]) { - // buffer confirmed orders - console.log("YESSSSSSSS" + JSON.stringify(response.body[0])); - client.exec("/silent-command remote.call('clusterio', 'receiveFrame', '" + JSON.stringify(response.body[0].frame) + "')"); - // confirmedSignals[confirmedSignals.length] = {[response.body.name]: response.body.count} + // Take the new combinator frames and compress them so we can use a single command + frameset = []; + for(i=0;i