diff options
Diffstat (limited to 'util/spkmodem_recv/spkmodem-recv.c')
-rw-r--r-- | util/spkmodem_recv/spkmodem-recv.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/util/spkmodem_recv/spkmodem-recv.c b/util/spkmodem_recv/spkmodem-recv.c index d31e6f8c..a910b054 100644 --- a/util/spkmodem_recv/spkmodem-recv.c +++ b/util/spkmodem_recv/spkmodem-recv.c @@ -67,31 +67,31 @@ main () if (llp == FLUSH_TIMEOUT) fflush (stdout); - if (f2 > FREQ_SEP_MIN && f2 < FREQ_SEP_MAX - && f1 > FREQ_DATA_MIN && f1 < FREQ_DATA_MAX) { + if (f2 <= FREQ_SEP_MIN || f2 >= FREQ_SEP_MAX + || f1 <= FREQ_DATA_MIN || f1 >= FREQ_DATA_MAX) { + read_sample (); + continue; + } #if DEBUG - printf ("%d %d %d @%d\n", f1, f2, FREQ_DATA_THRESHOLD, - ftell (stdin) - sizeof (trame)); + printf ("%d %d %d @%d\n", f1, f2, FREQ_DATA_THRESHOLD, + ftell (stdin) - sizeof (trame)); #endif - if (f1 < FREQ_DATA_THRESHOLD) - c |= (1 << bitn); - bitn--; - if (bitn < 0) { + if (f1 < FREQ_DATA_THRESHOLD) + c |= (1 << bitn); + bitn--; + if (bitn < 0) { #if DEBUG - printf ("<%c, %x>", c, c); + printf ("<%c, %x>", c, c); #else - printf ("%c", c); + printf ("%c", c); #endif - bitn = 7; - c = 0; - } - lp = 0; - llp = 0; - for (i = 0; i < SAMPLES_PER_TRAME; i++) - read_sample (); - continue; + bitn = 7; + c = 0; } - read_sample (); + lp = 0; + llp = 0; + for (i = 0; i < SAMPLES_PER_TRAME; i++) + read_sample (); } return 0; } |