diff options
Diffstat (limited to 'python')
-rw-r--r-- | python/gui/static/js/odr-home.js | 29 | ||||
-rw-r--r-- | python/gui/templates/home.html | 4 |
2 files changed, 33 insertions, 0 deletions
diff --git a/python/gui/static/js/odr-home.js b/python/gui/static/js/odr-home.js index 2fa873a..56c8eb4 100644 --- a/python/gui/static/js/odr-home.js +++ b/python/gui/static/js/odr-home.js @@ -110,6 +110,7 @@ function check_modulating(last_num_frames) { else { mark_ok('is_modulating', "Number of frames modulated: " + data); check_underrunning(0, 0); + check_late(0, 0); } } } @@ -151,6 +152,34 @@ function check_underrunning(iteration, first_underruns) { }); } +function check_late(iteration, first_late) { + var n_checks = 3; + + apiRequestChain("/api/parameter", + {controllable: 'sdr', param: 'latepackets'}, + function(data) { + if (iteration == 0) { + mark_pending('is_late', "Checking for late packets"); + setTimeout(function() { check_late(iteration+1, data); }, 2000); + } + else if (iteration < n_checks) { + mark_pending('is_late', "Check " + iteration + "/" + n_checks + "..."); + setTimeout(function() { check_late(iteration+1, first_late); }, 2000); + } + else { + if (data == first_late) { + mark_ok('is_late', "Number of late packets is not increasing: " + data); + } + else { + mark_fail('is_late', "Late packets observed in last " + n_checks + " seconds: " + data); + } + } + }, + function(data) { + mark_fail('is_late', data); + }); +} + function check_rate_4x() { mark_pending('is_rate_4x'); apiRequestChain("/api/parameter", diff --git a/python/gui/templates/home.html b/python/gui/templates/home.html index d1c8d02..f89e18f 100644 --- a/python/gui/templates/home.html +++ b/python/gui/templates/home.html @@ -27,6 +27,10 @@ <span id="is_underrunning" class="glyphicon glyphicon-question-sign"></span> <span id="is_underrunning_comment"><span> </li> + <li>Late packets: + <span id="is_late" class="glyphicon glyphicon-question-sign"></span> + <span id="is_late_comment"><span> + </li> </ul> <p>Checking predistortion |