mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-06-26 15:12:51 +00:00
The USRP Hardware Driver (UHD) is now optional.
Used if found.
This commit is contained in:
parent
b69e759e45
commit
1b7bc5af0c
@ -345,7 +345,7 @@ endif(NOT Boost_FOUND)
|
|||||||
################################################################################
|
################################################################################
|
||||||
# GNU Radio - http://gnuradio.org/redmine/projects/gnuradio/wiki
|
# GNU Radio - http://gnuradio.org/redmine/projects/gnuradio/wiki
|
||||||
################################################################################
|
################################################################################
|
||||||
set(GR_REQUIRED_COMPONENTS RUNTIME ANALOG BLOCKS FFT FILTER PMT UHD)
|
set(GR_REQUIRED_COMPONENTS RUNTIME ANALOG BLOCKS FFT FILTER PMT)
|
||||||
find_package(Gnuradio)
|
find_package(Gnuradio)
|
||||||
if(PC_GNURADIO_RUNTIME_VERSION)
|
if(PC_GNURADIO_RUNTIME_VERSION)
|
||||||
if(PC_GNURADIO_RUNTIME_VERSION VERSION_LESS 3.7.3)
|
if(PC_GNURADIO_RUNTIME_VERSION VERSION_LESS 3.7.3)
|
||||||
@ -822,18 +822,15 @@ endif(NOT GNUTLS_OPENSSL_LIBRARY)
|
|||||||
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Universal Hardware Driver (UHD)
|
# USRP Hardware Driver (UHD) - OPTIONAL
|
||||||
################################################################################
|
################################################################################
|
||||||
find_package(UHD)
|
find_package(UHD)
|
||||||
if(NOT UHD_FOUND)
|
if(NOT UHD_FOUND)
|
||||||
set(ENABLE_UHD OFF)
|
set(ENABLE_UHD OFF)
|
||||||
message(STATUS "The Universal Hardware Driver (UHD) based signal source will not be built,")
|
message(STATUS " The USRP Hardware Driver (UHD) signal source will not be built,")
|
||||||
message(STATUS "so all USRP-based front-ends will not be usable.")
|
message(STATUS " so all USRP-based front-ends will not be usable.")
|
||||||
message(STATUS "Please check http://code.ettus.com/redmine/ettus/projects/uhd/wiki")
|
message(STATUS " Please check http://files.ettus.com/manual/")
|
||||||
else(NOT UHD_FOUND)
|
else(NOT UHD_FOUND)
|
||||||
if(NOT GNURADIO_UHD_FOUND)
|
|
||||||
message(FATAL_ERROR "*** gnuradio-uhd 3.7 or later is required to build gnss-sdr")
|
|
||||||
endif(NOT GNURADIO_UHD_FOUND)
|
|
||||||
set(ENABLE_UHD ON)
|
set(ENABLE_UHD ON)
|
||||||
endif(NOT UHD_FOUND)
|
endif(NOT UHD_FOUND)
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
std::string role_;
|
std::string role_;
|
||||||
|
|
||||||
// UHD SETTINGS
|
// Front-end settings
|
||||||
bool AGC_enabled_;
|
bool AGC_enabled_;
|
||||||
double sample_rate_;
|
double sample_rate_;
|
||||||
|
|
||||||
|
@ -62,23 +62,6 @@ TEST(GNSS_Block_Factory_Test, InstantiateFileSignalSource)
|
|||||||
EXPECT_STREQ("File_Signal_Source", signal_source->implementation().c_str());
|
EXPECT_STREQ("File_Signal_Source", signal_source->implementation().c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
TEST(GNSS_Block_Factory_Test, InstantiateUHDSignalSource)
|
|
||||||
{
|
|
||||||
std::shared_ptr<InMemoryConfiguration> configuration = std::make_shared<InMemoryConfiguration>();
|
|
||||||
configuration->set_property("SignalSource.implementation", "UHD_Signal_Source");
|
|
||||||
configuration->set_property("SignalSource.item_type", "gr_complex");
|
|
||||||
configuration->set_property("SignalSource.device_address", "192.168.40.2");
|
|
||||||
gr::msg_queue::sptr queue = gr::msg_queue::make(0);
|
|
||||||
// Example of a factory created with auto
|
|
||||||
auto factory = new GNSSBlockFactory();
|
|
||||||
// Example of a block created with auto
|
|
||||||
auto signal_source = factory->GetSignalSource(configuration, queue);
|
|
||||||
|
|
||||||
EXPECT_STREQ("SignalSource", signal_source->role().c_str());
|
|
||||||
EXPECT_STREQ("UHD_Signal_Source", signal_source->implementation().c_str());
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
TEST(GNSS_Block_Factory_Test, InstantiateWrongSignalSource)
|
TEST(GNSS_Block_Factory_Test, InstantiateWrongSignalSource)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user