util/spkmodem_recv: simplified pulse check

Signed-off-by: Leah Rowe <leah@libreboot.org>
fsdg20230625
Leah Rowe 2023-05-16 08:13:46 +01:00
parent 88683b767b
commit 3722c1e67a
1 changed files with 1 additions and 2 deletions

View File

@ -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++;