aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2016-05-15 20:34:20 +0200
committerAndreas Eversberg <jolly@eversberg.eu>2016-05-15 20:43:49 +0200
commite9640c0cd862e55a8e0460e54676ebe875ce5f21 (patch)
treea3ad127e07b68a11cdd9daaa33299d4e92af9747
parent9ecb87f3e6b0ec184d5a4bd2d0703ac7880cb06a (diff)
C-Netz: Fix TX polarity selection
-rw-r--r--src/cnetz/cnetz.c4
-rw-r--r--src/cnetz/main.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/cnetz/cnetz.c b/src/cnetz/cnetz.c
index b9b3a42..aa4a065 100644
--- a/src/cnetz/cnetz.c
+++ b/src/cnetz/cnetz.c
@@ -200,11 +200,11 @@ int cnetz_create(int kanal, enum cnetz_chan_type chan_type, const char *sounddev
abort();
}
break;
- case 2:
+ case -1:
/* select cell 1 for negative polarity */
cnetz->cell_nr = 1;
cnetz->cell_auto = 0;
- if (si[cnetz->cell_nr].flip_polarity != 0) {
+ if (si[cnetz->cell_nr].flip_polarity == 0) {
fprintf(stderr, "cell %d must have negative polarity, please fix!\n", cnetz->cell_nr);
abort();
}
diff --git a/src/cnetz/main.c b/src/cnetz/main.c
index acab04f..0410e87 100644
--- a/src/cnetz/main.c
+++ b/src/cnetz/main.c
@@ -64,9 +64,9 @@ void print_help(const char *arg0)
printf(" correct signal processing speed. After adjustment, the clock must match\n");
printf(" +- 1ppm or better. CORRECTING CLOCK SPEED IS REQUIRED! See\n");
printf(" documentation on how to measure correct value.\n");
- printf(" -F --flip-polarity no | yes auto\n");
+ printf(" -F --flip-polarity no | yes | auto\n");
printf(" Flip polarity of transmitted FSK signal. If yes, the sound card\n");
- printf(" generates a negative signal rather than a positive one. If auto, the");
+ printf(" generates a negative signal rather than a positive one. If auto, the\n");
printf(" base station generates two virtual base stations with both polarities.\n");
printf(" Once a mobile registers, the correct polarity is selected and used.\n");
printf(" (default = %s)\n", flip_polarity);