summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/spkmodem_recv/spkmodem-recv.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/util/spkmodem_recv/spkmodem-recv.c b/util/spkmodem_recv/spkmodem-recv.c
index ecee6fbb..5efa25a7 100644
--- a/util/spkmodem_recv/spkmodem-recv.c
+++ b/util/spkmodem_recv/spkmodem-recv.c
@@ -36,8 +36,7 @@ read_sample (void)
fread (trame + ringpos, 1, sizeof (trame[0]), stdin);
amplitude += abs (trame[ringpos]);
- if (pos ? (trame[ringpos] < -THRESHOLD)
- : (trame[ringpos] > +THRESHOLD)) {
+ if (abs(trame[ringpos]) > THRESHOLD) { /* rising/falling edge(pulse) */
pulse[ringpos] = 1;
pos = !pos;
f2++;