diff options
author | Andreas Eversberg <jolly@eversberg.eu> | 2017-01-07 16:53:28 +0100 |
---|---|---|
committer | Andreas Eversberg <jolly@eversberg.eu> | 2017-01-08 09:20:55 +0100 |
commit | 8df212f34fe3b69978dfbc79e9fbd619980984c9 (patch) | |
tree | b71cd2c7e882eebcd1fdec2fd646ec8e02099167 | |
parent | 31f78d4eebd7c54c1efdf48863d11df0e127a360 (diff) |
SDR forces default settings: emphasis and FSK polarity
-rw-r--r-- | src/amps/main.c | 8 | ||||
-rw-r--r-- | src/bnetz/main.c | 6 | ||||
-rw-r--r-- | src/cnetz/main.c | 8 | ||||
-rw-r--r-- | src/nmt/main.c | 6 |
4 files changed, 28 insertions, 0 deletions
diff --git a/src/amps/main.c b/src/amps/main.c index e97c5d4..da4a37f 100644 --- a/src/amps/main.c +++ b/src/amps/main.c @@ -325,6 +325,12 @@ int main(int argc, char *argv[]) if (i == num_kanal) fprintf(stderr, "You did not define any VC (voice) channel. You will not be able to make any call.\n"); + /* SDR always requires emphasis */ + if (!strcmp(audiodev[0], "sdr")) { + do_pre_emphasis = 1; + do_de_emphasis = 1; + } + if (!do_pre_emphasis || !do_de_emphasis) { fprintf(stderr, "*******************************************************************************\n"); fprintf(stderr, "I strongly suggest to let me do pre- and de-emphasis (options -p -d)!\n"); @@ -338,6 +344,8 @@ int main(int argc, char *argv[]) polarity = 1; /* positive */ else if (!strcmp(flip_polarity, "yes")) polarity = -1; /* negative */ + if (!strcmp(audiodev[0], "sdr")) + polarity = 1; /* SDR is always positive */ else { fprintf(stderr, "You must define, if the the TX deviation polarity has to be flipped. (-F yes | no) See help.\n"); exit(0); diff --git a/src/bnetz/main.c b/src/bnetz/main.c index 409b574..a2381fd 100644 --- a/src/bnetz/main.c +++ b/src/bnetz/main.c @@ -185,6 +185,12 @@ int main(int argc, char *argv[]) goto fail; } + /* SDR always requires emphasis */ + if (!strcmp(audiodev[0], "sdr")) { + do_pre_emphasis = 1; + do_de_emphasis = 1; + } + /* create transceiver instance */ for (i = 0; i < num_kanal; i++) { rc = bnetz_create(kanal[i], audiodev[i], samplerate, rx_gain, gfs, do_pre_emphasis, do_de_emphasis, write_rx_wave, write_tx_wave, read_rx_wave, loopback, (double)lossdetect / 100.0, paging[i]); diff --git a/src/cnetz/main.c b/src/cnetz/main.c index 2298e5c..384bb33 100644 --- a/src/cnetz/main.c +++ b/src/cnetz/main.c @@ -285,6 +285,12 @@ int main(int argc, char *argv[]) if (i == num_kanal) fprintf(stderr, "You did not define any SpK (speech) channel. You will not be able to make any call.\n"); + /* SDR always requires emphasis */ + if (!strcmp(audiodev[0], "sdr")) { + do_pre_emphasis = 1; + do_de_emphasis = 1; + } + if (!do_pre_emphasis || !do_de_emphasis) { fprintf(stderr, "*******************************************************************************\n"); fprintf(stderr, "I strongly suggest to let me do pre- and de-emphasis (options -p -d)!\n"); @@ -299,6 +305,8 @@ int main(int argc, char *argv[]) polarity = 1; /* positive */ if (!strcmp(flip_polarity, "yes")) polarity = -1; /* negative */ + if (!strcmp(audiodev[0], "sdr") && polarity == 0) + polarity = 1; /* SDR is always positive */ /* create transceiver instance */ for (i = 0; i < num_kanal; i++) { diff --git a/src/nmt/main.c b/src/nmt/main.c index 085330a..36a88ae 100644 --- a/src/nmt/main.c +++ b/src/nmt/main.c @@ -341,6 +341,12 @@ int main(int argc, char *argv[]) goto fail; } + /* SDR always requires emphasis */ + if (!strcmp(audiodev[0], "sdr")) { + do_pre_emphasis = 1; + do_de_emphasis = 1; + } + /* create transceiver instance */ for (i = 0; i < num_kanal; i++) { rc = nmt_create(kanal[i], (loopback) ? CHAN_TYPE_TEST : chan_type[i], audiodev[i], samplerate, rx_gain, do_pre_emphasis, do_de_emphasis, write_rx_wave, write_tx_wave, read_rx_wave, ms_power, nmt_digits2value(traffic_area, 2), area_no, compandor, supervisory, smsc_number, send_callerid, loopback); |