diff --git a/src/minimodem.c b/src/minimodem.c index 4b3e17e..4152cbe 100644 --- a/src/minimodem.c +++ b/src/minimodem.c @@ -877,15 +877,23 @@ main( int argc, char*argv[] ) // start--v v--stop // char *expect_bits_string = "10dddddddd1"; // - char expect_bits_string[33] = "dddddddddddddddddddddddddddddddd"; + char expect_bits_string[33]; int j = 0; if ( bfsk_nstopbits != 0.0 ) expect_bits_string[j++] = '1'; if ( bfsk_nstartbits != 0 ) // FIXME -- sets only one start bit expect_bits_string[j++] = '0'; + int i; + for ( i=0; i>i)&1 ) + '0'; + else + expect_bits_string[j] = 'd'; + } if ( bfsk_nstopbits != 0.0 ) - expect_bits_string[bfsk_n_data_bits + j++] = '1'; - expect_bits_string[bfsk_n_data_bits + j++] = 0; + expect_bits_string[j++] = '1'; + expect_bits_string[j++] = 0; + unsigned int expect_n_bits = strlen(expect_bits_string); unsigned int expect_nsamples = nsamples_per_bit * expect_n_bits; @@ -947,11 +955,6 @@ main( int argc, char*argv[] ) confidence, amplitude, track_amplitude ); } - if ( bfsk_sync_on_data ) { - if ( ! carrier && bits != bfsk_sync_byte ) - confidence = 0.0; - } - #define FSK_MAX_NOCONFIDENCE_BITS 20 if ( confidence <= fsk_confidence_threshold ) {