aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2019-01-22 11:40:26 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2019-01-22 11:40:26 +0100
commit2b3cf8e158901ae7d20dd330c34a14947191606e (patch)
tree11edf32a55e69a4ec584fde5c5a74486cbb103f3
parentd7a0913ead6724bfd508a5480c7014b2516975ce (diff)
downloaddabmod-2b3cf8e158901ae7d20dd330c34a14947191606e.tar.gz
dabmod-2b3cf8e158901ae7d20dd330c34a14947191606e.tar.bz2
dabmod-2b3cf8e158901ae7d20dd330c34a14947191606e.zip
GUI: Check for late packets
-rw-r--r--python/gui/static/js/odr-home.js29
-rw-r--r--python/gui/templates/home.html4
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