From 180fb42dc3afe42b23cc29759e3a4cdd4820147e Mon Sep 17 00:00:00 2001 From: Xavier Arteaga Date: Fri, 12 Jun 2020 12:49:52 +0200 Subject: [PATCH] UHD: minor aesthetic corrections --- lib/src/phy/rf/rf_uhd_rfnoc.h | 16 ++++++++-------- lib/src/phy/rf/rf_uhd_safe.h | 6 +++--- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/src/phy/rf/rf_uhd_rfnoc.h b/lib/src/phy/rf/rf_uhd_rfnoc.h index 1be3bb889..95e8b19ef 100644 --- a/lib/src/phy/rf/rf_uhd_rfnoc.h +++ b/lib/src/phy/rf/rf_uhd_rfnoc.h @@ -69,13 +69,13 @@ private: typedef uhd::rfnoc::duc_block_ctrl duc_ctrl_t; #endif // UHD_ENABLE_CUSTOM_RFNOC - const std::string DMA_FIFO_BLOCK_NAME = "DmaFIFO"; - const double SETUP_TIME_S = 1.0; - const uhd::fs_path TREE_MBOARD_SENSORS = "/mboards/0/sensors"; - const uhd::fs_path TREE_RX_SENSORS = "/mboards/0/dboards/A/rx_frontends/0/sensors"; - const std::string TX_ANTENNA_PORT = "TX/RX"; - const std::string RX_ANTENNA_PORT = "RX2"; - const size_t spp = 246; + const std::string DMA_FIFO_BLOCK_NAME = "DmaFIFO"; + const std::chrono::milliseconds SETUP_TIME_MS = std::chrono::milliseconds(1000UL); + const uhd::fs_path TREE_MBOARD_SENSORS = "/mboards/0/sensors"; + const uhd::fs_path TREE_RX_SENSORS = "/mboards/0/dboards/A/rx_frontends/0/sensors"; + const std::string TX_ANTENNA_PORT = "TX/RX"; + const std::string RX_ANTENNA_PORT = "RX2"; + const size_t spp = 246; // Primary parameters double master_clock_rate = 184.32e6; @@ -191,7 +191,7 @@ private: } // Sleep for some time - std::this_thread::sleep_for(std::chrono::milliseconds(int64_t(1000 * SETUP_TIME_S))); + std::this_thread::sleep_for(SETUP_TIME_MS); // Create DDC control ddc_ctrl.resize(nof_radios); diff --git a/lib/src/phy/rf/rf_uhd_safe.h b/lib/src/phy/rf/rf_uhd_safe.h index 43dc31a3f..89ee858f0 100644 --- a/lib/src/phy/rf/rf_uhd_safe.h +++ b/lib/src/phy/rf/rf_uhd_safe.h @@ -37,7 +37,7 @@ class rf_uhd_safe_interface { private: #ifdef ENABLE_UHD_X300_FW_RESET - const double X300_SLEEP_TIME_S = 5.0; + const std::chrono::milliseconds X300_SLEEP_TIME_MS = std::chrono::milliseconds(5000UL); #endif /* ENABLE_UHD_X300_FW_RESET */ virtual uhd_error usrp_make_internal(const uhd::device_addr_t& dev_addr) = 0; @@ -98,8 +98,8 @@ protected: } // Sleep for some time - Info("Wait " << std::to_string(X300_SLEEP_TIME_S) << " seconds"); - std::this_thread::sleep_for(std::chrono::milliseconds(int64_t(1000 * X300_SLEEP_TIME_S))); + Info("Wait " << X300_SLEEP_TIME_MS.count() << " ms"); + std::this_thread::sleep_for(X300_SLEEP_TIME_MS); // Try opening the device one more time return usrp_make_internal(dev_addr);