Loading index.html +8 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,9 @@ <button type="button" onclick="setStagePositionsFromInput();">GO</button> <button type="button" onclick="getStagePositions();">Update</button> </p> <p> <button type="button" onclick="doAutofocus();">Autofocus</button> </p> <p> Doubleclick to position: <input type="checkbox" id="clickPositionCheck" checked><br> Loading Loading @@ -74,6 +77,11 @@ <p>Scroll to focus: <input type="checkbox" id="scrollFocusCheck" checked></p> <h4>Camera:</h4> <div class="flexbox"> <button type="button" onclick="calibrateCamera();">Recalibrate Camera</button> </div> </div> <div class="column middle"> Loading static/main.js +11 −0 Original line number Diff line number Diff line Loading @@ -356,6 +356,17 @@ addEventListener("keyup", function (e) { delete keysDown[e.keyCode]; //Remove key from array }, false); function ignoreCallback(value=null, code=0){ console.log("Intentionally ignoring a callback: ", value, code); } function doAutofocus(payload=null, callback=ignoreCallback){ safeRequest("POST", baseURI+"/plugin/default/autofocus/autofocus", payload, callback); } function calibrateCamera(callback=ignoreCallback){ safeRequest("POST", baseURI+"/plugin/default/camera_calibration/recalibrate/", null, callback); } // Methods for making requests function safeRequest(method, url, payload, callback, lock=true, force=false) { if (force == true) { Loading Loading
index.html +8 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,9 @@ <button type="button" onclick="setStagePositionsFromInput();">GO</button> <button type="button" onclick="getStagePositions();">Update</button> </p> <p> <button type="button" onclick="doAutofocus();">Autofocus</button> </p> <p> Doubleclick to position: <input type="checkbox" id="clickPositionCheck" checked><br> Loading Loading @@ -74,6 +77,11 @@ <p>Scroll to focus: <input type="checkbox" id="scrollFocusCheck" checked></p> <h4>Camera:</h4> <div class="flexbox"> <button type="button" onclick="calibrateCamera();">Recalibrate Camera</button> </div> </div> <div class="column middle"> Loading
static/main.js +11 −0 Original line number Diff line number Diff line Loading @@ -356,6 +356,17 @@ addEventListener("keyup", function (e) { delete keysDown[e.keyCode]; //Remove key from array }, false); function ignoreCallback(value=null, code=0){ console.log("Intentionally ignoring a callback: ", value, code); } function doAutofocus(payload=null, callback=ignoreCallback){ safeRequest("POST", baseURI+"/plugin/default/autofocus/autofocus", payload, callback); } function calibrateCamera(callback=ignoreCallback){ safeRequest("POST", baseURI+"/plugin/default/camera_calibration/recalibrate/", null, callback); } // Methods for making requests function safeRequest(method, url, payload, callback, lock=true, force=false) { if (force == true) { Loading