diff options
author | Alexander Chemeris <Alexander.Chemeris@gmail.com> | 2017-03-15 21:35:16 +0300 |
---|---|---|
committer | Alexander Chemeris <Alexander.Chemeris@gmail.com> | 2017-06-01 00:51:24 +0300 |
commit | 09130c81a7ca88030982f3783d551f074bb6558a (patch) | |
tree | e57c51bf3af33f1a7ebd6c02018a7c835cbd004d | |
parent | 0c4e24d197841960a792d0409cacde16873be67d (diff) |
osmo-trx: Separate command line switch to enable EDGE filler.
Now -r comand line switch always enables GMSK filler even when EDGE mode is
enabled with -e switch. If you want to enable EDGE filler, use -E switch.
Change-Id: Ic8808bbe3f06740ef3fec1d1865ecb57fbcfabab
-rw-r--r-- | Transceiver52M/osmo-trx.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/Transceiver52M/osmo-trx.cpp b/Transceiver52M/osmo-trx.cpp index 1c0ceb1..b93e4f7 100644 --- a/Transceiver52M/osmo-trx.cpp +++ b/Transceiver52M/osmo-trx.cpp @@ -256,7 +256,8 @@ static void print_help() " -c Number of ARFCN channels (default=1)\n" " -f Enable C0 filler table\n" " -o Set baseband frequency offset (default=auto)\n" - " -r Random Normal Burst test mode with TSC\n" + " -r Random GMSK Normal Burst test mode with given TSC\n" + " -E Random 8-PSK Normal Burst test mode with given TSC\n" " -A Random Access Burst test mode with delay\n" " -R RSSI to dBm offset in dB (default=0)\n" " -S Swap channels (UmTRX only)\n", @@ -284,7 +285,7 @@ static void handle_options(int argc, char **argv, struct trx_config *config) config->swap_channels = false; config->edge = false; - while ((option = getopt(argc, argv, "ha:l:i:p:c:dmxgfo:s:b:r:A:R:Se")) != -1) { + while ((option = getopt(argc, argv, "ha:l:i:p:c:dmxgfo:s:b:r:E:A:R:Se")) != -1) { switch (option) { case 'h': print_help(); @@ -330,6 +331,10 @@ static void handle_options(int argc, char **argv, struct trx_config *config) config->rtsc = atoi(optarg); config->filler = Transceiver::FILLER_NORM_RAND; break; + case 'E': + config->rtsc = atoi(optarg); + config->filler = Transceiver::FILLER_EDGE_RAND; + break; case 'A': config->rach_delay = atoi(optarg); config->filler = Transceiver::FILLER_ACCESS_RAND; @@ -360,8 +365,10 @@ static void handle_options(int argc, char **argv, struct trx_config *config) goto bad_config; } - if (config->edge && (config->filler == Transceiver::FILLER_NORM_RAND)) - config->filler = Transceiver::FILLER_EDGE_RAND; + if (!config->edge && (config->filler == Transceiver::FILLER_EDGE_RAND)) { + printf("Can't enable EDGE filler when EDGE mode is disabled\n\n"); + goto bad_config; + } if ((config->tx_sps != 1) && (config->tx_sps != 4) && (config->rx_sps != 1) && (config->rx_sps != 4)) { |