IEEE 802.15.4 subsystem
Sign in or create your account | Project List | Help
IEEE 802.15.4 subsystem Commit Details
Date: | 2010-12-01 14:59:27 (13 years 3 months ago) |
---|---|
Author: | Werner Almesberger |
Commit: | 8ea171512bf81c6eae91399cfaa2c28fa7bce67b |
Message: | usrp/range: more useful diagnostic output and harden against
underflows - usrp/range: ignore "-inf" values - usrp/range: print the average value when reporting an outlier |
Files: |
usrp/range (2 diffs) |
Change Details
usrp/range | ||
---|---|---|
22 | 22 | |
23 | 23 | while (<>) { |
24 | 24 | chop; |
25 | next if $_ eq "-inf"; | |
25 | 26 | push(@v, $_); |
26 | 27 | $s += $_; |
27 | 28 | } |
... | ... | |
30 | 31 | $n = 0; |
31 | 32 | for (@v) { |
32 | 33 | $n++; |
34 | next if $_ eq "-inf"; | |
33 | 35 | if ($_ < $avg-$tol || $_ > $avg+$tol) { |
34 | print STDERR "sample $n is outlier: $_\n" if $verbose; | |
36 | print STDERR "sample $n is outlier ($avg): $_\n" if $verbose; | |
35 | 37 | next; |
36 | 38 | } |
37 | 39 | $sum += $_; |