LimeRFE USB support: now merged in LimeSuite master. Made Linux specific

This commit is contained in:
f4exb 2020-01-24 23:05:16 +01:00
parent 20f17b78b3
commit f55151ce50
13 changed files with 19 additions and 32 deletions

View File

@ -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

View File

@ -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)

View File

@ -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 "")

View File

@ -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)

View File

@ -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})

View File

@ -1,6 +1,6 @@
<h1>LimeRFE USB control</h1>
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.

View File

@ -80,7 +80,7 @@
#include <QDebug>
#include <QSplashScreen>
#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);

View File

@ -166,7 +166,7 @@ Use this button to dismiss the dialog
<h4>1.4 Prefernces - LimeRFE</h4>
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).
<h4>1.5 Preferences - Devices - User arguments</h4>

View File

@ -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)

View File

@ -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);

View File

@ -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

View File

@ -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)

View File

@ -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);