aboutsummaryrefslogtreecommitdiffstats
path: root/python/gui
diff options
context:
space:
mode:
Diffstat (limited to 'python/gui')
-rw-r--r--python/gui/static/js/odr-predistortion.js17
-rw-r--r--python/gui/templates/predistortion.html31
2 files changed, 27 insertions, 21 deletions
diff --git a/python/gui/static/js/odr-predistortion.js b/python/gui/static/js/odr-predistortion.js
index 739e0ee..e9f7c96 100644
--- a/python/gui/static/js/odr-predistortion.js
+++ b/python/gui/static/js/odr-predistortion.js
@@ -35,6 +35,10 @@ function resultrefresh() {
}
$('#dpdprogress').css('width', percentage + '%');
$('#dpdprogresstext').text(percentage + '%');
+
+ if (data['statplot']) {
+ $('#dpdcapturestats').attr('src', data['statplot']);
+ }
});
jqxhr.always(function() {
@@ -43,7 +47,7 @@ function resultrefresh() {
}
$(function(){
- setTimeout(resultrefresh, 2000);
+ setTimeout(resultrefresh, 20);
$('#calibratebtn').click(function() {
doApiRequestPOST("/api/dpd_calibrate", {}, function(data) {
@@ -51,6 +55,17 @@ $(function(){
});
});
+ $('#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 edb2f04..adbba7e 100644
--- a/python/gui/templates/predistortion.html
+++ b/python/gui/templates/predistortion.html
@@ -26,35 +26,26 @@
<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>
- </div>
- </div>
- <!--
- <div class="panel panel-default">
- <div class="panel-heading">Capture TX and RX frames</div>
- <div class="panel-body">
- <div>
- <img id="txframeimg" src="dpd/txframe.png" width="320" height="240" />
- <img id="rxframeimg" src="dpd/rxframe.png" width="320" height="240" />
- </div>
- <div>
- <button type="button" class="btn btn-sm btn-info" id="refreshframesbtn">
- Refresh</button>
- </div>
+ <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-info" id="resetbtn">
+ Reset captured data</button>
</div>
</div>
<div class="panel panel-default">
- <div class="panel-heading">Capture</div>
+ <div class="panel-heading">Capture Statistics</div>
<div class="panel-body">
- <div>On pressing this button,
- the DPDCE will trigger a capture and a quick data
- analysis, without updating any DPD models.</div>
- <button type="button" class="btn btn-sm btn-info" id="capturebutton">
- Capture</button>
+ <img id="dpdcapturestats" />
</div>
</div>
+
+ <!--
<div class="panel panel-default">
<div class="panel-heading">Status</div>
<div class="panel-body">