aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2017-11-20 22:14:37 -0800
committerMartin Braun <martin.braun@ettus.com>2017-12-22 15:05:06 -0800
commit077f29d982822ca9cca3f159f517aa581dbc1601 (patch)
tree7df0f1eeb017cd2581f1e0f12fc0372287b80226
parente6b969ce43ce8c380c14ab7acdb00009f6d99c17 (diff)
downloaduhd-077f29d982822ca9cca3f159f517aa581dbc1601.tar.gz
uhd-077f29d982822ca9cca3f159f517aa581dbc1601.tar.bz2
uhd-077f29d982822ca9cca3f159f517aa581dbc1601.zip
mg: Fix minor compiler warnings
-rw-r--r--host/lib/usrp/dboard/magnesium/magnesium_constants.hpp2
-rw-r--r--host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.cpp36
-rw-r--r--host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_init.cpp3
3 files changed, 22 insertions, 19 deletions
diff --git a/host/lib/usrp/dboard/magnesium/magnesium_constants.hpp b/host/lib/usrp/dboard/magnesium/magnesium_constants.hpp
index 886270dc0..933866d92 100644
--- a/host/lib/usrp/dboard/magnesium/magnesium_constants.hpp
+++ b/host/lib/usrp/dboard/magnesium/magnesium_constants.hpp
@@ -51,8 +51,6 @@ static const double MAGNESIUM_CENTER_FREQ = 2.5e9; // Hz
static const std::vector<std::string> MAGNESIUM_RX_ANTENNAS = {
"TX/RX", "RX2", "CAL", "LOCAL"
};
-static const char* MAGNESIUM_DEFAULT_RX_ANTENNA = "RX2";
-static const char* MAGNESIUM_DEFAULT_TX_ANTENNA = "TX/RX";
static const double MAGNESIUM_DEFAULT_BANDWIDTH = 40e6; // Hz TODO: fix
// Note: MAGNESIUM_NUM_CHANS is independent of the number of chans per
// RFNoC block. TODO: When we go to one radio per dboard, this comment can
diff --git a/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.cpp b/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.cpp
index a8729af6a..52bce2e9a 100644
--- a/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.cpp
+++ b/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.cpp
@@ -83,6 +83,7 @@ namespace {
if (radio_slot == "D") {
return fs_path("dboards") / "C";
}
+ UHD_THROW_INVALID_CODE_PATH();
}
}
@@ -129,11 +130,12 @@ double magnesium_radio_ctrl_impl::set_rate(double rate)
void magnesium_radio_ctrl_impl::set_tx_antenna(
const std::string &ant,
- const size_t /* chan */
+ const size_t chan
) {
- if (ant != MAGNESIUM_DEFAULT_TX_ANTENNA) {
+ if (ant != get_tx_antenna(chan)) {
throw uhd::value_error(str(
boost::format("[%s] Requesting invalid TX antenna value: %s")
+ % unique_id()
% ant
));
}
@@ -318,51 +320,51 @@ double magnesium_radio_ctrl_impl::set_rx_gain(
}
std::vector<std::string> magnesium_radio_ctrl_impl::get_rx_lo_names(
- const size_t chan
+ const size_t /*chan*/
) {
return std::vector<std::string>{};
}
std::vector<std::string> magnesium_radio_ctrl_impl::get_rx_lo_sources(
- const std::string &name,
- const size_t chan
+ const std::string &/*name*/,
+ const size_t /*chan*/
) {
return std::vector<std::string>{};
}
freq_range_t magnesium_radio_ctrl_impl::get_rx_lo_freq_range(
- const std::string &name,
- const size_t chan
+ const std::string &/*name*/,
+ const size_t /*chan*/
) {
return freq_range_t{};
}
void magnesium_radio_ctrl_impl::set_rx_lo_source(
- const std::string &src,
- const std::string &name,
- const size_t chan
+ const std::string &/*src*/,
+ const std::string &/*name*/,
+ const size_t /*chan*/
) {
// FIXME
}
const std::string magnesium_radio_ctrl_impl::get_rx_lo_source(
- const std::string &name,
- const size_t chan
+ const std::string &/*name*/,
+ const size_t /*chan*/
) {
return ""; // FIXME
}
double magnesium_radio_ctrl_impl::set_rx_lo_freq(
- double freq,
- const std::string &name,
- const size_t chan
+ double /*freq*/,
+ const std::string &/*name*/,
+ const size_t /*chan*/
) {
return 0.0; // FIXME
}
double magnesium_radio_ctrl_impl::get_rx_lo_freq(
- const std::string &name,
- const size_t chan
+ const std::string &/*name*/,
+ const size_t /*chan*/
) {
return 0.0; // FIXME
}
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 355671a5f..7cfa45bc7 100644
--- a/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_init.cpp
+++ b/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_init.cpp
@@ -23,6 +23,9 @@ namespace {
SEN_RX_LO = 4,
SEN_PHASE_DAC = 8
};
+
+ const char* MAGNESIUM_DEFAULT_RX_ANTENNA = "RX2";
+ const char* MAGNESIUM_DEFAULT_TX_ANTENNA = "TX/RX";
}
void magnesium_radio_ctrl_impl::_init_defaults()