Display channel offset with TX and RX channel frequencies on startup

This commit is contained in:
Andreas Eversberg
2017-10-12 19:43:15 +02:00
parent e67c171035
commit f7a0e4622b
12 changed files with 32 additions and 9 deletions

View File

@@ -381,7 +381,7 @@ int main(int argc, char *argv[])
fprintf(stderr, "Failed to create transceiver instance. Quitting!\n");
goto fail;
}
printf("base station on channel %d ready, please tune transmitter to %.4f MHz and receiver to %.4f MHz.\n", kanal[i], r2000_channel2freq(band, kanal[i], 0) / 1e6, r2000_channel2freq(band, kanal[i], 1) / 1e6);
printf("base station on channel %d ready, please tune transmitter to %.4f MHz and receiver to %.4f MHz. (%.3f MHz offset)\n", kanal[i], r2000_channel2freq(band, kanal[i], 0) / 1e6, r2000_channel2freq(band, kanal[i], 1) / 1e6, r2000_channel2freq(band, kanal[i], 2) / 1e6);
nconv = (nconv + 1) & 7;
}

View File

@@ -114,6 +114,9 @@ double r2000_channel2freq(int band, int channel, int uplink)
return 0.0;
}
if (uplink == 2)
return -r2000_bands[i].duplex * 1e6;
freq = r2000_bands[i].dl_f0 + CHANNEL_SPACING * (double)(channel);
if (uplink)
freq -= r2000_bands[i].duplex;