diff --git a/CMakeLists.txt b/CMakeLists.txt index 453fce66a..4e9eee559 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -383,8 +383,8 @@ if(ENABLE_HACKRF) endif() if(ENABLE_LIMESUITE) find_package(LimeSuite) - if (NOT APPLE AND LIMERFE_FOUND) - add_definitions(-DHAS_LIMERFE) + if (LINUX AND LIMESUITE_FOUND) + add_definitions(-DHAS_LIMERFEUSB) endif() endif() if(ENABLE_IIO) # PlutoSDR diff --git a/cmake/Modules/FindLimeSuite.cmake b/cmake/Modules/FindLimeSuite.cmake index a06335d4d..d7ea7f41e 100644 --- a/cmake/Modules/FindLimeSuite.cmake +++ b/cmake/Modules/FindLimeSuite.cmake @@ -28,19 +28,8 @@ endif (LIMESUITE_INCLUDE_DIR AND LIMESUITE_LIBRARY) if (LIMESUITE_FOUND) message (STATUS "Found Lime Suite: ${LIMESUITE_INCLUDE_DIR}, ${LIMESUITE_LIBRARY}") - find_file(LIMERFE_INCLUDE_FILE - name lime/limeRFE.h - HINTS ${LIMESUITE_INCLUDE_DIR} - ) else (LIMESUITE_FOUND) message (STATUS "Could not find Lime Suite") endif (LIMESUITE_FOUND) -if (LIMERFE_INCLUDE_FILE) - set(LIMERFE_FOUND TRUE) - message (STATUS "Lime Suite has LimeRFE support: ${LIMERFE_INCLUDE_FILE}") -else() - message (STATUS "Lime Suite has not LimeRFE support") -endif() - mark_as_advanced(LIMESUITE_INCLUDE_DIR LIMESUITE_LIBRARY) diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt index e8b382696..76a950cbb 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt @@ -315,7 +315,6 @@ if (LINUX) ) ExternalProject_Get_Property(limesuite source_dir) set(LIMESUITE_FOUND ON CACHE INTERNAL "") - set(LIMERFE_FOUND ON CACHE INTERNAL "") set(LIMESUITE_INCLUDE_DIR "${EXTERNAL_BUILD_LIBRARIES}/limesuite/src/limesuite/src" CACHE INTERNAL "") set(LIMESUITE_LIBRARY "${EXTERNAL_BUILD_LIBRARIES}/lib/libLimeSuite.so" CACHE INTERNAL "") makeCopyFile("${source_dir}/src/limeRFE/limeRFE.h" "${source_dir}/src/lime/limeRFE.h" limesuite) @@ -451,7 +450,6 @@ if(WIN32 OR APPLE) ) ExternalProject_Get_Property(limesuite source_dir binary_dir) set(LIMESUITE_FOUND ON CACHE INTERNAL "") - set(LIMERFE_FOUND ON CACHE INTERNAL "") set(LIMESUITE_INCLUDE_DIR "${source_dir}/src" CACHE INTERNAL "") if(WIN32) set(LIMESUITE_LIBRARY "${SDRANGEL_BINARY_LIB_DIR}/LimeSuite.lib" CACHE INTERNAL "") diff --git a/sdrbase/CMakeLists.txt b/sdrbase/CMakeLists.txt index f0e1b5250..cff149d99 100644 --- a/sdrbase/CMakeLists.txt +++ b/sdrbase/CMakeLists.txt @@ -31,7 +31,7 @@ else(FFTW3F_FOUND) add_definitions(-DUSE_KISSFFT) endif(FFTW3F_FOUND) -if (LIMERFE_FOUND) +if (LIMESUITE_FOUND) set(sdrbase_SOURCES ${sdrbase_SOURCES} limerfe/limerfecontroller.cpp @@ -42,7 +42,7 @@ if (LIMERFE_FOUND) ) include_directories(${LIMESUITE_INCLUDE_DIR}) set(sdrbase_LIMERFE_LIB ${LIMESUITE_LIBRARY}) -endif (LIMERFE_FOUND) +endif (LIMESUITE_FOUND) # serialdv now required add_definitions(-DDSD_USE_SERIALDV) diff --git a/sdrgui/CMakeLists.txt b/sdrgui/CMakeLists.txt index ef7d3aa6b..341129f64 100644 --- a/sdrgui/CMakeLists.txt +++ b/sdrgui/CMakeLists.txt @@ -177,7 +177,7 @@ set(sdrgui_FORMS soapygui/arginfogui.ui ) -if (LIMERFE_FOUND) +if (LIMESUITE_FOUND) set(sdrgui_SOURCES ${sdrgui_SOURCES} limerfegui/limerfeusbdialog.cpp @@ -192,7 +192,7 @@ if (LIMERFE_FOUND) ) include_directories(${LIMESUITE_INCLUDE_DIR}) set(sdrgui_LIMERFE_LIB ${LIMESUITE_LIBRARY}) -endif (LIMERFE_FOUND) +endif (LIMESUITE_FOUND) qt5_wrap_ui(sdrgui_FORMS_HEADERS ${sdrgui_FORMS}) diff --git a/sdrgui/limerfeusbgui.md b/sdrgui/limerfeusbgui.md index 9ced50bc1..7525371ed 100644 --- a/sdrgui/limerfeusbgui.md +++ b/sdrgui/limerfeusbgui.md @@ -1,6 +1,6 @@

