summaryrefslogtreecommitdiffstats
path: root/gui/static
diff options
context:
space:
mode:
Diffstat (limited to 'gui/static')
-rw-r--r--gui/static/js/odr-modulator.js6
-rw-r--r--gui/static/js/odr-predistortion.js22
2 files changed, 28 insertions, 0 deletions
diff --git a/gui/static/js/odr-modulator.js b/gui/static/js/odr-modulator.js
index 9671fb3..273d9f7 100644
--- a/gui/static/js/odr-modulator.js
+++ b/gui/static/js/odr-modulator.js
@@ -64,6 +64,7 @@ function getRc(callback) {
function requestAllParams(callback) {
getRc(function(data) {
$('#windowlength').val(data.guardinterval.windowlen.value);
+ $('#digitalgain').val(data.gain.digital.value);
$('#cfrenable').prop("checked", data.ofdm.cfr.value == 1);
$('#cfrclip').val(data.ofdm.clip.value);
$('#cfrerrorclip').val(data.ofdm.errorclip.value);
@@ -84,6 +85,11 @@ var updateTimer = setInterval(requestStats, 2000);
$(function(){
requestAllParams();
+ $('#setdigitalgain').click(function() {
+ set_rc("gain", "digital", $('#digitalgain').val(),
+ requestAllParams);
+ });
+
$('#setwindowlength').click(function() {
set_rc("guardinterval", "windowlen", $('#windowlength').val(),
requestAllParams);
diff --git a/gui/static/js/odr-predistortion.js b/gui/static/js/odr-predistortion.js
index d385f6c..dce3922 100644
--- a/gui/static/js/odr-predistortion.js
+++ b/gui/static/js/odr-predistortion.js
@@ -40,6 +40,28 @@ $(function(){
},
});
});
+
+ $('#dpdstatusbutton').click(function() {
+ $.ajax({
+ type: "GET",
+ url: "/api/dpd_status",
+ contentType: 'application/json',
+ dataType: '',
+ data: '',
+
+ error: function(data) {
+ $.gritter.add({
+ title: 'DPD Status Update',
+ text: "ERROR",
+ image: '/fonts/warning.png',
+ sticky: true,
+ });
+ },
+ success: function(data) {
+ $('#dpdstatus').val(data);
+ },
+ });
+ });
});