Bug #5445 ยป gr-osmosdr-0.2.3-gr-funcube.patch
CMakeLists.txt | ||
---|---|---|
179 | 179 |
find_package(LibAIRSPY) |
180 | 180 |
find_package(LibAIRSPYHF) |
181 | 181 |
find_package(LibbladeRF) |
182 |
find_package(GnuradioFCDPP)
|
|
182 |
find_package(GnuradioFuncube)
|
|
183 | 183 |
find_package(SoapySDR NO_MODULE) |
184 | 184 |
find_package(LibFreeSRP) |
185 | 185 |
find_package(LibXTRX) |
README | ||
---|---|---|
1 | 1 |
While primarily being developed for the OsmoSDR hardware, this block |
2 | 2 |
as well supports: |
3 | 3 | |
4 |
* FUNcube Dongle through libgnuradio-fcd |
|
5 |
* FUNcube Dongle Pro+ through gr-fcdproplus |
|
4 |
* FUNcube Dongle / Pro+ through gr-funcube |
|
6 | 5 |
* RTL2832U based DVB-T dongles through librtlsdr |
7 | 6 |
* RTL-TCP spectrum server (see librtlsdr project) |
8 | 7 |
* SDRplay RSP through SDRplay API library |
cmake/Modules/FindGnuradioFCDPP.cmake | ||
---|---|---|
1 |
if(NOT GNURADIO_FCDPP_FOUND) |
|
2 |
pkg_check_modules (GNURADIO_FCDPP_PKG libgnuradio-fcdproplus) |
|
3 |
find_path(GNURADIO_FCDPP_INCLUDE_DIRS NAMES fcdproplus/api.h |
|
4 |
PATHS |
|
5 |
${GNURADIO_FCDPP_PKG_INCLUDE_DIRS} |
|
6 |
/usr/include |
|
7 |
/usr/local/include |
|
8 |
) |
|
9 | ||
10 |
find_library(GNURADIO_FCDPP_LIBRARIES NAMES gnuradio-fcdproplus |
|
11 |
PATHS |
|
12 |
${GNURADIO_FCDPP_PKG_LIBRARY_DIRS} |
|
13 |
/usr/lib |
|
14 |
/usr/local/lib |
|
15 |
) |
|
16 | ||
17 |
if(GNURADIO_FCDPP_INCLUDE_DIRS AND GNURADIO_FCDPP_LIBRARIES) |
|
18 |
set(GNURADIO_FCDPP_FOUND TRUE CACHE INTERNAL "gnuradio-fcdproplus found") |
|
19 |
message(STATUS "Found gnuradio-fcdproplus: ${GNURADIO_FCDPP_INCLUDE_DIRS}, ${GNURADIO_FCDPP_LIBRARIES}") |
|
20 |
else(GNURADIO_FCDPP_INCLUDE_DIRS AND GNURADIO_FCDPP_LIBRARIES) |
|
21 |
set(GNURADIO_FCDPP_FOUND FALSE CACHE INTERNAL "gnuradio-fcdproplus found") |
|
22 |
message(STATUS "gnuradio-fcdproplus not found.") |
|
23 |
endif(GNURADIO_FCDPP_INCLUDE_DIRS AND GNURADIO_FCDPP_LIBRARIES) |
|
24 | ||
25 |
mark_as_advanced(GNURADIO_FCDPP_LIBRARIES GNURADIO_FCDPP_INCLUDE_DIRS) |
|
26 | ||
27 |
endif(NOT GNURADIO_FCDPP_FOUND) |
cmake/Modules/FindGnuradioFuncube.cmake | ||
---|---|---|
1 |
if(NOT GNURADIO_FUNCUBE_FOUND) |
|
2 |
pkg_check_modules (GNURADIO_FUNCUBE_PKG libgnuradio-funcube) |
|
3 |
find_path(GNURADIO_FUNCUBE_INCLUDE_DIRS NAMES funcube/api.h |
|
4 |
PATHS |
|
5 |
${GNURADIO_FUNCUBE_PKG_INCLUDE_DIRS} |
|
6 |
/usr/include |
|
7 |
/usr/local/include |
|
8 |
) |
|
9 | ||
10 |
find_library(GNURADIO_FUNCUBE_LIBRARIES NAMES gnuradio-funcube |
|
11 |
PATHS |
|
12 |
${GNURADIO_FUNCUBE_PKG_LIBRARY_DIRS} |
|
13 |
/usr/lib |
|
14 |
/usr/local/lib |
|
15 |
) |
|
16 | ||
17 |
if(GNURADIO_FUNCUBE_INCLUDE_DIRS AND GNURADIO_FUNCUBE_LIBRARIES) |
|
18 |
set(GNURADIO_FUNCUBE_FOUND TRUE CACHE INTERNAL "gnuradio-funcube found") |
|
19 |
message(STATUS "Found gnuradio-funcube: ${GNURADIO_FUNCUBE_INCLUDE_DIRS}, ${GNURADIO_FUNCUBE_LIBRARIES}") |
|
20 |
else(GNURADIO_FUNCUBE_INCLUDE_DIRS AND GNURADIO_FUNCUBE_LIBRARIES) |
|
21 |
set(GNURADIO_FUNCUBE_FOUND FALSE CACHE INTERNAL "gnuradio-funcube found") |
|
22 |
message(STATUS "gnuradio-funcube not found.") |
|
23 |
endif(GNURADIO_FUNCUBE_INCLUDE_DIRS AND GNURADIO_FUNCUBE_LIBRARIES) |
|
24 | ||
25 |
mark_as_advanced(GNURADIO_FUNCUBE_LIBRARIES GNURADIO_FUNCUBE_INCLUDE_DIRS) |
|
26 | ||
27 |
endif(NOT GNURADIO_FUNCUBE_FOUND) |
lib/CMakeLists.txt | ||
---|---|---|
138 | 138 |
######################################################################## |
139 | 139 |
# Setup FCD component |
140 | 140 |
######################################################################## |
141 |
GR_REGISTER_COMPONENT("FUNcube Dongle" ENABLE_FCD GNURADIO_FCDPP_FOUND)
|
|
141 |
GR_REGISTER_COMPONENT("FUNcube Dongle" ENABLE_FCD GNURADIO_FUNCUBE_FOUND)
|
|
142 | 142 |
if(ENABLE_FCD) |
143 | 143 |
add_subdirectory(fcd) |
144 | 144 |
endif(ENABLE_FCD) |
lib/fcd/CMakeLists.txt | ||
---|---|---|
23 | 23 | |
24 | 24 |
target_include_directories(gnuradio-osmosdr PRIVATE |
25 | 25 |
${CMAKE_CURRENT_SOURCE_DIR} |
26 |
${GNURADIO_FCDPP_INCLUDE_DIRS}
|
|
26 |
${GNURADIO_FUNCUBE_INCLUDE_DIRS}
|
|
27 | 27 |
) |
28 | 28 | |
29 | 29 |
APPEND_LIB_LIST( |
30 |
${GNURADIO_FCDPP_LIBRARIES}
|
|
30 |
${GNURADIO_FUNCUBE_LIBRARIES}
|
|
31 | 31 |
) |
32 | 32 | |
33 | 33 |
list(APPEND gr_osmosdr_srcs |
lib/fcd/fcd_source_c.cc | ||
---|---|---|
143 | 143 | |
144 | 144 |
if ( FUNCUBE_V1 == _type ) |
145 | 145 |
{ |
146 |
_src_v1 = gr::fcdproplus::fcd::make( dev_name );
|
|
146 |
_src_v1 = gr::funcube::fcd::make( dev_name );
|
|
147 | 147 |
connect( _src_v1, 0, self(), 0 ); |
148 | 148 | |
149 | 149 |
set_gain( 20, "LNA" ); |
... | ... | |
152 | 152 | |
153 | 153 |
if ( FUNCUBE_V2 == _type ) |
154 | 154 |
{ |
155 |
_src_v2 = gr::fcdproplus::fcdproplus::make( dev_name );
|
|
155 |
_src_v2 = gr::funcube::fcdpp::make( dev_name );
|
|
156 | 156 |
connect( _src_v2, 0, self(), 0 ); |
157 | 157 | |
158 | 158 |
set_gain( 1, "LNA" ); |
lib/fcd/fcd_source_c.h | ||
---|---|---|
22 | 22 | |
23 | 23 |
#include <gnuradio/hier_block2.h> |
24 | 24 | |
25 |
#include <fcdproplus/fcd.h>
|
|
26 |
#include <fcdproplus/fcdproplus.h>
|
|
25 |
#include <funcube/fcd.h>
|
|
26 |
#include <funcube/fcdpp.h>
|
|
27 | 27 | |
28 | 28 |
#include "source_iface.h" |
29 | 29 | |
... | ... | |
81 | 81 | |
82 | 82 |
private: |
83 | 83 |
dongle_type _type; |
84 |
gr::fcdproplus::fcd::sptr _src_v1;
|
|
85 |
gr::fcdproplus::fcdproplus::sptr _src_v2;
|
|
84 |
gr::funcube::fcd::sptr _src_v1;
|
|
85 |
gr::funcube::fcdpp::sptr _src_v2;
|
|
86 | 86 |
double _lna_gain, _mix_gain, _bb_gain, _freq; |
87 | 87 |
int _correct; |
88 | 88 |
}; |