aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_init.cpp
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2018-01-16 18:51:03 -0800
committerMartin Braun <martin.braun@ettus.com>2018-01-16 18:51:03 -0800
commit4c47498e2e5d0417a39313c74a7eb56d1b5b625b (patch)
treee0883e0af07765c9ced2e459eb7e48dcce830eb9 /host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_init.cpp
parentccb09ba68bc11f110c0ed73cf211c1b168da820d (diff)
downloaduhd-4c47498e2e5d0417a39313c74a7eb56d1b5b625b.tar.gz
uhd-4c47498e2e5d0417a39313c74a7eb56d1b5b625b.tar.bz2
uhd-4c47498e2e5d0417a39313c74a7eb56d1b5b625b.zip
mg: Fix various compiler warnings
- Made const constexpr where sensible - Moved non-global constants to their local scope - Changed const char * to const char[] where they should
Diffstat (limited to 'host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_init.cpp')
-rw-r--r--host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_init.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_init.cpp b/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_init.cpp
index 5eb3cacd0..85e4a5e30 100644
--- a/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_init.cpp
+++ b/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_init.cpp
@@ -25,8 +25,16 @@ namespace {
SEN_PHASE_DAC = 8
};
- const char* MAGNESIUM_DEFAULT_RX_ANTENNA = "RX2";
- const char* MAGNESIUM_DEFAULT_TX_ANTENNA = "TX/RX";
+ constexpr double MAGNESIUM_DEFAULT_FREQ = 2.5e9; // Hz
+ constexpr double MAGNESIUM_DEFAULT_BANDWIDTH = 40e6; // Hz
+ constexpr char MAGNESIUM_DEFAULT_RX_ANTENNA[] = "RX2";
+ constexpr char MAGNESIUM_DEFAULT_TX_ANTENNA[] = "TX/RX";
+
+ //! Magnesium gain profile options
+ const std::vector<std::string> MAGNESIUM_GP_OPTIONS = {
+ "manual",
+ "default"
+ };
}
void magnesium_radio_ctrl_impl::_init_defaults()
@@ -40,14 +48,14 @@ void magnesium_radio_ctrl_impl::_init_defaults()
<< " Num RX chans: " << num_rx_chans);
for (size_t chan = 0; chan < num_rx_chans; chan++) {
- radio_ctrl_impl::set_rx_frequency(MAGNESIUM_CENTER_FREQ, chan);
+ radio_ctrl_impl::set_rx_frequency(MAGNESIUM_DEFAULT_FREQ, chan);
radio_ctrl_impl::set_rx_gain(0, chan);
radio_ctrl_impl::set_rx_antenna(MAGNESIUM_DEFAULT_RX_ANTENNA, chan);
radio_ctrl_impl::set_rx_bandwidth(MAGNESIUM_DEFAULT_BANDWIDTH, chan);
}
for (size_t chan = 0; chan < num_tx_chans; chan++) {
- radio_ctrl_impl::set_tx_frequency(MAGNESIUM_CENTER_FREQ, chan);
+ radio_ctrl_impl::set_tx_frequency(MAGNESIUM_DEFAULT_FREQ, chan);
radio_ctrl_impl::set_tx_gain(0, chan);
radio_ctrl_impl::set_tx_antenna(MAGNESIUM_DEFAULT_TX_ANTENNA, chan);
}