aboutsummaryrefslogtreecommitdiffstats
path: root/python/gui
diff options
context:
space:
mode:
Diffstat (limited to 'python/gui')
-rwxr-xr-xpython/gui/api.py9
-rw-r--r--python/gui/static/js/odr-predistortion.js18
-rw-r--r--python/gui/templates/predistortion.html39
3 files changed, 48 insertions, 18 deletions
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
@@ -107,6 +107,15 @@ class API:
@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):
if cherrypy.request.method == 'POST':
return self._wrap_dpd("reset")
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 @@
<div class="panel panel-default">
<div class="panel-heading">Status and calibration</div>
<div class="panel-body">
- <div>Current DPDCE status:
- <div>
- <div id="dpdstatus" style="font-weight:bold;">N/A</div>
- <div class="progress">
- <div id="dpdprogress" class="progress-bar" role="progressbar" style="width:0%">
- <span id="dpdprogresstext"></span>
+
+ <div class="container-fluid">
+ <div class="row">
+ <div class="col-sm-8">
+ <h2>Current DPDCE status</h2>
+ <div>
+ <div id="dpdstatus" style="font-weight:bold;">N/A</div>
+ <div class="progress">
+ <div id="dpdprogress" class="progress-bar" role="progressbar" style="width:0%">
+ <span id="dpdprogresstext"></span>
+ </div>
+ </div>
</div>
+ <div class="well well-sm" id="dpdresults">N/A</div>
+ </div>
+ <div class="col-sm-4">
+ <h2>Summary</h2>
+ <p>Calibration needs to be done once before the PA model
+ can be trained. Every time calibration is changed, the predistortion
+ parameters are invalidated!</p>
+ <p>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.</p>
+ <p>The capture and model analysis will calculate a new set of
+ DPD model data, that you can apply using the Update Predistorter button.</p>
</div>
</div>
- <div class="well well-sm" id="dpdresults">N/A</div>
</div>
- <div>Calibration needs to be done once before the PA model
- can be trained. Every time calibration is changed, the predistortion
- parameters are invalidated!</div>
- <div>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.</div>
<button type="button" class="btn btn-sm btn-warning" id="calibratebtn">
Calibrate</button>
<button type="button" class="btn btn-sm btn-warning" id="triggerbtn">
Trigger Capture and PA Modeling</button>
+ <button type="button" class="btn btn-sm btn-warning" id="adaptbtn">
+ Update Predistorter</button>
<button type="button" class="btn btn-sm btn-info" id="resetbtn">
Reset captured data</button>
</div>