mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-19 09:32:27 +02:00
util/spkmodem_recv: simplified pulse check
Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -36,8 +36,7 @@ read_sample (void)
|
|||||||
fread (trame + ringpos, 1, sizeof (trame[0]), stdin);
|
fread (trame + ringpos, 1, sizeof (trame[0]), stdin);
|
||||||
amplitude += abs (trame[ringpos]);
|
amplitude += abs (trame[ringpos]);
|
||||||
|
|
||||||
if (pos ? (trame[ringpos] < -THRESHOLD)
|
if (abs(trame[ringpos]) > THRESHOLD) { /* rising/falling edge(pulse) */
|
||||||
: (trame[ringpos] > +THRESHOLD)) {
|
|
||||||
pulse[ringpos] = 1;
|
pulse[ringpos] = 1;
|
||||||
pos = !pos;
|
pos = !pos;
|
||||||
f2++;
|
f2++;
|
||||||
|
|||||||
Reference in New Issue
Block a user