1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-23 01:55:48 -05:00

Windows: MSVC2017: completed SoapySDR support

This commit is contained in:
f4exb 2018-11-16 08:15:10 +01:00
parent 3da7933fa7
commit b0fa7c2591
6 changed files with 76 additions and 19 deletions

View File

@ -1643,6 +1643,19 @@ void SoapySDROutput::webapiFormatDeviceReport(SWGSDRangel::SWGDeviceReport& resp
}
}
QVariant SoapySDROutput::webapiVariantFromArgValue(SWGSDRangel::SWGArgValue *argValue)
{
if (*argValue->getValueType() == "bool") {
return QVariant((bool) (*argValue->getValueString() == "1"));
} else if (*argValue->getValueType() == "int") {
return QVariant((int) (atoi(argValue->getValueString()->toStdString().c_str())));
} else if (*argValue->getValueType() == "float") {
return QVariant((double) (atof(argValue->getValueString()->toStdString().c_str())));
} else {
return QVariant(QString(*argValue->getValueString()));
}
}
void SoapySDROutput::webapiFormatArgValue(const QVariant& v, SWGSDRangel::SWGArgValue *argValue)
{
if (v.type() == QVariant::Bool)

View File

@ -0,0 +1,43 @@
#-------------------------------------------------
#
# Pro file for Windows MSVC builds with Qt Creator
#
#-------------------------------------------------
TEMPLATE = lib
CONFIG += plugin
QT += core gui multimedia opengl
TARGET = outputsoapysdr
INCLUDEPATH += $$PWD
INCLUDEPATH += ../../../exports
INCLUDEPATH += ../../../sdrbase
INCLUDEPATH += ../../../sdrgui
INCLUDEPATH += ../../../devices
INCLUDEPATH += ../../../swagger/sdrangel/code/qt5/client
INCLUDEPATH += "C:\Programs\PothosSDR\include"
CONFIG(Release):build_subdir = release
CONFIG(Debug):build_subdir = debug
SOURCES += soapysdroutput.cpp\
soapysdroutputgui.cpp\
soapysdroutputplugin.cpp\
soapysdroutputsettings.cpp\
soapysdroutputthread.cpp
HEADERS += soapysdroutput.h\
soapysdroutputgui.h\
soapysdroutputplugin.h\
soapysdroutputsettings.h\
soapysdroutputthread.h
FORMS += soapysdroutputgui.ui
LIBS += -L../../../sdrbase/$${build_subdir} -lsdrbase
LIBS += -L../../../sdrgui/$${build_subdir} -lsdrgui
LIBS += -L../../../swagger/$${build_subdir} -lswagger
LIBS += -L../../../devices/$${build_subdir} -ldevices
LIBS += -LC:\Programs\PothosSDR\bin -LC:\Programs\PothosSDR\lib -lSoapySDR

View File

@ -9,7 +9,7 @@ CONFIG += plugin
QT += core gui multimedia opengl
TARGET = inputsoapysdrinput
TARGET = inputsoapysdr
INCLUDEPATH += $$PWD
INCLUDEPATH += ../../../exports
@ -39,4 +39,5 @@ FORMS += soapysdrinputgui.ui
LIBS += -L../../../sdrbase/$${build_subdir} -lsdrbase
LIBS += -L../../../sdrgui/$${build_subdir} -lsdrgui
LIBS += -L../../../swagger/$${build_subdir} -lswagger
LIBS += -L../../../devices/$${build_subdir} -ldevices
LIBS += -LC:\Programs\PothosSDR\bin -LC:\Programs\PothosSDR\lib -lSoapySDR

View File

@ -39,6 +39,7 @@ SUBDIRS += plugins/samplesource/limesdrinput
CONFIG(!MSVC):SUBDIRS += plugins/samplesource/plutosdrinput
CONFIG(MSVC):SUBDIRS += plugins/samplesource/sdrdaemonsource
SUBDIRS += plugins/samplesource/rtlsdr
CONFIG(MSVC):SUBDIRS += plugins/samplesource/soapysdrinput
SUBDIRS += plugins/samplesource/testsource
SUBDIRS += plugins/samplesink/filesink
CONFIG(!MSVC):SUBDIRS += plugins/samplesink/bladerf1output
@ -47,6 +48,7 @@ SUBDIRS += plugins/samplesink/hackrfoutput
SUBDIRS += plugins/samplesink/limesdroutput
CONFIG(!MSVC):SUBDIRS += plugins/samplesink/plutosdroutput
CONFIG(MSVC):SUBDIRS += plugins/samplesink/sdrdaemonsink
CONFIG(MSVC):SUBDIRS += plugins/samplesink/soapysdroutput
SUBDIRS += plugins/channelrx/chanalyzer
SUBDIRS += plugins/channelrx/demodam
SUBDIRS += plugins/channelrx/demodatv

View File

@ -24,12 +24,23 @@
#include <stdint.h>
#include "dsp/dsptypes.h"
#include "dsp/hbfiltertraits.h"
#include "export.h"
template<typename AccuType, uint32_t HBFilterOrder>
class SDRBASE_API IntHalfbandFilterDB {
class IntHalfbandFilterDB {
public:
IntHalfbandFilterDB();
IntHalfbandFilterDB()
{
m_size = HBFIRFilterTraits<HBFilterOrder>::hbOrder - 1;
for (int i = 0; i < m_size; i++)
{
m_samplesDB[i][0] = 0;
m_samplesDB[i][1] = 0;
}
m_ptr = 0;
m_state = 0;
}
// downsample by 2, return center part of original spectrum
bool workDecimateCenter(Sample* sample)
@ -754,19 +765,4 @@ protected:
}
};
template<typename AccuType, uint32_t HBFilterOrder>
IntHalfbandFilterDB<AccuType, HBFilterOrder>::IntHalfbandFilterDB()
{
m_size = HBFIRFilterTraits<HBFilterOrder>::hbOrder - 1;
for (int i = 0; i < m_size; i++)
{
m_samplesDB[i][0] = 0;
m_samplesDB[i][1] = 0;
}
m_ptr = 0;
m_state = 0;
}
#endif // INCLUDE_INTHALFBANDFILTER_DB_H

View File

@ -75,6 +75,7 @@ REM copy plugins\samplesource\bladerf2input\%1\inputbladerf2.dll %2\plugins\samp
copy plugins\samplesource\limesdrinput\%1\inputlimesdr.dll %2\plugins\samplesource
REM copy plugins\samplesource\plutosdrinput\%1\inputplutosdr.dll %2\plugins\samplesource
copy plugins\samplesource\sdrdaemonsource\%1\inputsdrdaemonsource.dll %2\plugins\samplesource
copy plugins\samplesource\soapysdrinput\%1\inputsoapysdr.dll %2\plugins\samplesource
copy plugins\samplesink\filesink\%1\outputfilesink.dll %2\plugins\samplesink
REM copy plugins\samplesink\bladerf1output\%1\outputbladerf1.dll %2\plugins\samplesink
@ -83,3 +84,4 @@ copy plugins\samplesink\hackrfoutput\%1\outputhackrf.dll %2\plugins\samplesink
copy plugins\samplesink\limesdroutput\%1\outputlimesdr.dll %2\plugins\samplesink
REM copy plugins\samplesink\plutosdroutput\%1\outputplutosdr.dll %2\plugins\samplesink
copy plugins\samplesink\sdrdaemonsink\%1\outputsdrdaemonsink.dll %2\plugins\samplesink
copy plugins\samplesink\soapysdroutput\%1\outputsoapysdr.dll %2\plugins\samplesink