Skip to content
Snippets Groups Projects
Commit eb1b259d authored by Leah Rowe's avatar Leah Rowe
Browse files

util/spkmodem_recv: simplified pulse check


Signed-off-by: default avatarLeah Rowe <leah@libreboot.org>
parent 65f45ffd
Branches
No related merge requests found
......@@ -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++;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment