aboutsummaryrefslogtreecommitdiffstats
path: root/python/gui/static/js/odr-predistortion.js
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2018-12-05 12:12:45 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2018-12-05 12:12:45 +0100
commite749bd08958a462f57b8492721a04128468656d0 (patch)
tree1c3c7801ccc8985f7f4393daf8d275c5eed4a717 /python/gui/static/js/odr-predistortion.js
parent31b65e41043900c0cadd80961f4b22cdfc171e7d (diff)
downloaddabmod-e749bd08958a462f57b8492721a04128468656d0.tar.gz
dabmod-e749bd08958a462f57b8492721a04128468656d0.tar.bz2
dabmod-e749bd08958a462f57b8492721a04128468656d0.zip
Get calibration to work with GUI
Diffstat (limited to 'python/gui/static/js/odr-predistortion.js')
-rw-r--r--python/gui/static/js/odr-predistortion.js30
1 files changed, 16 insertions, 14 deletions
diff --git a/python/gui/static/js/odr-predistortion.js b/python/gui/static/js/odr-predistortion.js
index b2f1d22..04d2773 100644
--- a/python/gui/static/js/odr-predistortion.js
+++ b/python/gui/static/js/odr-predistortion.js
@@ -20,7 +20,15 @@
function resultrefresh() {
var jqxhr = doApiRequestGET("/api/dpd_results", function(data) {
- $('#dpdresults').text(data['summary']);
+ var summary = "";
+ console.log(data);
+ for (k in data['summary']) {
+ summary += data['summary'][k];
+ summary += "<br />";
+ }
+ $('#dpdresults').html(summary);
+
+ $('#dpdstatus').text(data['state']);
});
jqxhr.always(function() {
@@ -30,6 +38,13 @@ function resultrefresh() {
$(function(){
setTimeout(resultrefresh, 2000);
+
+ $('#calibratebtn').click(function() {
+ doApiRequestPOST("/api/dpd_calibrate", {}, function(data) {
+ console.log("calibrate succeeded: " + JSON.stringify(data));
+ });
+ });
+
});
/*
@@ -47,7 +62,6 @@ function calibraterefresh() {
}
$(function(){
- $('#calibraterefreshbtn').click(calibraterefresh);
$('#refreshframesbtn').click(function() {
var d = new Date();
var n = d.getTime();
@@ -55,18 +69,6 @@ $(function(){
$('#rxframeimg').src = "dpd/rxframe.png?cachebreak=" + n;
});
- $('#calibratebtn').click(function() {
- doApiRequestPOST("/api/calibrate", {}, function(data) {
- console.log("calibrate succeeded: " + JSON.stringify(data));
-
- $('#calibrationresults').text("Processing...");
-
- setTimeout(function() {
- calibraterefresh();
- }, 3000);
- });
- });
-
$('#capturebutton').click(function() {
doApiRequestPOST("/api/trigger_capture", {}, function(data) {
console.log("trigger_capture succeeded: " + JSON.stringify(data));