From: Sam Moore Date: Mon, 23 Sep 2013 16:28:35 +0000 (+0800) Subject: Merge branch 'master' of https://github.com/szmoore/MCTX3420 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=d18ad31028605d49238d0d8fde7c19a996614c8c;hp=d65175a25f5fcc0c63712e5c50adbb1a5ad1bafd;p=matches%2FMCTX3420.git Merge branch 'master' of https://github.com/szmoore/MCTX3420 There's always a merge. --- diff --git a/web/gui.js b/web/gui.js index 7d7a8fe..e49cf4d 100644 --- a/web/gui.js +++ b/web/gui.js @@ -11,6 +11,24 @@ $(document).ready(function() g_numSensors = 1 g_storeTime = [] g_key = null + g_led = 1 + + $.fn.ledFlash = function() + { + //alert("Flash LED"); + if (g_led == 0) + { + $.ajax({url : "api/actuators", data : {id : 0, set : 1}}) + g_led = 1 + $("#led").html("LED On"); + } + else + { + $.ajax({url : "api/actuators", data : {id : 0, set : 0}}) + g_led = 0 + $("#led").html("LED Off"); + } + } $.fn.pruneSensorData = function(id) { @@ -112,8 +130,7 @@ $(document).ready(function() $("#plots").html(plotsHTML) controlHTML = "

Controls

\n" - controlHTML += "

Pressure: " - controlHTML += "

" + controlHTML += "" $("#controls").html(controlHTML)