X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=web%2Fgui.js;h=e49cf4d4d6fbcd299f9a64203f736b4a3abc5ac0;hb=25ecb8cc15ad229de75d7bda20d7d36003544b77;hp=7d7a8fe5a013a5bc98531d18ed4b4e22abb0933b;hpb=0c55febb46bf3bfacaeefda0a2e422b42c18710c;p=matches%2FMCTX3420.git 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 = "
Pressure: " - controlHTML += "
" + controlHTML += "" $("#controls").html(controlHTML)