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

@@ -118,6 +118,9 @@ double bnetz_kanal2freq(int kanal, int unterband)
{
double freq = 153.010;
if (unterband == 2)
return -4.600 * 1e6;
if (kanal >= 50)
freq += 9.200 - 0.020 * 49;
freq += (kanal - 1) * 0.020;

View File

@@ -199,7 +199,7 @@ int main(int argc, char *argv[])
fprintf(stderr, "Failed to create \"Sender\" instance. Quitting!\n");
goto fail;
}
printf("Base station for channel %d ready, please tune transmitter to %.3f MHz and receiver " "to %.3f MHz.\n", kanal[i], bnetz_kanal2freq(kanal[i], 0) / 1e6, bnetz_kanal2freq(kanal[i], 1) / 1e6);
printf("Base station for channel %d ready, please tune transmitter to %.3f MHz and receiver " "to %.3f MHz. (%.3f MHz offset)\n", kanal[i], bnetz_kanal2freq(kanal[i], 0) / 1e6, bnetz_kanal2freq(kanal[i], 1) / 1e6, bnetz_kanal2freq(kanal[i], 2) / 1e6);
printf("To call phone, switch transmitter (using paging signal) to %.3f MHz.\n", bnetz_kanal2freq(19, 0) / 1e6);
}