SDR: Use greater offset from center frequency, if only one channel is used.

This commit is contained in:
Andreas Eversberg 2019-08-06 20:56:44 +02:00
parent 3139c7a349
commit 1a76aebbc4
1 changed files with 2 additions and 2 deletions

View File

@ -343,8 +343,8 @@ void *sdr_open(const char __attribute__((__unused__)) *audiodev, double *tx_freq
/* prevent channel bandwidth from overlapping with the center frequency */
if (channels == 1) {
/* simple: just move off the center by half of the bandwidth */
rx_center_frequency -= bandwidth / 2.0;
/* simple: just move off the center by two times half of the bandwidth */
rx_center_frequency -= 2.0 * bandwidth / 2.0;
/* Note: rx_low_frequency is kept at old center.
Calculation of 'low_side' will become 0.
This is correct, since there is no bandwidth