summaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/gui/static/js/odr-home.js24
-rw-r--r--python/gui/templates/home.html4
2 files changed, 25 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;
diff --git a/python/gui/templates/home.html b/python/gui/templates/home.html
index f89e18f..398df37 100644
--- a/python/gui/templates/home.html
+++ b/python/gui/templates/home.html
@@ -23,6 +23,10 @@
<span id="is_modulating" class="glyphicon glyphicon-question-sign"></span>
<span id="is_modulating_comment"><span>
</li>
+ <li>GPSDO status:
+ <span id="is_gpsdo_ok" class="glyphicon glyphicon-question-sign"></span>
+ <span id="is_gpsdo_ok_comment"><span>
+ </li>
<li>Underruns:
<span id="is_underrunning" class="glyphicon glyphicon-question-sign"></span>
<span id="is_underrunning_comment"><span>