minimodem: --binary-output
This commit is contained in:
parent
a172268117
commit
7b0e47ac4e
|
@ -122,6 +122,12 @@ default 16-bit signed integer format (applies to \-\-tx mode only;
|
||||||
.B \-\-rx-one
|
.B \-\-rx-one
|
||||||
Quit after the first carrier/no-carrier event (applies to \-\-rx mode only).
|
Quit after the first carrier/no-carrier event (applies to \-\-rx mode only).
|
||||||
.TP
|
.TP
|
||||||
|
.B \-\-binary-output
|
||||||
|
Print received data bits as raw binary output using characters '0' and '1'.
|
||||||
|
The bits are printed in the order they are received. Framing bits (start
|
||||||
|
and stop bits) are omitted from the output.
|
||||||
|
(This option applies to \-\-rx mode only).
|
||||||
|
.TP
|
||||||
.B \-\-benchmarks
|
.B \-\-benchmarks
|
||||||
Run and report internal performance tests (all other flags are ignored).
|
Run and report internal performance tests (all other flags are ignored).
|
||||||
.TP
|
.TP
|
||||||
|
|
|
@ -300,6 +300,7 @@ usage()
|
||||||
" --float-samples\n"
|
" --float-samples\n"
|
||||||
" --rx-one\n"
|
" --rx-one\n"
|
||||||
" --benchmarks\n"
|
" --benchmarks\n"
|
||||||
|
" --binary-output\n"
|
||||||
" {baudmode}\n"
|
" {baudmode}\n"
|
||||||
" 1200 Bell202 1200 bps --ascii\n"
|
" 1200 Bell202 1200 bps --ascii\n"
|
||||||
" 300 Bell103 300 bps --ascii\n"
|
" 300 Bell103 300 bps --ascii\n"
|
||||||
|
@ -354,6 +355,8 @@ main( int argc, char*argv[] )
|
||||||
unsigned int rx_one = 0;
|
unsigned int rx_one = 0;
|
||||||
float rxnoise_factor = 0.0;
|
float rxnoise_factor = 0.0;
|
||||||
|
|
||||||
|
int output_mode_binary = 0;
|
||||||
|
|
||||||
/* validate the default system audio mechanism */
|
/* validate the default system audio mechanism */
|
||||||
#if !(USE_PULSEAUDIO || USE_ALSA)
|
#if !(USE_PULSEAUDIO || USE_ALSA)
|
||||||
# define _MINIMODEM_NO_SYSTEM_AUDIO
|
# define _MINIMODEM_NO_SYSTEM_AUDIO
|
||||||
|
@ -380,6 +383,7 @@ main( int argc, char*argv[] )
|
||||||
MINIMODEM_OPT_FLOAT_SAMPLES,
|
MINIMODEM_OPT_FLOAT_SAMPLES,
|
||||||
MINIMODEM_OPT_RX_ONE,
|
MINIMODEM_OPT_RX_ONE,
|
||||||
MINIMODEM_OPT_BENCHMARKS,
|
MINIMODEM_OPT_BENCHMARKS,
|
||||||
|
MINIMODEM_OPT_BINARY_OUTPUT,
|
||||||
MINIMODEM_OPT_XRXNOISE,
|
MINIMODEM_OPT_XRXNOISE,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -412,6 +416,7 @@ main( int argc, char*argv[] )
|
||||||
{ "float-samples", 0, 0, MINIMODEM_OPT_FLOAT_SAMPLES },
|
{ "float-samples", 0, 0, MINIMODEM_OPT_FLOAT_SAMPLES },
|
||||||
{ "rx-one", 0, 0, MINIMODEM_OPT_RX_ONE },
|
{ "rx-one", 0, 0, MINIMODEM_OPT_RX_ONE },
|
||||||
{ "benchmarks", 0, 0, MINIMODEM_OPT_BENCHMARKS },
|
{ "benchmarks", 0, 0, MINIMODEM_OPT_BENCHMARKS },
|
||||||
|
{ "binary-output", 0, 0, MINIMODEM_OPT_BINARY_OUTPUT },
|
||||||
{ "Xrxnoise", 1, 0, MINIMODEM_OPT_XRXNOISE },
|
{ "Xrxnoise", 1, 0, MINIMODEM_OPT_XRXNOISE },
|
||||||
{ 0 }
|
{ 0 }
|
||||||
};
|
};
|
||||||
|
@ -510,6 +515,9 @@ main( int argc, char*argv[] )
|
||||||
benchmarks();
|
benchmarks();
|
||||||
exit(0);
|
exit(0);
|
||||||
break;
|
break;
|
||||||
|
case MINIMODEM_OPT_BINARY_OUTPUT:
|
||||||
|
output_mode_binary = 1;
|
||||||
|
break;
|
||||||
case MINIMODEM_OPT_XRXNOISE:
|
case MINIMODEM_OPT_XRXNOISE:
|
||||||
rxnoise_factor = atof(optarg);
|
rxnoise_factor = atof(optarg);
|
||||||
break;
|
break;
|
||||||
|
@ -592,6 +600,9 @@ main( int argc, char*argv[] )
|
||||||
assert( 0 && bfsk_n_data_bits );
|
assert( 0 && bfsk_n_data_bits );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( output_mode_binary )
|
||||||
|
bfsk_databits_decode = databits_decode_binary;
|
||||||
|
|
||||||
if ( bfsk_data_rate >= 400 ) {
|
if ( bfsk_data_rate >= 400 ) {
|
||||||
/*
|
/*
|
||||||
* Bell 202: baud=1200 mark=1200 space=2200
|
* Bell 202: baud=1200 mark=1200 space=2200
|
||||||
|
|
Loading…
Reference in New Issue