summaryrefslogtreecommitdiffstats
path: root/gui/static/js/odr-predistortion.js
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2018-11-28 11:11:22 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2018-11-28 11:11:22 +0100
commitcfa9461f269e616d6d54658d583b37d215f35a7b (patch)
treebc56977f6479c297521dff9564ba6ecbffe00a52 /gui/static/js/odr-predistortion.js
parentee435c029eac59e0399dc3ae765cc74d66b9442e (diff)
downloaddabmod-cfa9461f269e616d6d54658d583b37d215f35a7b.tar.gz
dabmod-cfa9461f269e616d6d54658d583b37d215f35a7b.tar.bz2
dabmod-cfa9461f269e616d6d54658d583b37d215f35a7b.zip
GUI: Add part of calibration routine
Diffstat (limited to 'gui/static/js/odr-predistortion.js')
-rw-r--r--gui/static/js/odr-predistortion.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/gui/static/js/odr-predistortion.js b/gui/static/js/odr-predistortion.js
index 4e86f1c..01992d7 100644
--- a/gui/static/js/odr-predistortion.js
+++ b/gui/static/js/odr-predistortion.js
@@ -19,6 +19,18 @@
// along with ODR-DabMod. If not, see <http://www.gnu.org/licenses/>.
$(function(){
+ $('#calibrate').click(function() {
+ doApiRequestPOST("/api/calibrate", {}, function(data) {
+ console.log("calibrate succeeded: " + JSON.stringify(data));
+
+ setTimeout(function() {
+ doApiRequestGET("/api/calibrate", function(data) {
+ $('#calibrationresults').text(data);
+ });
+ }, 2000);
+ });
+ });
+
$('#capturebutton').click(function() {
doApiRequestPOST("/api/trigger_capture", {}, function(data) {
console.log("trigger_capture succeeded: " + JSON.stringify(data));