Bandplan system

This commit is contained in:
Ryzerth
2020-08-04 21:34:56 +02:00
parent cd7e5cf1bc
commit 022898c61d
155 changed files with 49138 additions and 107 deletions

View File

@@ -1,13 +1,16 @@
#include <string>
#include <SoapySDR/Device.hpp>
#include <SoapySDR/Modules.hpp>
#include <SoapySDR/Logger.hpp>
#include <dsp/stream.h>
#include <dsp/types.h>
#include <spdlog/spdlog.h>
namespace io {
class SoapyWrapper {
public:
SoapyWrapper() {
SoapySDR::registerLogHandler(_logHandler);
output.init(64000);
currentGains = new float[1];
refresh();
@@ -131,10 +134,21 @@ namespace io {
}
_this->output.write(buf, res);
}
printf("Read worker terminated\n");
delete[] buf;
}
static void _logHandler(const SoapySDRLogLevel lvl, const char* message) {
if (lvl == SOAPY_SDR_FATAL || lvl == SOAPY_SDR_CRITICAL || lvl == SOAPY_SDR_ERROR) {
spdlog::error(message);
}
else if (lvl == SOAPY_SDR_WARNING) {
spdlog::warn(message);
}
else if (lvl == SOAPY_SDR_NOTICE | SOAPY_SDR_INFO) {
spdlog::info(message);
}
}
SoapySDR::Kwargs args;
SoapySDR::Device* dev;
SoapySDR::Stream* _stream;