aboutsummaryrefslogtreecommitdiffstats
path: root/src/anetz
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2017-10-12 19:43:15 +0200
committerAndreas Eversberg <jolly@eversberg.eu>2017-10-22 19:23:06 +0200
commitf7a0e4622bed9551bb0999d3c54bb69249065d38 (patch)
treeb0f4585d3d7b013046636285783157aa993c2fd3 /src/anetz
parente67c171035807f547ae2eeb7359d7ec8d158cc2a (diff)
Display channel offset with TX and RX channel frequencies on startup
Diffstat (limited to 'src/anetz')
-rw-r--r--src/anetz/anetz.c3
-rw-r--r--src/anetz/main.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/src/anetz/anetz.c b/src/anetz/anetz.c
index e19c47a..1d58efe 100644
--- a/src/anetz/anetz.c
+++ b/src/anetz/anetz.c
@@ -91,6 +91,9 @@ double anetz_kanal2freq(int kanal, int unterband)
{
double freq = 162.050;
+ if (unterband == 2)
+ return -4.500 * 1e6;
+
freq += (kanal - 30) * 0.050;
if (kanal >= 45)
freq += 6.800;
diff --git a/src/anetz/main.c b/src/anetz/main.c
index ac20232..e144f8a 100644
--- a/src/anetz/main.c
+++ b/src/anetz/main.c
@@ -184,7 +184,7 @@ int main(int argc, char *argv[])
fprintf(stderr, "Failed to create \"Sender\" instance. Quitting!\n");
goto fail;
}
- printf("Base station on channel %d ready, please tune transmitter to %.3f MHz and receiver to %.3f MHz.\n", kanal[i], anetz_kanal2freq(kanal[i], 0) / 1e6, anetz_kanal2freq(kanal[i], 1) / 1e6);
+ printf("Base station on channel %d ready, please tune transmitter to %.3f MHz and receiver to %.3f MHz. (%.3f MHz offset)\n", kanal[i], anetz_kanal2freq(kanal[i], 0) / 1e6, anetz_kanal2freq(kanal[i], 1) / 1e6, anetz_kanal2freq(kanal[i], 2) / 1e6);
}
main_mobile(&quit, latency, interval, NULL, station_id, 5);