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 | |
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')
-rw-r--r-- | python/gui/static/js/odr-home.js | 22 | ||||
-rw-r--r-- | python/gui/templates/home.html | 4 |
2 files changed, 24 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'); diff --git a/python/gui/templates/home.html b/python/gui/templates/home.html index bf802d6..0a0713a 100644 --- a/python/gui/templates/home.html +++ b/python/gui/templates/home.html @@ -27,6 +27,10 @@ <p>Checking predistortion <ul> + <li>Sample rate at 4x native rate: + <span id="is_rate_4x" class="glyphicon glyphicon-question-sign"></span> + <span id="is_rate_4x_comment"><span> + </li> <li>DPDCE running: <span id="is_dpdce_running" class="glyphicon glyphicon-question-sign"></span> <span id="is_dpdce_running_comment"><span> |