mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-05-30 13:52:25 -04:00
Server: added Perseus input plugin
This commit is contained in:
parent
26ebcc6d1d
commit
362e8a629d
@ -15,7 +15,6 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include <QtPlugin>
|
#include <QtPlugin>
|
||||||
#include <QAction>
|
|
||||||
#include "perseus-sdr.h"
|
#include "perseus-sdr.h"
|
||||||
|
|
||||||
#include <device/devicesourceapi.h>
|
#include <device/devicesourceapi.h>
|
||||||
@ -23,11 +22,15 @@
|
|||||||
#include "util/simpleserializer.h"
|
#include "util/simpleserializer.h"
|
||||||
#include "perseus/deviceperseus.h"
|
#include "perseus/deviceperseus.h"
|
||||||
#include "perseusplugin.h"
|
#include "perseusplugin.h"
|
||||||
|
#ifdef SERVER_MODE
|
||||||
|
#include "perseusinput.h"
|
||||||
|
#else
|
||||||
#include "perseusgui.h"
|
#include "perseusgui.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
const PluginDescriptor PerseusPlugin::m_pluginDescriptor = {
|
const PluginDescriptor PerseusPlugin::m_pluginDescriptor = {
|
||||||
QString("Perseus Input"),
|
QString("Perseus Input"),
|
||||||
QString("3.14.6"),
|
QString("4.0.0"),
|
||||||
QString("(c) Edouard Griffiths, F4EXB"),
|
QString("(c) Edouard Griffiths, F4EXB"),
|
||||||
QString("https://github.com/f4exb/sdrangel"),
|
QString("https://github.com/f4exb/sdrangel"),
|
||||||
true,
|
true,
|
||||||
@ -84,6 +87,15 @@ PluginInterface::SamplingDevices PerseusPlugin::enumSampleSources()
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef SERVER_MODE
|
||||||
|
PluginInstanceGUI* PerseusPlugin::createSampleSourcePluginInstanceGUI(
|
||||||
|
const QString& sourceId __attribute__((unused)),
|
||||||
|
QWidget **widget __attribute__((unused)),
|
||||||
|
DeviceUISet *deviceUISet __attribute__((unused)))
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#else
|
||||||
PluginInstanceGUI* PerseusPlugin::createSampleSourcePluginInstanceGUI(
|
PluginInstanceGUI* PerseusPlugin::createSampleSourcePluginInstanceGUI(
|
||||||
const QString& sourceId,
|
const QString& sourceId,
|
||||||
QWidget **widget,
|
QWidget **widget,
|
||||||
@ -100,6 +112,7 @@ PluginInstanceGUI* PerseusPlugin::createSampleSourcePluginInstanceGUI(
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
DeviceSampleSource *PerseusPlugin::createSampleSourcePluginInstanceInput(const QString& sourceId, DeviceSourceAPI *deviceAPI)
|
DeviceSampleSource *PerseusPlugin::createSampleSourcePluginInstanceInput(const QString& sourceId, DeviceSourceAPI *deviceAPI)
|
||||||
{
|
{
|
||||||
|
@ -47,6 +47,12 @@ if(LIBUSB_FOUND AND LIMESUITE_FOUND)
|
|||||||
add_subdirectory(limesdrinput)
|
add_subdirectory(limesdrinput)
|
||||||
endif(LIBUSB_FOUND AND LIMESUITE_FOUND)
|
endif(LIBUSB_FOUND AND LIMESUITE_FOUND)
|
||||||
|
|
||||||
|
find_package(LibPerseus)
|
||||||
|
if(LIBUSB_FOUND AND RX_SAMPLE_24BIT AND LIBPERSEUS_FOUND)
|
||||||
|
message(STATUS "Server: add Persesus plugin")
|
||||||
|
add_subdirectory(perseus)
|
||||||
|
endif(LIBUSB_FOUND AND RX_SAMPLE_24BIT AND LIBPERSEUS_FOUND)
|
||||||
|
|
||||||
find_package(LibRTLSDR)
|
find_package(LibRTLSDR)
|
||||||
if(LIBUSB_FOUND AND LIBRTLSDR_FOUND)
|
if(LIBUSB_FOUND AND LIBRTLSDR_FOUND)
|
||||||
add_subdirectory(rtlsdr)
|
add_subdirectory(rtlsdr)
|
||||||
@ -57,6 +63,7 @@ if (BUILD_DEBIAN)
|
|||||||
add_subdirectory(airspyhf)
|
add_subdirectory(airspyhf)
|
||||||
add_subdirectory(hackrfinput)
|
add_subdirectory(hackrfinput)
|
||||||
add_subdirectory(limesdrinput)
|
add_subdirectory(limesdrinput)
|
||||||
|
add_subdirectory(perseus)
|
||||||
add_subdirectory(rtlsdr)
|
add_subdirectory(rtlsdr)
|
||||||
endif (BUILD_DEBIAN)
|
endif (BUILD_DEBIAN)
|
||||||
|
|
||||||
|
48
pluginssrv/samplesource/fcdproplus/CMakeLists.txt
Normal file
48
pluginssrv/samplesource/fcdproplus/CMakeLists.txt
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
project(fcdproplus)
|
||||||
|
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||||
|
set(PLUGIN_PREFIX "../../../plugins/samplesource/fcdproplus")
|
||||||
|
|
||||||
|
set(fcdproplus_SOURCES
|
||||||
|
${PLUGIN_PREFIX}/fcdproplusinput.cpp
|
||||||
|
${PLUGIN_PREFIX}/fcdproplusplugin.cpp
|
||||||
|
${PLUGIN_PREFIX}/fcdproplussettings.cpp
|
||||||
|
${PLUGIN_PREFIX}/fcdproplusthread.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
set(fcdproplus_HEADERS
|
||||||
|
${PLUGIN_PREFIX}/fcdproplusinput.h
|
||||||
|
${PLUGIN_PREFIX}/fcdproplusplugin.h
|
||||||
|
${PLUGIN_PREFIX}/fcdproplussettings.h
|
||||||
|
${PLUGIN_PREFIX}/fcdproplusthread.h
|
||||||
|
)
|
||||||
|
|
||||||
|
include_directories(
|
||||||
|
.
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
|
||||||
|
${CMAKE_SOURCE_DIR}/fcdhid
|
||||||
|
${CMAKE_SOURCE_DIR}/fcdlib
|
||||||
|
)
|
||||||
|
|
||||||
|
add_definitions(${QT_DEFINITIONS})
|
||||||
|
add_definitions(-DQT_PLUGIN)
|
||||||
|
add_definitions(-DQT_SHARED)
|
||||||
|
|
||||||
|
add_library(inputfcdproplussrv SHARED
|
||||||
|
${fcdproplus_SOURCES}
|
||||||
|
${fcdproplus_HEADERS_MOC}
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries(inputfcdproplussrv
|
||||||
|
${QT_LIBRARIES}
|
||||||
|
asound
|
||||||
|
fcdhid
|
||||||
|
fcdlib
|
||||||
|
sdrbase
|
||||||
|
swagger
|
||||||
|
)
|
||||||
|
|
||||||
|
qt5_use_modules(inputfcdproplussrv Core)
|
||||||
|
|
||||||
|
install(TARGETS inputfcdproplussrv DESTINATION lib/pluginssrv/samplesource)
|
69
pluginssrv/samplesource/perseus/CMakeLists.txt
Normal file
69
pluginssrv/samplesource/perseus/CMakeLists.txt
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
project(perseus)
|
||||||
|
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||||
|
set(PLUGIN_PREFIX "../../../plugins/samplesource/perseus")
|
||||||
|
|
||||||
|
set(perseus_SOURCES
|
||||||
|
${PLUGIN_PREFIX}/perseusinput.cpp
|
||||||
|
${PLUGIN_PREFIX}/perseusplugin.cpp
|
||||||
|
${PLUGIN_PREFIX}/perseussettings.cpp
|
||||||
|
${PLUGIN_PREFIX}/perseusthread.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
set(perseus_HEADERS
|
||||||
|
${PLUGIN_PREFIX}/perseusinput.h
|
||||||
|
${PLUGIN_PREFIX}/perseusplugin.h
|
||||||
|
${PLUGIN_PREFIX}/perseussettings.h
|
||||||
|
${PLUGIN_PREFIX}/perseusthread.h
|
||||||
|
)
|
||||||
|
|
||||||
|
if (BUILD_DEBIAN)
|
||||||
|
include_directories(
|
||||||
|
.
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
|
||||||
|
${CMAKE_SOURCE_DIR}/devices
|
||||||
|
${LIBPERSEUSSRC}
|
||||||
|
${LIBPERSEUSSRC}/libperseus/src
|
||||||
|
)
|
||||||
|
else (BUILD_DEBIAN)
|
||||||
|
include_directories(
|
||||||
|
.
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
|
||||||
|
${CMAKE_SOURCE_DIR}/devices
|
||||||
|
${LIBPERSEUS_INCLUDE_DIR}
|
||||||
|
)
|
||||||
|
endif (BUILD_DEBIAN)
|
||||||
|
|
||||||
|
add_definitions("${QT_DEFINITIONS} -DLIBAIRSPY_DYN_RATES")
|
||||||
|
add_definitions(-DQT_PLUGIN)
|
||||||
|
add_definitions(-DQT_SHARED)
|
||||||
|
|
||||||
|
add_library(inputperseussrv SHARED
|
||||||
|
${perseus_SOURCES}
|
||||||
|
${perseus_HEADERS_MOC}
|
||||||
|
)
|
||||||
|
|
||||||
|
if (BUILD_DEBIAN)
|
||||||
|
target_link_libraries(inputperseussrv
|
||||||
|
${QT_LIBRARIES}
|
||||||
|
perseus
|
||||||
|
sdrbase
|
||||||
|
swagger
|
||||||
|
perseusdevice
|
||||||
|
)
|
||||||
|
else (BUILD_DEBIAN)
|
||||||
|
target_link_libraries(inputperseussrv
|
||||||
|
${QT_LIBRARIES}
|
||||||
|
${LIBPERSEUS_LIBRARIES}
|
||||||
|
sdrbase
|
||||||
|
swagger
|
||||||
|
perseusdevice
|
||||||
|
)
|
||||||
|
endif (BUILD_DEBIAN)
|
||||||
|
|
||||||
|
|
||||||
|
qt5_use_modules(inputperseussrv Core)
|
||||||
|
|
||||||
|
install(TARGETS inputperseussrv DESTINATION lib/pluginssrv/samplesource)
|
Loading…
x
Reference in New Issue
Block a user