X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=testing%2FMCTXWeb%2Fpublic_html%2Fstatic%2Fmctx.gui.js;h=b0bf6025e1fa3a94ea4e55e3e30d8268e85ebfeb;hb=4da1c78b27c63dda511d57575d294d9743fcd5db;hp=880a5606b53d7aa4b7cccde3252ab11e4100ce82;hpb=9bfd0a1c9b690a302ad8822bb23f4b6dcf6633e2;p=matches%2FMCTX3420.git diff --git a/testing/MCTXWeb/public_html/static/mctx.gui.js b/testing/MCTXWeb/public_html/static/mctx.gui.js index 880a560..b0bf602 100644 --- a/testing/MCTXWeb/public_html/static/mctx.gui.js +++ b/testing/MCTXWeb/public_html/static/mctx.gui.js @@ -1,4 +1,124 @@ +/** + * MCTX3420 2013 GUI stuff. + */ + +mctx = {}; +mctx.api = location.protocol + "//" + location.host + "/api/"; +mctx.expected_api_version = 0; +mctx.sensors = { + 0 : {name : "Strain gauge 1"}, + 1 : {name : "Strain gauge 2"}, + 2 : {name : "Strain gauge 3"}, + 3 : {name : "Strain gauge 4"}, + 4 : {name : "Pressure sensor 1"}, + 5 : {name : "Pressure sensor 2"} +}; + +mctx.actuators = { + 0 : {name : "Solenoid 1"}, + 1 : {name : "Solenoid 2"}, + 2 : {name : "Solenoid 3"}, + 3 : {name : "Pressure regulator"} +}; + +mctx.strain_gauges = {}; +mctx.strain_gauges.ids = [0, 1, 2, 3]; +mctx.strain_gauges.time_limit = 20; + function getDate(){ - var d = new Date; - document.write(d.toDateString()); -} \ No newline at end of file + document.write((new Date()).toDateString()); +} + +/** + * Populates the navigation bar + */ +$.fn.populateNavbar = function () { + var menu = $("