Cleanup SDR usage when no channel, but full spectrum is used.

Radio and TV uses full spectrum, so they set channels to 0, this will
define a center frequency only. The spectrum is then processed by the
applications and not by libsdr.

The sample rate must be a factor of 1e9, so that time stamps work
and signal has no gaps/glitchs.
This commit is contained in:
Andreas Eversberg
2021-12-05 12:46:19 +01:00
parent 726453909c
commit 2d23c841a6
4 changed files with 17 additions and 16 deletions

View File

@@ -228,7 +228,7 @@ static int handle_options(int short_option, int argi, char **argv)
"--sdr-tx-gain", "50",
"--sdr-lo-offset", "-3000000",
"--sdr-bandwidth", "60000000",
"-s", "13750000",
"-s", "12500000",
};
int argc_lime = sizeof(argv_lime) / sizeof (*argv_lime);
return options_command_line(argc_lime, argv_lime, handle_options);
@@ -242,7 +242,7 @@ static int handle_options(int short_option, int argi, char **argv)
"--sdr-tx-gain", "50",
"--sdr-lo-offset", "-3000000",
"--sdr-bandwidth", "60000000",
"-s", "13750000",
"-s", "12500000",
};
int argc_lime = sizeof(argv_lime) / sizeof (*argv_lime);
return options_command_line(argc_lime, argv_lime, handle_options);
@@ -333,7 +333,7 @@ static void tx_bas(sample_t *sample_bas, __attribute__((__unused__)) sample_t *s
tx_frequencies[0] = frequency;
rx_frequencies[0] = frequency;
am[0] = 0;
sdr = sdr_open(NULL, tx_frequencies, rx_frequencies, am, 1, 0.0, dsp_samplerate, buffer_size, 1.0, 0.0, 0.0, 0.0);
sdr = sdr_open(NULL, tx_frequencies, rx_frequencies, am, 0, 0.0, dsp_samplerate, buffer_size, 1.0, 0.0, 0.0, 0.0);
if (!sdr)
goto error;
sdr_start(sdr);