diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2019-01-22 11:50:01 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2019-01-22 11:50:01 +0100 |
commit | e352ec38c20d626a4359c684abea23ef92a41470 (patch) | |
tree | 59185f882acd8e2217b6651adcfbfd3240769b73 /python/gui/static/js | |
parent | 2b3cf8e158901ae7d20dd330c34a14947191606e (diff) | |
download | dabmod-e352ec38c20d626a4359c684abea23ef92a41470.tar.gz dabmod-e352ec38c20d626a4359c684abea23ef92a41470.tar.bz2 dabmod-e352ec38c20d626a4359c684abea23ef92a41470.zip |
GUI: Check GPSDO status
Diffstat (limited to 'python/gui/static/js')
-rw-r--r-- | python/gui/static/js/odr-home.js | 24 |
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; |