LimeRFE USB control

-The LimeRFE or Lime RF Front End is a power amplifier and LNA board designed to augment the capabilities of the LimeSDR in order to build an operational radio solution. The usage is not limited to LimeSDR any Rx or Tx device can be connected to it. The LimeRFE can be controlled directly via its USB port independently of a LimeSDR device. This interface allows exactly that from the SDRangel GUI. +The LimeRFE or Lime RF Front End is a power amplifier and LNA board designed to augment the capabilities of the LimeSDR in order to build an operational radio solution. The usage is not limited to LimeSDR any Rx or Tx device can be connected to it. The LimeRFE can be controlled directly via its USB port independently of a LimeSDR device. This interface allows exactly that from the SDRangel GUI. Note that this interface is available only in Linux. To open the LimeRFE USB dialog open the Preferences sub-menu from the top bar and click on the `LimeRFE` item. This item is available only when the code is compiled with the `LimeRFE` branch of LimeSuite. diff --git a/sdrgui/mainwindow.cpp b/sdrgui/mainwindow.cpp index 2a03bc0d8..1bf868e57 100644 --- a/sdrgui/mainwindow.cpp +++ b/sdrgui/mainwindow.cpp @@ -80,7 +80,7 @@ #include #include -#if defined(HAS_LIMERFE) +#if defined(HAS_LIMERFEUSB) #include "limerfegui/limerfeusbdialog.h" #endif @@ -250,7 +250,7 @@ MainWindow::MainWindow(qtwebapp::LoggerWithFile *logger, const MainParser& parse #ifdef __APPLE__ ui->menuPreferences->removeAction(ui->action_AMBE); #endif -#if not defined(HAS_LIMERFE) +#if not defined(HAS_LIMERFEUSB) ui->menuPreferences->removeAction(ui->action_LimeRFE); #endif @@ -1611,7 +1611,7 @@ void MainWindow::on_action_AMBE_triggered() void MainWindow::on_action_LimeRFE_triggered() { qDebug("MainWindow::on_action_LimeRFE_triggered"); -#if defined(HAS_LIMERFE) +#if defined(HAS_LIMERFEUSB) qDebug("MainWindow::on_action_LimeRFE_triggered: activated"); LimeRFEUSBDialog *limeRFEUSBDialog = new LimeRFEUSBDialog(m_settings.getLimeRFEUSBCalib(), this); limeRFEUSBDialog->setModal(false); diff --git a/sdrgui/readme.md b/sdrgui/readme.md index 8de5fcbf8..629b7bc44 100644 --- a/sdrgui/readme.md +++ b/sdrgui/readme.md @@ -166,7 +166,7 @@ Use this button to dismiss the dialog

1.4 Prefernces - LimeRFE

-When enabled in compilation this opens a dialog to control a LimeRFE device via USB. The details are provided [here](limerfeusbgui.md). +Only in Linux and if LimeSuite library is available this opens a dialog to control a LimeRFE device via USB. The details are provided [here](limerfeusbgui.md).

