From aa3abebd804129f2eff361a1b4f21d0c04c61cfd Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Wed, 19 Dec 2018 17:13:40 +0100 Subject: GUI: Add adapt step to DPD --- python/gui/api.py | 9 +++++++ python/gui/static/js/odr-predistortion.js | 18 ++++++++++---- python/gui/templates/predistortion.html | 39 ++++++++++++++++++++----------- 3 files changed, 48 insertions(+), 18 deletions(-) (limited to 'python/gui') diff --git a/python/gui/api.py b/python/gui/api.py index bff224e..42c89c9 100755 --- a/python/gui/api.py +++ b/python/gui/api.py @@ -105,6 +105,15 @@ class API: cherrypy.response.status = 400 return send_error("POST only") + @cherrypy.expose + @cherrypy.tools.json_out() + def dpd_adapt(self, **kwargs): + if cherrypy.request.method == 'POST': + return self._wrap_dpd("adapt") + else: + cherrypy.response.status = 400 + return send_error("POST only") + @cherrypy.expose @cherrypy.tools.json_out() def dpd_reset(self, **kwargs): diff --git a/python/gui/static/js/odr-predistortion.js b/python/gui/static/js/odr-predistortion.js index f46219c..b5f29ea 100644 --- a/python/gui/static/js/odr-predistortion.js +++ b/python/gui/static/js/odr-predistortion.js @@ -67,17 +67,25 @@ $(function(){ }); }); + $('#triggerbtn').click(function() { + doApiRequestPOST("/api/dpd_trigger_run", {}, function(data) { + console.log("run succeeded: " + JSON.stringify(data)); + }); + }); + + $('#adaptbtn').click(function() { + doApiRequestPOST("/api/dpd_adapt", {}, function(data) { + console.log("adapt succeeded: " + JSON.stringify(data)); + }); + }); + + $('#resetbtn').click(function() { doApiRequestPOST("/api/dpd_reset", {}, function(data) { console.log("reset succeeded: " + JSON.stringify(data)); }); }); - $('#triggerbtn').click(function() { - doApiRequestPOST("/api/dpd_trigger_run", {}, function(data) { - console.log("run succeeded: " + JSON.stringify(data)); - }); - }); }); /* diff --git a/python/gui/templates/predistortion.html b/python/gui/templates/predistortion.html index d102101..8682054 100644 --- a/python/gui/templates/predistortion.html +++ b/python/gui/templates/predistortion.html @@ -11,28 +11,41 @@
Status and calibration
-
Current DPDCE status: -
-
N/A
-
-
- + +
+
+
+

Current DPDCE status

+
+
N/A
+
+
+ +
+
+
N/A
+
+
+

Summary

+

Calibration needs to be done once before the PA model + can be trained. Every time calibration is changed, the predistortion + parameters are invalidated!

+

Once calibration succeeded and correct RX gain is set, you + can trigger a capture and model the PA. Usually, several capture + runs are needed before the model can be trained.

+

The capture and model analysis will calculate a new set of + DPD model data, that you can apply using the Update Predistorter button.

-
N/A
-
Calibration needs to be done once before the PA model - can be trained. Every time calibration is changed, the predistortion - parameters are invalidated!
-
Once calibration succeeded and correct RX gain is set, you - can trigger a capture and model the PA. Usually, several capture - runs are needed before the model can be trained.
+
-- cgit v1.2.3