aboutsummaryrefslogtreecommitdiffstats
path: root/python/gui/static
diff options
context:
space:
mode:
Diffstat (limited to 'python/gui/static')
-rw-r--r--python/gui/static/js/odr-home.js24
1 files changed, 21 insertions, 3 deletions
diff --git a/python/gui/static/js/odr-home.js b/python/gui/static/js/odr-home.js
index 56c8eb4..b74c4c8 100644
--- a/python/gui/static/js/odr-home.js
+++ b/python/gui/static/js/odr-home.js
@@ -32,7 +32,6 @@ function apiRequestChain(uri, get_data, success_callback, fail_callback) {
fail_callback(data.responseText);
},
success: function(data) {
- console.log("GET " + JSON.stringify(get_data) + " success: " + JSON.stringify(data));
if (data.status == 'ok') {
success_callback(data.data);
}
@@ -109,9 +108,8 @@ function check_modulating(last_num_frames) {
}
else {
mark_ok('is_modulating', "Number of frames modulated: " + data);
- check_underrunning(0, 0);
- check_late(0, 0);
}
+ check_gpsdo_ok();
}
}
else {
@@ -123,6 +121,26 @@ function check_modulating(last_num_frames) {
});
}
+function check_gpsdo_ok() {
+ mark_pending('is_gpsdo_ok');
+ apiRequestChain("/api/parameter",
+ {controllable: 'sdr', param: 'gpsdo_num_sv'},
+ function(data) {
+ if (data > 3) {
+ mark_ok('is_gpsdo_ok', "Number of SVs used: " + data);
+ }
+ else {
+ mark_fail('is_gpsdo_ok', "Number of SVs (" + data + ") is too low");
+ }
+ check_underrunning(0, 0);
+ check_late(0, 0);
+ },
+ function(data) {
+ mark_fail('is_gpsdo_ok', json.parse(data)['reason']);
+ });
+}
+
+
function check_underrunning(iteration, first_underruns) {
var n_checks = 3;