X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;ds=sidebyside;f=testing%2FMCTXWeb%2Fpublic_html%2Fstatic%2Fmctx.pintest.js;h=d2ea59e3542bfd31d7d6847a511ac00988dbc648;hb=989a1d2ff5f5afc20f78738f57cc829ae9d11e99;hp=7a792e82cee1a05bed02b7bcea2630e49002c6d3;hpb=9bdafbf8ef5a813c08161cb0a8b386f7c0e778e0;p=matches%2FMCTX3420.git diff --git a/testing/MCTXWeb/public_html/static/mctx.pintest.js b/testing/MCTXWeb/public_html/static/mctx.pintest.js index 7a792e8..d2ea59e 100644 --- a/testing/MCTXWeb/public_html/static/mctx.pintest.js +++ b/testing/MCTXWeb/public_html/static/mctx.pintest.js @@ -5,6 +5,7 @@ mctx.pintest = {}; +mctx.pintest.api = mctx.api + "pin"; mctx.pintest.gpios = [ 4, 5, 8, 9, 10, 11, 14, 15, 26, 27, 30, 31, 44, 45, 46, 47, 48, 49, 60, 61, 65, 66, 67, 68, 69, 70, 71, 72, @@ -12,49 +13,22 @@ mctx.pintest.gpios = [ ]; mctx.pintest.pwms = [0, 1, 2, 3, 4, 5, 6, 7]; mctx.pintest.refreshRate = 750; - - -function unexport (type, number, container, menu) { - var url = mctx.api + "pin"; - - $.ajax({url : url, data : {type : type, num : number, export : -1}}) - .fail(function () { - switch(type) { - case "adc" : - var text = container.find("input[type='text'][name='" + number + "']"); - var check = container.find("input[type='checkbox'][name='unexport']"); - text.empty(); - check.attr("checked", true); - break; - case "gpi": case "gpo" : - container.remove(); - menu.append($("