diff options
author | Alexander Chemeris <Alexander.Chemeris@gmail.com> | 2015-05-24 18:56:51 -0400 |
---|---|---|
committer | Alexander Chemeris <Alexander.Chemeris@gmail.com> | 2015-05-24 20:35:13 -0400 |
commit | f5fd578d6097c295192840e846a8e4eca5cef5d2 (patch) | |
tree | 4698c6745d84ef90ec28fd22cd62db1729ca44b6 | |
parent | 57ef87d061c7e208c97635ad495f7431ec2aee9b (diff) |
osmo-trx: Fix random filler command line option.
Filler types was of "bool" type, which prevented it from taking values greter
than 1. And RAND filler type has integer value of 2, which was casted to 1 on
assigning, which led to a normal filler table being used instead of the RAND
one.
-rw-r--r-- | Transceiver52M/Transceiver.h | 2 | ||||
-rw-r--r-- | Transceiver52M/osmo-trx.cpp | 14 |
2 files changed, 13 insertions, 3 deletions
diff --git a/Transceiver52M/Transceiver.h b/Transceiver52M/Transceiver.h index 8bcd8e5..4f6aa69 100644 --- a/Transceiver52M/Transceiver.h +++ b/Transceiver52M/Transceiver.h @@ -149,7 +149,7 @@ public: IDLE ///< timeslot is an idle (or dummy) burst } CorrType; - enum { + enum FillerType { FILLER_DUMMY, FILLER_ZERO, FILLER_RAND, diff --git a/Transceiver52M/osmo-trx.cpp b/Transceiver52M/osmo-trx.cpp index b121e48..3f562ba 100644 --- a/Transceiver52M/osmo-trx.cpp +++ b/Transceiver52M/osmo-trx.cpp @@ -67,7 +67,7 @@ struct trx_config { unsigned chans; unsigned rtsc; bool extref; - bool filler; + Transceiver::FillerType filler; bool diversity; double offset; }; @@ -160,8 +160,18 @@ bool trx_setup_config(struct trx_config *config) config->chans = 2; refstr = config->extref ? "Enabled" : "Disabled"; - fillstr = config->filler ? "Enabled" : "Disabled"; divstr = config->diversity ? "Enabled" : "Disabled"; + switch (config->filler) { + case Transceiver::FILLER_DUMMY: + fillstr = "Dummy bursts"; + break; + case Transceiver::FILLER_ZERO: + fillstr = "Disabled"; + break; + case Transceiver::FILLER_RAND: + fillstr = "Normal busrts with random payload"; + break; + } std::ostringstream ost(""); ost << "Config Settings" << std::endl; |