diff options
author | Dimitri Stolnikov <horiz0n@gmx.net> | 2013-07-13 14:13:41 +0200 |
---|---|---|
committer | Dimitri Stolnikov <horiz0n@gmx.net> | 2013-07-14 12:09:55 +0200 |
commit | 3ce7c3398102e49f5fe7411a8e0fb5700236a3c7 (patch) | |
tree | b798127b560035369bf7f1c76b76a6bd0f226300 /cmake | |
parent | f80cd288dc3e268d9addfd9a0e903c8e56855166 (diff) |
fcd: add support for FUNcube Dongle Pro+
The gnuradio block https://github.com/dl1ksv/gr-fcdproplus must be
installed before building gr-osmosdr.
Available named gains:
Dongle Classic:
LNA: -5 to 30 dB, in 2.5 dB steps
MIX: 4 or 12 dB
Dongle Pro+:
LNA: 0 or 1, meaning off/on only. no information about real values.
MIX: 0 or 1, meaning off/on only. no information about real values.
BB: 0 to 59 dB, in 1 dB steps
This patch also introduces optional "device" and "type" arguments which
allow to override the values automatically picked by gr-osmosdr:
osmocom_fft -a "fcd,device=hw:2,type=2"
The "device" argument overrides the audio device used by the underlying
driver to access the dongle's IQ sample stream.
The "type" argument selects the dongle type, 1 for Classic, 2 for Pro+.
Thanks to Alexey Bazhin for the initial patch and Volker Schroer for
testing.
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/Modules/FindGnuradioFCDPP.cmake | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/cmake/Modules/FindGnuradioFCDPP.cmake b/cmake/Modules/FindGnuradioFCDPP.cmake new file mode 100644 index 0000000..c6f03f1 --- /dev/null +++ b/cmake/Modules/FindGnuradioFCDPP.cmake @@ -0,0 +1,34 @@ +INCLUDE(FindPkgConfig) +PKG_CHECK_MODULES(PC_GNURADIO_FCDPP gnuradio-fcdproplus) + +FIND_PATH( + GNURADIO_FCDPP_INCLUDE_DIRS + NAMES fcdproplus/api.h + HINTS $ENV{GNURADIO_FCDPP_DIR}/include + ${PC_GNURADIO_FCDPP_INCLUDEDIR} + PATHS /usr/local/include + /usr/include +) + +FIND_LIBRARY( + GNURADIO_FCDPP_LIBRARIES + NAMES gnuradio-fcdproplus + HINTS $ENV{GNURADIO_FCDPP_DIR}/lib + ${PC_GNURADIO_FCDPP_LIBDIR} + PATHS /usr/local/lib + /usr/local/lib64 + /usr/lib + /usr/lib64 +) + +if(GNURADIO_FCDPP_INCLUDE_DIRS AND GNURADIO_FCDPP_LIBRARIES) + set(GNURADIO_FCDPP_FOUND TRUE CACHE INTERNAL "gnuradio-fcdproplus found") + message(STATUS "Found gnuradio-fcdproplus: ${GNURADIO_FCDPP_INCLUDE_DIRS}, ${GNURADIO_FCDPP_LIBRARIES}") +else(GNURADIO_FCDPP_INCLUDE_DIRS AND GNURADIO_FCDPP_LIBRARIES) + set(GNURADIO_FCDPP_FOUND FALSE CACHE INTERNAL "gnuradio-fcdproplus found") + message(STATUS "gnuradio-fcdproplus not found.") +endif(GNURADIO_FCDPP_INCLUDE_DIRS AND GNURADIO_FCDPP_LIBRARIES) + +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(GNURADIO_FCDPP DEFAULT_MSG GNURADIO_FCDPP_LIBRARIES GNURADIO_FCDPP_INCLUDE_DIRS) +MARK_AS_ADVANCED(GNURADIO_FCDPP_LIBRARIES GNURADIO_FCDPP_INCLUDE_DIRS) |