diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2019-01-22 10:08:21 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2019-01-22 10:08:21 +0100 |
commit | 77cfae162dea6195e8869c95db8876bbaf98fad1 (patch) | |
tree | 470a8c3f2f85c04a0c67df64c80c17ccf26533d9 /python/gui/static/js | |
parent | bedf7e60522bb34b19f4a28b8866aea7062c9054 (diff) | |
download | dabmod-77cfae162dea6195e8869c95db8876bbaf98fad1.tar.gz dabmod-77cfae162dea6195e8869c95db8876bbaf98fad1.tar.bz2 dabmod-77cfae162dea6195e8869c95db8876bbaf98fad1.zip |
GUI: Check modulator rate on home screen
Diffstat (limited to 'python/gui/static/js')
-rw-r--r-- | python/gui/static/js/odr-home.js | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/python/gui/static/js/odr-home.js b/python/gui/static/js/odr-home.js index 11aed8e..9498ae7 100644 --- a/python/gui/static/js/odr-home.js +++ b/python/gui/static/js/odr-home.js @@ -95,7 +95,7 @@ function check_modulating(last_num_frames) { } else { mark_ok('is_modulating', "Number of frames modulated: " + data); - check_dpdce_running(); + check_rate_4x(); } } } @@ -108,10 +108,28 @@ function check_modulating(last_num_frames) { }); } +function check_rate_4x() { + mark_pending('is_rate_4x'); + apiRequestChain("/api/parameter", + {controllable: 'modulator', param: 'rate'}, + function(data) { + if (data == 8192000) { + mark_ok('is_rate_4x', "Samplerate: " + data); + check_dpdce_running(); + } + else { + mark_fail('is_rate_4x', "Samplerate is not 8192ksps: " + data); + } + }, + function(data) { + mark_fail('is_rate_4x', JSON.parse(data)['reason']); + }); +} + function check_dpdce_running() { mark_pending('is_dpdce_running'); apiRequestChain("/api/dpd_results", - {controllable: 'sdr', param: 'frames'}, + {}, function(data) { mark_ok('is_dpdce_running', "State: " + data['state']); mark_ok('overall_state'); |