From bfd184b879c1a0878f863d859a74c8e010848f12 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Sat, 9 Jan 2021 00:46:08 +0100 Subject: rh: Remove use of magic number of identify duration This fixes a clang compiler warning. --- host/lib/usrp/dboard/rhodium/rhodium_radio_control.cpp | 2 -- host/lib/usrp/dboard/rhodium/rhodium_radio_control_init.cpp | 4 +++- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'host/lib/usrp/dboard/rhodium') diff --git a/host/lib/usrp/dboard/rhodium/rhodium_radio_control.cpp b/host/lib/usrp/dboard/rhodium/rhodium_radio_control.cpp index 4ee8a9a6d..ab1365a59 100644 --- a/host/lib/usrp/dboard/rhodium/rhodium_radio_control.cpp +++ b/host/lib/usrp/dboard/rhodium/rhodium_radio_control.cpp @@ -34,8 +34,6 @@ constexpr char RX_FE_CONNECTION_HIGHBAND[] = "IQ"; constexpr char TX_FE_CONNECTION_LOWBAND[] = "QI"; constexpr char TX_FE_CONNECTION_HIGHBAND[] = "IQ"; -constexpr double DEFAULT_IDENTIFY_DURATION = 5.0; // seconds - constexpr uint64_t SET_RATE_RPC_TIMEOUT_MS = 10000; } // namespace diff --git a/host/lib/usrp/dboard/rhodium/rhodium_radio_control_init.cpp b/host/lib/usrp/dboard/rhodium/rhodium_radio_control_init.cpp index 8ba76789e..ced621cda 100644 --- a/host/lib/usrp/dboard/rhodium/rhodium_radio_control_init.cpp +++ b/host/lib/usrp/dboard/rhodium/rhodium_radio_control_init.cpp @@ -38,6 +38,8 @@ constexpr double RHODIUM_DEFAULT_LO_GAIN = 30; // gain index constexpr char RHODIUM_DEFAULT_RX_ANTENNA[] = "RX2"; constexpr char RHODIUM_DEFAULT_TX_ANTENNA[] = "TX/RX"; constexpr auto RHODIUM_DEFAULT_MASH_ORDER = lmx2592_iface::mash_order_t::THIRD; +constexpr double DEFAULT_IDENTIFY_DURATION = 5.0; // seconds + //! Returns the SPI config used by the CPLD spi_config_t _get_cpld_spi_config() @@ -577,7 +579,7 @@ void rhodium_radio_control_impl::_init_mpm() const std::string identify_val = block_args.get("identify"); int identify_duration = std::atoi(identify_val.c_str()); if (identify_duration == 0) { - identify_duration = 5; + identify_duration = DEFAULT_IDENTIFY_DURATION; } RFNOC_LOG_INFO("Running LED identification process for " << identify_duration << " seconds."); -- cgit v1.2.3