1.5 Preferences - Devices - User arguments

diff --git a/sdrgui/webapi/webapiadaptergui.cpp b/sdrgui/webapi/webapiadaptergui.cpp index 72bfc986f..065da5590 100644 --- a/sdrgui/webapi/webapiadaptergui.cpp +++ b/sdrgui/webapi/webapiadaptergui.cpp @@ -68,7 +68,7 @@ #include "SWGLimeRFESettings.h" #include "SWGLimeRFEPower.h" -#ifdef HAS_LIMERFE +#ifdef HAS_LIMERFEUSB #include "limerfe/limerfecontroller.h" #endif @@ -837,7 +837,7 @@ int WebAPIAdapterGUI::instanceAMBEDevicesPatch( return 200; } -#ifdef HAS_LIMERFE +#ifdef HAS_LIMERFEUSB int WebAPIAdapterGUI::instanceLimeRFESerialGet( SWGSDRangel::SWGLimeRFEDevices& response, SWGSDRangel::SWGErrorResponse& error) diff --git a/sdrgui/webapi/webapiadaptergui.h b/sdrgui/webapi/webapiadaptergui.h index 21eb5ff87..8679b28b3 100644 --- a/sdrgui/webapi/webapiadaptergui.h +++ b/sdrgui/webapi/webapiadaptergui.h @@ -140,7 +140,7 @@ public: SWGSDRangel::SWGSuccessResponse& response, SWGSDRangel::SWGErrorResponse& error); -#ifdef HAS_LIMERFE +#ifdef HAS_LIMERFEUSB virtual int instanceLimeRFESerialGet( SWGSDRangel::SWGLimeRFEDevices& response, SWGSDRangel::SWGErrorResponse& error); diff --git a/sdrsrv/CMakeLists.txt b/sdrsrv/CMakeLists.txt index 0d210a2f3..30189c573 100644 --- a/sdrsrv/CMakeLists.txt +++ b/sdrsrv/CMakeLists.txt @@ -12,10 +12,10 @@ set(sdrsrv_HEADERS webapi/webapiadaptersrv.h ) -if (LIMERFE_FOUND) +if (LIMESUITE_FOUND) include_directories(${LIMESUITE_INCLUDE_DIR}) set(sdrgui_LIMERFE_LIB ${LIMESUITE_LIBRARY}) -endif (LIMERFE_FOUND) +endif (LIMESUITE_FOUND) include_directories( ${CMAKE_SOURCE_DIR}/exports diff --git a/sdrsrv/webapi/webapiadaptersrv.cpp b/sdrsrv/webapi/webapiadaptersrv.cpp index 8d498c26f..22c5da222 100644 --- a/sdrsrv/webapi/webapiadaptersrv.cpp +++ b/sdrsrv/webapi/webapiadaptersrv.cpp @@ -66,7 +66,7 @@ #include "webapi/webapiadapterbase.h" #include "webapiadaptersrv.h" -#ifdef HAS_LIMERFE +#ifdef HAS_LIMERFEUSB #include "limerfe/limerfecontroller.h" #endif @@ -820,7 +820,7 @@ int WebAPIAdapterSrv::instanceAMBEDevicesPatch( return 200; } -#ifdef HAS_LIMERFE +#ifdef HAS_LIMERFEUSB int WebAPIAdapterSrv::instanceLimeRFESerialGet( SWGSDRangel::SWGLimeRFEDevices& response, SWGSDRangel::SWGErrorResponse& error) diff --git a/sdrsrv/webapi/webapiadaptersrv.h b/sdrsrv/webapi/webapiadaptersrv.h index 3bec90a9c..f2688833c 100644 --- a/sdrsrv/webapi/webapiadaptersrv.h +++ b/sdrsrv/webapi/webapiadaptersrv.h @@ -140,7 +140,7 @@ public: SWGSDRangel::SWGSuccessResponse& response, SWGSDRangel::SWGErrorResponse& error); -#ifdef HAS_LIMERFE +#ifdef HAS_LIMERFEUSB virtual int instanceLimeRFESerialGet( SWGSDRangel::SWGLimeRFEDevices& response, SWGSDRangel::SWGErrorResponse& error);