X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=testing%2FMCTXWeb%2Fpublic_html%2Fcontrol.html;h=034a50ce4e883e17eead2fe98a5ff828646a7ee4;hb=HEAD;hp=60817cf2e843477b9ebf43b99ba1642bb1d44bf8;hpb=19c48bb0707a0a92aa713e125cbd070295621383;p=matches%2FMCTX3420.git diff --git a/testing/MCTXWeb/public_html/control.html b/testing/MCTXWeb/public_html/control.html index 60817cf..034a50c 100644 --- a/testing/MCTXWeb/public_html/control.html +++ b/testing/MCTXWeb/public_html/control.html @@ -18,13 +18,16 @@ $(document).ready(function () { $("form").submit(function () { //Prevent form submit globally return false; - }) + }).trigger("reset"); //Reset forms + + //Force enable start buttons if previously disabled + $("#start-controls input[type='button']").removeAttr("disabled"); //Set the status updated $("#state-exp").setStatusUpdater(); //Set the logic for the start controls - $("#start-controls").submit(function () { + $("#start-controls input[type='button']").click(function () { var start = $("#start-controls input[type='button']"); var force = $("#start-controls input[name='start_force']"); @@ -48,6 +51,34 @@ }; $(this).setPressure(pressure, $("#pressure-result")); }); + + $("#pressure-controls input[name='clear']").click(function () { + $("#pressure-controls")[0].reset(); + $("#pressure-result").text(""); + }); + + $("#pressure-controls input[name='zero']").click(function () { + $("#pressure-controls input[name='clear']").click(); + $("#pressure-set").val("0"); + + $("#pressure-controls").submit(); + }); + + $("#pressure-controls input[name='step-it']").click(function () { + var pressure = { + set : $("#pressure-set").val(), step : "", wait : "", count : "" + }; + + $(this).setPressure(pressure, $("#pressure-result")).done(function () { + var next = Number($("#pressure-set").val()) + Number($("#pressure-stepsize").val()); + $("#pressure-set").val(next.toString()); + }); + + }); + $("#samplerate-controls").submit(function () { + setSampleRate($("#sensor-select option:selected").val(), + $("#sensor-set").val(), $("#samplerate-result")); + }); }); }).fail(function () { $(document).ready(function () { @@ -76,6 +107,7 @@
+
@@ -106,6 +138,7 @@
  • Home
  • Experiment control
  • Experiment graphs
  • +
  • Experiment data (live)
  • Experiment data
  • Pin debugging
  • Help
  • @@ -150,8 +183,8 @@  

    - - + +

    @@ -177,53 +210,35 @@

    - +  

    + + +

    - - -
    -
    + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - + +
    Link
    +

    +   +

    +

    + +

    -