From 3b47437ce9a130c494750fc40a381a58bfbb31ca Mon Sep 17 00:00:00 2001
From: Richard Bowman
Date: Thu, 31 Jan 2019 19:02:40 +0000
Subject: [PATCH] Added buttons for autofocus and recalibration
---
index.html | 8 ++++++++
static/main.js | 11 +++++++++++
2 files changed, 19 insertions(+)
diff --git a/index.html b/index.html
index 7c3189bb..e2b28d1f 100644
--- a/index.html
+++ b/index.html
@@ -27,6 +27,9 @@
+
+
+
Doubleclick to position:
@@ -74,6 +77,11 @@
Scroll to focus:
+ Camera:
+
+
+
+
diff --git a/static/main.js b/static/main.js
index 53cd3c7d..5ec72493 100644
--- a/static/main.js
+++ b/static/main.js
@@ -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) {