mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2025-06-27 04:47:51 +02:00
Switched to a custom logging lib instead of that spdlog junk
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
#include <imgui.h>
|
||||
#include <spdlog/spdlog.h>
|
||||
#include <utils/flog.h>
|
||||
#include <module.h>
|
||||
#include <gui/gui.h>
|
||||
#include <signal_path/signal_path.h>
|
||||
@ -136,7 +136,7 @@ public:
|
||||
if (err != 0) {
|
||||
char buf[1024];
|
||||
sprintf(buf, "%016" PRIX64, serial);
|
||||
spdlog::error("Could not open Airspy {0}", buf);
|
||||
flog::error("Could not open Airspy {0}", buf);
|
||||
selectedSerial = 0;
|
||||
return;
|
||||
}
|
||||
@ -144,7 +144,7 @@ public:
|
||||
catch (std::exception e) {
|
||||
char buf[1024];
|
||||
sprintf(buf, "%016" PRIX64, serial);
|
||||
spdlog::error("Could not open Airspy {0}", buf);
|
||||
flog::error("Could not open Airspy {0}", buf);
|
||||
}
|
||||
selectedSerial = serial;
|
||||
|
||||
@ -249,19 +249,19 @@ private:
|
||||
static void menuSelected(void* ctx) {
|
||||
AirspySourceModule* _this = (AirspySourceModule*)ctx;
|
||||
core::setInputSampleRate(_this->sampleRate);
|
||||
spdlog::info("AirspySourceModule '{0}': Menu Select!", _this->name);
|
||||
flog::info("AirspySourceModule '{0}': Menu Select!", _this->name);
|
||||
}
|
||||
|
||||
static void menuDeselected(void* ctx) {
|
||||
AirspySourceModule* _this = (AirspySourceModule*)ctx;
|
||||
spdlog::info("AirspySourceModule '{0}': Menu Deselect!", _this->name);
|
||||
flog::info("AirspySourceModule '{0}': Menu Deselect!", _this->name);
|
||||
}
|
||||
|
||||
static void start(void* ctx) {
|
||||
AirspySourceModule* _this = (AirspySourceModule*)ctx;
|
||||
if (_this->running) { return; }
|
||||
if (_this->selectedSerial == 0) {
|
||||
spdlog::error("Tried to start Airspy source with null serial");
|
||||
flog::error("Tried to start Airspy source with null serial");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -273,7 +273,7 @@ private:
|
||||
if (err != 0) {
|
||||
char buf[1024];
|
||||
sprintf(buf, "%016" PRIX64, _this->selectedSerial);
|
||||
spdlog::error("Could not open Airspy {0}", buf);
|
||||
flog::error("Could not open Airspy {0}", buf);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -313,7 +313,7 @@ private:
|
||||
airspy_start_rx(_this->openDev, callback, _this);
|
||||
|
||||
_this->running = true;
|
||||
spdlog::info("AirspySourceModule '{0}': Start!", _this->name);
|
||||
flog::info("AirspySourceModule '{0}': Start!", _this->name);
|
||||
}
|
||||
|
||||
static void stop(void* ctx) {
|
||||
@ -323,7 +323,7 @@ private:
|
||||
_this->stream.stopWriter();
|
||||
airspy_close(_this->openDev);
|
||||
_this->stream.clearWriteStop();
|
||||
spdlog::info("AirspySourceModule '{0}': Stop!", _this->name);
|
||||
flog::info("AirspySourceModule '{0}': Stop!", _this->name);
|
||||
}
|
||||
|
||||
static void tune(double freq, void* ctx) {
|
||||
@ -332,7 +332,7 @@ private:
|
||||
airspy_set_freq(_this->openDev, freq);
|
||||
}
|
||||
_this->freq = freq;
|
||||
spdlog::info("AirspySourceModule '{0}': Tune: {1}!", _this->name, freq);
|
||||
flog::info("AirspySourceModule '{0}': Tune: {1}!", _this->name, freq);
|
||||
}
|
||||
|
||||
static void menuHandler(void* ctx) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include <spdlog/spdlog.h>
|
||||
#include <utils/flog.h>
|
||||
#include <module.h>
|
||||
#include <gui/gui.h>
|
||||
#include <signal_path/signal_path.h>
|
||||
@ -132,14 +132,14 @@ public:
|
||||
#ifndef __ANDROID__
|
||||
int err = airspyhf_open_sn(&dev, serial);
|
||||
#else
|
||||
spdlog::warn("==== CALLING airspyhf_open_fd ====");
|
||||
flog::warn("==== CALLING airspyhf_open_fd ====");
|
||||
int err = airspyhf_open_fd(&dev, devFd);
|
||||
spdlog::warn("==== CALLED airspyhf_open_fd => ({0}) ====", err);
|
||||
flog::warn("==== CALLED airspyhf_open_fd => ({0}) ====", err);
|
||||
#endif
|
||||
if (err != 0) {
|
||||
char buf[1024];
|
||||
sprintf(buf, "%016" PRIX64, serial);
|
||||
spdlog::error("Could not open Airspy HF+ {0}", buf);
|
||||
flog::error("Could not open Airspy HF+ {0}", buf);
|
||||
selectedSerial = 0;
|
||||
return;
|
||||
}
|
||||
@ -147,7 +147,7 @@ public:
|
||||
catch (std::exception e) {
|
||||
char buf[1024];
|
||||
sprintf(buf, "%016" PRIX64, serial);
|
||||
spdlog::error("Could not open Airspy HF+ {0}", buf);
|
||||
flog::error("Could not open Airspy HF+ {0}", buf);
|
||||
}
|
||||
|
||||
selectedSerial = serial;
|
||||
@ -227,19 +227,19 @@ private:
|
||||
static void menuSelected(void* ctx) {
|
||||
AirspyHFSourceModule* _this = (AirspyHFSourceModule*)ctx;
|
||||
core::setInputSampleRate(_this->sampleRate);
|
||||
spdlog::info("AirspyHFSourceModule '{0}': Menu Select!", _this->name);
|
||||
flog::info("AirspyHFSourceModule '{0}': Menu Select!", _this->name);
|
||||
}
|
||||
|
||||
static void menuDeselected(void* ctx) {
|
||||
AirspyHFSourceModule* _this = (AirspyHFSourceModule*)ctx;
|
||||
spdlog::info("AirspyHFSourceModule '{0}': Menu Deselect!", _this->name);
|
||||
flog::info("AirspyHFSourceModule '{0}': Menu Deselect!", _this->name);
|
||||
}
|
||||
|
||||
static void start(void* ctx) {
|
||||
AirspyHFSourceModule* _this = (AirspyHFSourceModule*)ctx;
|
||||
if (_this->running) { return; }
|
||||
if (_this->selectedSerial == 0) {
|
||||
spdlog::error("Tried to start AirspyHF+ source with null serial");
|
||||
flog::error("Tried to start AirspyHF+ source with null serial");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -251,7 +251,7 @@ private:
|
||||
if (err != 0) {
|
||||
char buf[1024];
|
||||
sprintf(buf, "%016" PRIX64, _this->selectedSerial);
|
||||
spdlog::error("Could not open Airspy HF+ {0}", buf);
|
||||
flog::error("Could not open Airspy HF+ {0}", buf);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -267,7 +267,7 @@ private:
|
||||
airspyhf_start(_this->openDev, callback, _this);
|
||||
|
||||
_this->running = true;
|
||||
spdlog::info("AirspyHFSourceModule '{0}': Start!", _this->name);
|
||||
flog::info("AirspyHFSourceModule '{0}': Start!", _this->name);
|
||||
}
|
||||
|
||||
static void stop(void* ctx) {
|
||||
@ -277,7 +277,7 @@ private:
|
||||
_this->stream.stopWriter();
|
||||
airspyhf_close(_this->openDev);
|
||||
_this->stream.clearWriteStop();
|
||||
spdlog::info("AirspyHFSourceModule '{0}': Stop!", _this->name);
|
||||
flog::info("AirspyHFSourceModule '{0}': Stop!", _this->name);
|
||||
}
|
||||
|
||||
static void tune(double freq, void* ctx) {
|
||||
@ -286,7 +286,7 @@ private:
|
||||
airspyhf_set_freq(_this->openDev, freq);
|
||||
}
|
||||
_this->freq = freq;
|
||||
spdlog::info("AirspyHFSourceModule '{0}': Tune: {1}!", _this->name, freq);
|
||||
flog::info("AirspyHFSourceModule '{0}': Tune: {1}!", _this->name, freq);
|
||||
}
|
||||
|
||||
static void menuHandler(void* ctx) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include <spdlog/spdlog.h>
|
||||
#include <utils/flog.h>
|
||||
#include <module.h>
|
||||
#include <gui/gui.h>
|
||||
#include <signal_path/signal_path.h>
|
||||
@ -97,7 +97,7 @@ public:
|
||||
devices.define(info.name, info.name, dinfo);
|
||||
}
|
||||
catch (std::exception e) {
|
||||
spdlog::error("Error getting audio device info: {0}", e.what());
|
||||
flog::error("Error getting audio device info: {0}", e.what());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -162,12 +162,12 @@ private:
|
||||
static void menuSelected(void* ctx) {
|
||||
AudioSourceModule* _this = (AudioSourceModule*)ctx;
|
||||
core::setInputSampleRate(_this->sampleRate);
|
||||
spdlog::info("AudioSourceModule '{0}': Menu Select!", _this->name);
|
||||
flog::info("AudioSourceModule '{0}': Menu Select!", _this->name);
|
||||
}
|
||||
|
||||
static void menuDeselected(void* ctx) {
|
||||
AudioSourceModule* _this = (AudioSourceModule*)ctx;
|
||||
spdlog::info("AudioSourceModule '{0}': Menu Deselect!", _this->name);
|
||||
flog::info("AudioSourceModule '{0}': Menu Deselect!", _this->name);
|
||||
}
|
||||
|
||||
static void start(void* ctx) {
|
||||
@ -190,10 +190,10 @@ private:
|
||||
_this->running = true;
|
||||
}
|
||||
catch (std::exception e) {
|
||||
spdlog::error("Error opening audio device: {0}", e.what());
|
||||
flog::error("Error opening audio device: {0}", e.what());
|
||||
}
|
||||
|
||||
spdlog::info("AudioSourceModule '{0}': Start!", _this->name);
|
||||
flog::info("AudioSourceModule '{0}': Start!", _this->name);
|
||||
}
|
||||
|
||||
static void stop(void* ctx) {
|
||||
@ -204,7 +204,7 @@ private:
|
||||
_this->audio.stopStream();
|
||||
_this->audio.closeStream();
|
||||
|
||||
spdlog::info("AudioSourceModule '{0}': Stop!", _this->name);
|
||||
flog::info("AudioSourceModule '{0}': Stop!", _this->name);
|
||||
}
|
||||
|
||||
static void tune(double freq, void* ctx) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include <imgui.h>
|
||||
#include <spdlog/spdlog.h>
|
||||
#include <utils/flog.h>
|
||||
#include <module.h>
|
||||
#include <gui/gui.h>
|
||||
#include <signal_path/signal_path.h>
|
||||
@ -87,7 +87,7 @@ public:
|
||||
|
||||
devCount = bladerf_get_device_list(&devInfoList);
|
||||
if (devCount < 0) {
|
||||
spdlog::error("Could not list devices {0}", devCount);
|
||||
flog::error("Could not list devices {0}", devCount);
|
||||
return;
|
||||
}
|
||||
for (int i = 0; i < devCount; i++) {
|
||||
@ -123,7 +123,7 @@ public:
|
||||
void selectByInfo(bladerf_devinfo* info, bool reloadChannelId = true) {
|
||||
int ret = bladerf_open_with_devinfo(&openDev, info);
|
||||
if (ret != 0) {
|
||||
spdlog::error("Could not open device {0}", info->serial);
|
||||
flog::error("Could not open device {0}", info->serial);
|
||||
selectedSerial = "";
|
||||
return;
|
||||
}
|
||||
@ -336,12 +336,12 @@ private:
|
||||
static void menuSelected(void* ctx) {
|
||||
BladeRFSourceModule* _this = (BladeRFSourceModule*)ctx;
|
||||
core::setInputSampleRate(_this->sampleRate);
|
||||
spdlog::info("BladeRFSourceModule '{0}': Menu Select!", _this->name);
|
||||
flog::info("BladeRFSourceModule '{0}': Menu Select!", _this->name);
|
||||
}
|
||||
|
||||
static void menuDeselected(void* ctx) {
|
||||
BladeRFSourceModule* _this = (BladeRFSourceModule*)ctx;
|
||||
spdlog::info("BladeRFSourceModule '{0}': Menu Deselect!", _this->name);
|
||||
flog::info("BladeRFSourceModule '{0}': Menu Deselect!", _this->name);
|
||||
}
|
||||
|
||||
static void start(void* ctx) {
|
||||
@ -353,7 +353,7 @@ private:
|
||||
bladerf_devinfo info = _this->devInfoList[_this->devId];
|
||||
int ret = bladerf_open_with_devinfo(&_this->openDev, &info);
|
||||
if (ret != 0) {
|
||||
spdlog::error("Could not open device {0}", info.serial);
|
||||
flog::error("Could not open device {0}", info.serial);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -389,7 +389,7 @@ private:
|
||||
_this->running = true;
|
||||
_this->workerThread = std::thread(&BladeRFSourceModule::worker, _this);
|
||||
|
||||
spdlog::info("BladeRFSourceModule '{0}': Start!", _this->name);
|
||||
flog::info("BladeRFSourceModule '{0}': Start!", _this->name);
|
||||
}
|
||||
|
||||
static void stop(void* ctx) {
|
||||
@ -411,7 +411,7 @@ private:
|
||||
bladerf_close(_this->openDev);
|
||||
|
||||
_this->stream.clearWriteStop();
|
||||
spdlog::info("BladeRFSourceModule '{0}': Stop!", _this->name);
|
||||
flog::info("BladeRFSourceModule '{0}': Stop!", _this->name);
|
||||
}
|
||||
|
||||
static void tune(double freq, void* ctx) {
|
||||
@ -420,7 +420,7 @@ private:
|
||||
if (_this->running) {
|
||||
bladerf_set_frequency(_this->openDev, BLADERF_CHANNEL_RX(_this->chanId), _this->freq);
|
||||
}
|
||||
spdlog::info("BladeRFSourceModule '{0}': Tune: {1}!", _this->name, freq);
|
||||
flog::info("BladeRFSourceModule '{0}': Tune: {1}!", _this->name, freq);
|
||||
}
|
||||
|
||||
static void menuHandler(void* ctx) {
|
||||
@ -512,7 +512,7 @@ private:
|
||||
SmGui::FillWidth();
|
||||
if (SmGui::SliderInt("##_balderf_oag_sel_", &_this->overallGain, (_this->gainRange != NULL) ? _this->gainRange->min : 0, (_this->gainRange != NULL) ? _this->gainRange->max : 60)) {
|
||||
if (_this->running) {
|
||||
spdlog::info("Setting gain to {0}", _this->overallGain);
|
||||
flog::info("Setting gain to {0}", _this->overallGain);
|
||||
bladerf_set_gain(_this->openDev, BLADERF_CHANNEL_RX(_this->chanId), _this->overallGain);
|
||||
}
|
||||
if (_this->selectedSerial != "") {
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include <imgui.h>
|
||||
#include <spdlog/spdlog.h>
|
||||
#include <utils/flog.h>
|
||||
#include <module.h>
|
||||
#include <gui/gui.h>
|
||||
#include <signal_path/signal_path.h>
|
||||
@ -73,7 +73,7 @@ private:
|
||||
//gui::freqSelect.minFreq = _this->centerFreq - (_this->sampleRate/2);
|
||||
//gui::freqSelect.maxFreq = _this->centerFreq + (_this->sampleRate/2);
|
||||
//gui::freqSelect.limitFreq = true;
|
||||
spdlog::info("FileSourceModule '{0}': Menu Select!", _this->name);
|
||||
flog::info("FileSourceModule '{0}': Menu Select!", _this->name);
|
||||
}
|
||||
|
||||
static void menuDeselected(void* ctx) {
|
||||
@ -81,7 +81,7 @@ private:
|
||||
sigpath::iqFrontEnd.setBuffering(true);
|
||||
//gui::freqSelect.limitFreq = false;
|
||||
gui::waterfall.centerFrequencyLocked = false;
|
||||
spdlog::info("FileSourceModule '{0}': Menu Deselect!", _this->name);
|
||||
flog::info("FileSourceModule '{0}': Menu Deselect!", _this->name);
|
||||
}
|
||||
|
||||
static void start(void* ctx) {
|
||||
@ -90,7 +90,7 @@ private:
|
||||
if (_this->reader == NULL) { return; }
|
||||
_this->running = true;
|
||||
_this->workerThread = _this->float32Mode ? std::thread(floatWorker, _this) : std::thread(worker, _this);
|
||||
spdlog::info("FileSourceModule '{0}': Start!", _this->name);
|
||||
flog::info("FileSourceModule '{0}': Start!", _this->name);
|
||||
}
|
||||
|
||||
static void stop(void* ctx) {
|
||||
@ -102,12 +102,12 @@ private:
|
||||
_this->stream.clearWriteStop();
|
||||
_this->running = false;
|
||||
_this->reader->rewind();
|
||||
spdlog::info("FileSourceModule '{0}': Stop!", _this->name);
|
||||
flog::info("FileSourceModule '{0}': Stop!", _this->name);
|
||||
}
|
||||
|
||||
static void tune(double freq, void* ctx) {
|
||||
FileSourceModule* _this = (FileSourceModule*)ctx;
|
||||
spdlog::info("FileSourceModule '{0}': Tune: {1}!", _this->name, freq);
|
||||
flog::info("FileSourceModule '{0}': Tune: {1}!", _this->name, freq);
|
||||
}
|
||||
|
||||
static void menuHandler(void* ctx) {
|
||||
@ -131,7 +131,7 @@ private:
|
||||
//gui::freqSelect.limitFreq = true;
|
||||
}
|
||||
catch (std::exception e) {
|
||||
spdlog::error("Error: {0}", e.what());
|
||||
flog::error("Error: {0}", e.what());
|
||||
}
|
||||
config.acquire();
|
||||
config.conf["path"] = _this->fileSelect.path;
|
||||
@ -175,7 +175,7 @@ private:
|
||||
std::regex expr("[0-9]+Hz");
|
||||
std::smatch matches;
|
||||
std::regex_search(filename, matches, expr);
|
||||
spdlog::warn("{0} {1}", filename, matches.size());
|
||||
flog::warn("{0} {1}", filename, matches.size());
|
||||
if (matches.empty()) { return 0; }
|
||||
std::string freqStr = matches[0].str();
|
||||
return std::atof(freqStr.substr(0, freqStr.size() - 2).c_str());
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include <spdlog/spdlog.h>
|
||||
#include <utils/flog.h>
|
||||
#include <module.h>
|
||||
#include <gui/gui.h>
|
||||
#include <signal_path/signal_path.h>
|
||||
@ -224,12 +224,12 @@ private:
|
||||
static void menuSelected(void* ctx) {
|
||||
HackRFSourceModule* _this = (HackRFSourceModule*)ctx;
|
||||
core::setInputSampleRate(_this->sampleRate);
|
||||
spdlog::info("HackRFSourceModule '{0}': Menu Select!", _this->name);
|
||||
flog::info("HackRFSourceModule '{0}': Menu Select!", _this->name);
|
||||
}
|
||||
|
||||
static void menuDeselected(void* ctx) {
|
||||
HackRFSourceModule* _this = (HackRFSourceModule*)ctx;
|
||||
spdlog::info("HackRFSourceModule '{0}': Menu Deselect!", _this->name);
|
||||
flog::info("HackRFSourceModule '{0}': Menu Deselect!", _this->name);
|
||||
}
|
||||
|
||||
int bandwidthIdToBw(int id) {
|
||||
@ -241,7 +241,7 @@ private:
|
||||
HackRFSourceModule* _this = (HackRFSourceModule*)ctx;
|
||||
if (_this->running) { return; }
|
||||
if (_this->selectedSerial == "") {
|
||||
spdlog::error("Tried to start HackRF source with empty serial");
|
||||
flog::error("Tried to start HackRF source with empty serial");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -251,7 +251,7 @@ private:
|
||||
hackrf_error err = (hackrf_error)hackrf_open_by_fd(_this->devFd, &_this->openDev);
|
||||
#endif
|
||||
if (err != HACKRF_SUCCESS) {
|
||||
spdlog::error("Could not open HackRF {0}: {1}", _this->selectedSerial, hackrf_error_name(err));
|
||||
flog::error("Could not open HackRF {0}: {1}", _this->selectedSerial, hackrf_error_name(err));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -267,7 +267,7 @@ private:
|
||||
hackrf_start_rx(_this->openDev, callback, _this);
|
||||
|
||||
_this->running = true;
|
||||
spdlog::info("HackRFSourceModule '{0}': Start!", _this->name);
|
||||
flog::info("HackRFSourceModule '{0}': Start!", _this->name);
|
||||
}
|
||||
|
||||
static void stop(void* ctx) {
|
||||
@ -278,10 +278,10 @@ private:
|
||||
// TODO: Stream stop
|
||||
hackrf_error err = (hackrf_error)hackrf_close(_this->openDev);
|
||||
if (err != HACKRF_SUCCESS) {
|
||||
spdlog::error("Could not close HackRF {0}: {1}", _this->selectedSerial, hackrf_error_name(err));
|
||||
flog::error("Could not close HackRF {0}: {1}", _this->selectedSerial, hackrf_error_name(err));
|
||||
}
|
||||
_this->stream.clearWriteStop();
|
||||
spdlog::info("HackRFSourceModule '{0}': Stop!", _this->name);
|
||||
flog::info("HackRFSourceModule '{0}': Stop!", _this->name);
|
||||
}
|
||||
|
||||
static void tune(double freq, void* ctx) {
|
||||
@ -290,7 +290,7 @@ private:
|
||||
hackrf_set_freq(_this->openDev, freq);
|
||||
}
|
||||
_this->freq = freq;
|
||||
spdlog::info("HackRFSourceModule '{0}': Tune: {1}!", _this->name, freq);
|
||||
flog::info("HackRFSourceModule '{0}': Tune: {1}!", _this->name, freq);
|
||||
}
|
||||
|
||||
static void menuHandler(void* ctx) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "hermes.h"
|
||||
#include <spdlog/spdlog.h>
|
||||
#include <utils/flog.h>
|
||||
|
||||
namespace hermes {
|
||||
Client::Client(std::shared_ptr<net::Socket> sock) {
|
||||
@ -71,7 +71,7 @@ namespace hermes {
|
||||
if (filt != lastFilt) {
|
||||
lastFilt = filt;
|
||||
|
||||
spdlog::warn("Setting filters");
|
||||
flog::warn("Setting filters");
|
||||
|
||||
// Set direction and wait for things to be processed
|
||||
writeI2C(I2C_PORT_2, 0x20, 0x00, 0x00);
|
||||
@ -180,7 +180,7 @@ namespace hermes {
|
||||
// Check if this is a response
|
||||
if (hdr->c0 & (1 << 7)) {
|
||||
uint8_t reg = (hdr->c0 >> 1) & 0x3F;
|
||||
spdlog::warn("Got response! Reg={0}, Seq={1}", reg, htonl(pkt->seq));
|
||||
flog::warn("Got response! Reg={0}, Seq={1}", reg, (uint32_t)htonl(pkt->seq));
|
||||
}
|
||||
|
||||
// Decode and send IQ to stream
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "hermes.h"
|
||||
#include <spdlog/spdlog.h>
|
||||
#include <utils/flog.h>
|
||||
#include <module.h>
|
||||
#include <gui/gui.h>
|
||||
#include <signal_path/signal_path.h>
|
||||
@ -138,12 +138,12 @@ private:
|
||||
}
|
||||
|
||||
core::setInputSampleRate(_this->sampleRate);
|
||||
spdlog::info("HermesSourceModule '{0}': Menu Select!", _this->name);
|
||||
flog::info("HermesSourceModule '{0}': Menu Select!", _this->name);
|
||||
}
|
||||
|
||||
static void menuDeselected(void* ctx) {
|
||||
HermesSourceModule* _this = (HermesSourceModule*)ctx;
|
||||
spdlog::info("HermesSourceModule '{0}': Menu Deselect!", _this->name);
|
||||
flog::info("HermesSourceModule '{0}': Menu Deselect!", _this->name);
|
||||
}
|
||||
|
||||
static void start(void* ctx) {
|
||||
@ -164,7 +164,7 @@ private:
|
||||
_this->dev->setGain(_this->gain);
|
||||
|
||||
_this->running = true;
|
||||
spdlog::info("HermesSourceModule '{0}': Start!", _this->name);
|
||||
flog::info("HermesSourceModule '{0}': Start!", _this->name);
|
||||
}
|
||||
|
||||
static void stop(void* ctx) {
|
||||
@ -177,7 +177,7 @@ private:
|
||||
_this->dev->close();
|
||||
_this->lnk.stop();
|
||||
|
||||
spdlog::info("HermesSourceModule '{0}': Stop!", _this->name);
|
||||
flog::info("HermesSourceModule '{0}': Stop!", _this->name);
|
||||
}
|
||||
|
||||
static void tune(double freq, void* ctx) {
|
||||
@ -187,7 +187,7 @@ private:
|
||||
_this->dev->setFrequency(freq);
|
||||
}
|
||||
_this->freq = freq;
|
||||
spdlog::info("HermesSourceModule '{0}': Tune: {1}!", _this->name, freq);
|
||||
flog::info("HermesSourceModule '{0}': Tune: {1}!", _this->name, freq);
|
||||
}
|
||||
|
||||
static void menuHandler(void* ctx) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include <spdlog/spdlog.h>
|
||||
#include <utils/flog.h>
|
||||
#include <module.h>
|
||||
#include <gui/gui.h>
|
||||
#include <signal_path/signal_path.h>
|
||||
@ -298,7 +298,7 @@ private:
|
||||
int getBestBandwidth(int sampleRate) {
|
||||
for (int i = 0; i < bandwidths.size(); i++) {
|
||||
if (bandwidths[i] >= sampleRate) {
|
||||
spdlog::warn("Selected bandwidth is {0}", bandwidths[i]);
|
||||
flog::warn("Selected bandwidth is {0}", bandwidths[i]);
|
||||
return bandwidths[i];
|
||||
}
|
||||
}
|
||||
@ -308,12 +308,12 @@ private:
|
||||
static void menuSelected(void* ctx) {
|
||||
LimeSDRSourceModule* _this = (LimeSDRSourceModule*)ctx;
|
||||
core::setInputSampleRate(_this->sampleRate);
|
||||
spdlog::info("LimeSDRSourceModule '{0}': Menu Select!", _this->name);
|
||||
flog::info("LimeSDRSourceModule '{0}': Menu Select!", _this->name);
|
||||
}
|
||||
|
||||
static void menuDeselected(void* ctx) {
|
||||
LimeSDRSourceModule* _this = (LimeSDRSourceModule*)ctx;
|
||||
spdlog::info("LimeSDRSourceModule '{0}': Menu Deselect!", _this->name);
|
||||
flog::info("LimeSDRSourceModule '{0}': Menu Deselect!", _this->name);
|
||||
}
|
||||
|
||||
static void start(void* ctx) {
|
||||
@ -332,7 +332,7 @@ private:
|
||||
LMS_Init(_this->openDev);
|
||||
}
|
||||
|
||||
spdlog::warn("Channel count: {0}", LMS_GetNumChannels(_this->openDev, false));
|
||||
flog::warn("Channel count: {0}", LMS_GetNumChannels(_this->openDev, false));
|
||||
|
||||
// Set options
|
||||
LMS_EnableChannel(_this->openDev, false, _this->chanId, true);
|
||||
@ -359,7 +359,7 @@ private:
|
||||
|
||||
|
||||
_this->running = true;
|
||||
spdlog::info("LimeSDRSourceModule '{0}': Start!", _this->name);
|
||||
flog::info("LimeSDRSourceModule '{0}': Start!", _this->name);
|
||||
}
|
||||
|
||||
static void stop(void* ctx) {
|
||||
@ -376,7 +376,7 @@ private:
|
||||
|
||||
LMS_Close(_this->openDev);
|
||||
|
||||
spdlog::info("LimeSDRSourceModule '{0}': Stop!", _this->name);
|
||||
flog::info("LimeSDRSourceModule '{0}': Stop!", _this->name);
|
||||
}
|
||||
|
||||
static void tune(double freq, void* ctx) {
|
||||
@ -385,7 +385,7 @@ private:
|
||||
if (_this->running) {
|
||||
LMS_SetLOFrequency(_this->openDev, false, _this->chanId, freq);
|
||||
}
|
||||
spdlog::info("LimeSDRSourceModule '{0}': Tune: {1}!", _this->name, freq);
|
||||
flog::info("LimeSDRSourceModule '{0}': Tune: {1}!", _this->name, freq);
|
||||
}
|
||||
|
||||
static void menuHandler(void* ctx) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include <spdlog/spdlog.h>
|
||||
#include <utils/flog.h>
|
||||
#include <module.h>
|
||||
#include <gui/gui.h>
|
||||
#include <signal_path/signal_path.h>
|
||||
@ -108,12 +108,12 @@ private:
|
||||
static void menuSelected(void* ctx) {
|
||||
PlutoSDRSourceModule* _this = (PlutoSDRSourceModule*)ctx;
|
||||
core::setInputSampleRate(_this->sampleRate);
|
||||
spdlog::info("PlutoSDRSourceModule '{0}': Menu Select!", _this->name);
|
||||
flog::info("PlutoSDRSourceModule '{0}': Menu Select!", _this->name);
|
||||
}
|
||||
|
||||
static void menuDeselected(void* ctx) {
|
||||
PlutoSDRSourceModule* _this = (PlutoSDRSourceModule*)ctx;
|
||||
spdlog::info("PlutoSDRSourceModule '{0}': Menu Deselect!", _this->name);
|
||||
flog::info("PlutoSDRSourceModule '{0}': Menu Deselect!", _this->name);
|
||||
}
|
||||
|
||||
static void start(void* ctx) {
|
||||
@ -123,18 +123,18 @@ private:
|
||||
// TODO: INIT CONTEXT HERE
|
||||
_this->ctx = iio_create_context_from_uri(_this->ip);
|
||||
if (_this->ctx == NULL) {
|
||||
spdlog::error("Could not open pluto");
|
||||
flog::error("Could not open pluto");
|
||||
return;
|
||||
}
|
||||
_this->phy = iio_context_find_device(_this->ctx, "ad9361-phy");
|
||||
if (_this->phy == NULL) {
|
||||
spdlog::error("Could not connect to pluto phy");
|
||||
flog::error("Could not connect to pluto phy");
|
||||
iio_context_destroy(_this->ctx);
|
||||
return;
|
||||
}
|
||||
_this->dev = iio_context_find_device(_this->ctx, "cf-ad9361-lpc");
|
||||
if (_this->dev == NULL) {
|
||||
spdlog::error("Could not connect to pluto dev");
|
||||
flog::error("Could not connect to pluto dev");
|
||||
iio_context_destroy(_this->ctx);
|
||||
return;
|
||||
}
|
||||
@ -152,7 +152,7 @@ private:
|
||||
|
||||
_this->running = true;
|
||||
_this->workerThread = std::thread(worker, _this);
|
||||
spdlog::info("PlutoSDRSourceModule '{0}': Start!", _this->name);
|
||||
flog::info("PlutoSDRSourceModule '{0}': Start!", _this->name);
|
||||
}
|
||||
|
||||
static void stop(void* ctx) {
|
||||
@ -169,7 +169,7 @@ private:
|
||||
_this->ctx = NULL;
|
||||
}
|
||||
|
||||
spdlog::info("PlutoSDRSourceModule '{0}': Stop!", _this->name);
|
||||
flog::info("PlutoSDRSourceModule '{0}': Stop!", _this->name);
|
||||
}
|
||||
|
||||
static void tune(double freq, void* ctx) {
|
||||
@ -179,7 +179,7 @@ private:
|
||||
// SET PLUTO FREQ HERE
|
||||
iio_channel_attr_write_longlong(iio_device_find_channel(_this->phy, "altvoltage0", true), "frequency", round(freq));
|
||||
}
|
||||
spdlog::info("PlutoSDRSourceModule '{0}': Tune: {1}!", _this->name, freq);
|
||||
flog::info("PlutoSDRSourceModule '{0}': Tune: {1}!", _this->name, freq);
|
||||
}
|
||||
|
||||
static void menuHandler(void* ctx) {
|
||||
@ -246,7 +246,7 @@ private:
|
||||
|
||||
rxbuf = iio_device_create_buffer(_this->dev, blockSize, false);
|
||||
if (!rxbuf) {
|
||||
spdlog::error("Could not create RX buffer");
|
||||
flog::error("Could not create RX buffer");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include <rfspace_client.h>
|
||||
#include <imgui.h>
|
||||
#include <spdlog/spdlog.h>
|
||||
#include <utils/flog.h>
|
||||
#include <module.h>
|
||||
#include <gui/gui.h>
|
||||
#include <signal_path/signal_path.h>
|
||||
@ -85,13 +85,13 @@ private:
|
||||
RFSpaceSourceModule* _this = (RFSpaceSourceModule*)ctx;
|
||||
core::setInputSampleRate(_this->sampleRate);
|
||||
gui::mainWindow.playButtonLocked = !(_this->client && _this->client->isOpen());
|
||||
spdlog::info("RFSpaceSourceModule '{0}': Menu Select!", _this->name);
|
||||
flog::info("RFSpaceSourceModule '{0}': Menu Select!", _this->name);
|
||||
}
|
||||
|
||||
static void menuDeselected(void* ctx) {
|
||||
RFSpaceSourceModule* _this = (RFSpaceSourceModule*)ctx;
|
||||
gui::mainWindow.playButtonLocked = false;
|
||||
spdlog::info("RFSpaceSourceModule '{0}': Menu Deselect!", _this->name);
|
||||
flog::info("RFSpaceSourceModule '{0}': Menu Deselect!", _this->name);
|
||||
}
|
||||
|
||||
static void start(void* ctx) {
|
||||
@ -102,7 +102,7 @@ private:
|
||||
if (_this->client) { _this->client->start(rfspace::RFSPACE_SAMP_FORMAT_COMPLEX, rfspace::RFSPACE_SAMP_FORMAT_16BIT); }
|
||||
|
||||
_this->running = true;
|
||||
spdlog::info("RFSpaceSourceModule '{0}': Start!", _this->name);
|
||||
flog::info("RFSpaceSourceModule '{0}': Start!", _this->name);
|
||||
}
|
||||
|
||||
static void stop(void* ctx) {
|
||||
@ -112,7 +112,7 @@ private:
|
||||
if (_this->client) { _this->client->stop(); }
|
||||
|
||||
_this->running = false;
|
||||
spdlog::info("RFSpaceSourceModule '{0}': Stop!", _this->name);
|
||||
flog::info("RFSpaceSourceModule '{0}': Stop!", _this->name);
|
||||
}
|
||||
|
||||
static void tune(double freq, void* ctx) {
|
||||
@ -121,7 +121,7 @@ private:
|
||||
_this->client->setFrequency(freq);
|
||||
}
|
||||
_this->freq = freq;
|
||||
spdlog::info("RFSpaceSourceModule '{0}': Tune: {1}!", _this->name, freq);
|
||||
flog::info("RFSpaceSourceModule '{0}': Tune: {1}!", _this->name, freq);
|
||||
}
|
||||
|
||||
static void menuHandler(void* ctx) {
|
||||
@ -155,7 +155,7 @@ private:
|
||||
_this->deviceInit();
|
||||
}
|
||||
catch (std::exception e) {
|
||||
spdlog::error("Could not connect to SDR: {0}", e.what());
|
||||
flog::error("Could not connect to SDR: {0}", e.what());
|
||||
}
|
||||
}
|
||||
else if (connected && SmGui::Button("Disconnect##rfspace_source")) {
|
||||
@ -284,7 +284,7 @@ private:
|
||||
client->setPort(rfPorts[rfPortId]);
|
||||
}
|
||||
|
||||
spdlog::warn("End");
|
||||
flog::warn("End");
|
||||
}
|
||||
|
||||
std::string name;
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include <rfspace_client.h>
|
||||
#include <volk/volk.h>
|
||||
#include <cstring>
|
||||
#include <spdlog/spdlog.h>
|
||||
#include <utils/flog.h>
|
||||
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
@ -170,7 +170,7 @@ namespace rfspace {
|
||||
_this->client->read(size - 2, &_this->rbuffer[2]);
|
||||
}
|
||||
|
||||
// spdlog::warn("TCP received: {0} {1}", type, size);
|
||||
// flog::warn("TCP received: {0} {1}", type, size);
|
||||
|
||||
// Check for a device ID
|
||||
uint16_t* controlItem = (uint16_t*)&_this->rbuffer[2];
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include <spdlog/spdlog.h>
|
||||
#include <utils/flog.h>
|
||||
#include <module.h>
|
||||
#include <gui/gui.h>
|
||||
#include <signal_path/signal_path.h>
|
||||
@ -176,7 +176,7 @@ public:
|
||||
|
||||
if (oret < 0) {
|
||||
selectedDevName = "";
|
||||
spdlog::error("Could not open RTL-SDR: {0}", oret);
|
||||
flog::error("Could not open RTL-SDR: {0}", oret);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -266,19 +266,19 @@ private:
|
||||
static void menuSelected(void* ctx) {
|
||||
RTLSDRSourceModule* _this = (RTLSDRSourceModule*)ctx;
|
||||
core::setInputSampleRate(_this->sampleRate);
|
||||
spdlog::info("RTLSDRSourceModule '{0}': Menu Select!", _this->name);
|
||||
flog::info("RTLSDRSourceModule '{0}': Menu Select!", _this->name);
|
||||
}
|
||||
|
||||
static void menuDeselected(void* ctx) {
|
||||
RTLSDRSourceModule* _this = (RTLSDRSourceModule*)ctx;
|
||||
spdlog::info("RTLSDRSourceModule '{0}': Menu Deselect!", _this->name);
|
||||
flog::info("RTLSDRSourceModule '{0}': Menu Deselect!", _this->name);
|
||||
}
|
||||
|
||||
static void start(void* ctx) {
|
||||
RTLSDRSourceModule* _this = (RTLSDRSourceModule*)ctx;
|
||||
if (_this->running) { return; }
|
||||
if (_this->selectedDevName == "") {
|
||||
spdlog::error("No device selected");
|
||||
flog::error("No device selected");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -289,11 +289,11 @@ private:
|
||||
#endif
|
||||
|
||||
if (oret < 0) {
|
||||
spdlog::error("Could not open RTL-SDR");
|
||||
flog::error("Could not open RTL-SDR");
|
||||
return;
|
||||
}
|
||||
|
||||
spdlog::info("RTL-SDR Sample Rate: {0}", _this->sampleRate);
|
||||
flog::info("RTL-SDR Sample Rate: {0}", _this->sampleRate);
|
||||
|
||||
rtlsdr_set_sample_rate(_this->openDev, _this->sampleRate);
|
||||
rtlsdr_set_center_freq(_this->openDev, _this->freq);
|
||||
@ -317,7 +317,7 @@ private:
|
||||
_this->workerThread = std::thread(&RTLSDRSourceModule::worker, _this);
|
||||
|
||||
_this->running = true;
|
||||
spdlog::info("RTLSDRSourceModule '{0}': Start!", _this->name);
|
||||
flog::info("RTLSDRSourceModule '{0}': Start!", _this->name);
|
||||
}
|
||||
|
||||
static void stop(void* ctx) {
|
||||
@ -329,7 +329,7 @@ private:
|
||||
if (_this->workerThread.joinable()) { _this->workerThread.join(); }
|
||||
_this->stream.clearWriteStop();
|
||||
rtlsdr_close(_this->openDev);
|
||||
spdlog::info("RTLSDRSourceModule '{0}': Stop!", _this->name);
|
||||
flog::info("RTLSDRSourceModule '{0}': Stop!", _this->name);
|
||||
}
|
||||
|
||||
static void tune(double freq, void* ctx) {
|
||||
@ -342,11 +342,11 @@ private:
|
||||
if (rtlsdr_get_center_freq(_this->openDev) == newFreq) { break; }
|
||||
}
|
||||
if (i > 1) {
|
||||
spdlog::warn("RTL-SDR took {0} attempts to tune...", i);
|
||||
flog::warn("RTL-SDR took {0} attempts to tune...", i);
|
||||
}
|
||||
}
|
||||
_this->freq = freq;
|
||||
spdlog::info("RTLSDRSourceModule '{0}': Tune: {1}!", _this->name, freq);
|
||||
flog::info("RTLSDRSourceModule '{0}': Tune: {1}!", _this->name, freq);
|
||||
}
|
||||
|
||||
static void menuHandler(void* ctx) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include <rtl_tcp_client.h>
|
||||
#include <imgui.h>
|
||||
#include <spdlog/spdlog.h>
|
||||
#include <utils/flog.h>
|
||||
#include <module.h>
|
||||
#include <gui/gui.h>
|
||||
#include <signal_path/signal_path.h>
|
||||
@ -116,12 +116,12 @@ private:
|
||||
static void menuSelected(void* ctx) {
|
||||
RTLTCPSourceModule* _this = (RTLTCPSourceModule*)ctx;
|
||||
core::setInputSampleRate(_this->sampleRate);
|
||||
spdlog::info("RTLTCPSourceModule '{0}': Menu Select!", _this->name);
|
||||
flog::info("RTLTCPSourceModule '{0}': Menu Select!", _this->name);
|
||||
}
|
||||
|
||||
static void menuDeselected(void* ctx) {
|
||||
RTLTCPSourceModule* _this = (RTLTCPSourceModule*)ctx;
|
||||
spdlog::info("RTLTCPSourceModule '{0}': Menu Deselect!", _this->name);
|
||||
flog::info("RTLTCPSourceModule '{0}': Menu Deselect!", _this->name);
|
||||
}
|
||||
|
||||
static void start(void* ctx) {
|
||||
@ -133,7 +133,7 @@ private:
|
||||
_this->client = rtltcp::connect(&_this->stream, _this->ip, _this->port);
|
||||
}
|
||||
catch (std::exception e) {
|
||||
spdlog::error("Could connect to RTL-TCP server: {0}", e.what());
|
||||
flog::error("Could connect to RTL-TCP server: {0}", e.what());
|
||||
return;
|
||||
}
|
||||
|
||||
@ -154,7 +154,7 @@ private:
|
||||
}
|
||||
|
||||
_this->running = true;
|
||||
spdlog::info("RTLTCPSourceModule '{0}': Start!", _this->name);
|
||||
flog::info("RTLTCPSourceModule '{0}': Start!", _this->name);
|
||||
}
|
||||
|
||||
static void stop(void* ctx) {
|
||||
@ -162,7 +162,7 @@ private:
|
||||
if (!_this->running) { return; }
|
||||
_this->client->close();
|
||||
_this->running = false;
|
||||
spdlog::info("RTLTCPSourceModule '{0}': Stop!", _this->name);
|
||||
flog::info("RTLTCPSourceModule '{0}': Stop!", _this->name);
|
||||
}
|
||||
|
||||
static void tune(double freq, void* ctx) {
|
||||
@ -171,7 +171,7 @@ private:
|
||||
_this->client->setFrequency(freq);
|
||||
}
|
||||
_this->freq = freq;
|
||||
spdlog::info("RTLTCPSourceModule '{0}': Tune: {1}!", _this->name, freq);
|
||||
flog::info("RTLTCPSourceModule '{0}': Tune: {1}!", _this->name, freq);
|
||||
}
|
||||
|
||||
static void menuHandler(void* ctx) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include <imgui.h>
|
||||
#include <spdlog/spdlog.h>
|
||||
#include <utils/flog.h>
|
||||
#include <module.h>
|
||||
#include <gui/gui.h>
|
||||
#include <signal_path/signal_path.h>
|
||||
@ -134,7 +134,7 @@ public:
|
||||
|
||||
sdrplay_api_ErrT err = sdrplay_api_Open();
|
||||
if (err != sdrplay_api_Success) {
|
||||
spdlog::error("Could not intiatialized the SDRplay API. Make sure that the service is running.");
|
||||
flog::error("Could not intiatialized the SDRplay API. Make sure that the service is running.");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -266,7 +266,7 @@ public:
|
||||
err = sdrplay_api_SelectDevice(&openDev);
|
||||
if (err != sdrplay_api_Success) {
|
||||
const char* errStr = sdrplay_api_GetErrorString(err);
|
||||
spdlog::error("Could not select RSP device: {0}", errStr);
|
||||
flog::error("Could not select RSP device: {0}", errStr);
|
||||
selectedName = "";
|
||||
return;
|
||||
}
|
||||
@ -277,7 +277,7 @@ public:
|
||||
err = sdrplay_api_GetDeviceParams(openDev.dev, &openDevParams);
|
||||
if (err != sdrplay_api_Success) {
|
||||
const char* errStr = sdrplay_api_GetErrorString(err);
|
||||
spdlog::error("Could not get device params for RSP device: {0}", errStr);
|
||||
flog::error("Could not get device params for RSP device: {0}", errStr);
|
||||
selectedName = "";
|
||||
return;
|
||||
}
|
||||
@ -285,7 +285,7 @@ public:
|
||||
err = sdrplay_api_Init(openDev.dev, &cbFuncs, this);
|
||||
if (err != sdrplay_api_Success) {
|
||||
const char* errStr = sdrplay_api_GetErrorString(err);
|
||||
spdlog::error("Could not init RSP device: {0}", errStr);
|
||||
flog::error("Could not init RSP device: {0}", errStr);
|
||||
selectedName = "";
|
||||
return;
|
||||
}
|
||||
@ -479,10 +479,10 @@ public:
|
||||
|
||||
void rspDuoSelectTuner(sdrplay_api_TunerSelectT tuner, sdrplay_api_RspDuo_AmPortSelectT amPort) {
|
||||
if (openDev.tuner != tuner) {
|
||||
spdlog::info("Swapping tuners");
|
||||
flog::info("Swapping tuners");
|
||||
auto ret = sdrplay_api_SwapRspDuoActiveTuner(openDev.dev, &openDev.tuner, amPort);
|
||||
if (ret != 0) {
|
||||
spdlog::error("Error while swapping tuners: {0}", (int)ret);
|
||||
flog::error("Error while swapping tuners: {0}", (int)ret);
|
||||
}
|
||||
}
|
||||
|
||||
@ -522,12 +522,12 @@ private:
|
||||
static void menuSelected(void* ctx) {
|
||||
SDRPlaySourceModule* _this = (SDRPlaySourceModule*)ctx;
|
||||
core::setInputSampleRate(_this->sampleRate);
|
||||
spdlog::info("SDRPlaySourceModule '{0}': Menu Select!", _this->name);
|
||||
flog::info("SDRPlaySourceModule '{0}': Menu Select!", _this->name);
|
||||
}
|
||||
|
||||
static void menuDeselected(void* ctx) {
|
||||
SDRPlaySourceModule* _this = (SDRPlaySourceModule*)ctx;
|
||||
spdlog::info("SDRPlaySourceModule '{0}': Menu Deselect!", _this->name);
|
||||
flog::info("SDRPlaySourceModule '{0}': Menu Deselect!", _this->name);
|
||||
}
|
||||
|
||||
static void start(void* ctx) {
|
||||
@ -542,7 +542,7 @@ private:
|
||||
err = sdrplay_api_SelectDevice(&_this->openDev);
|
||||
if (err != sdrplay_api_Success) {
|
||||
const char* errStr = sdrplay_api_GetErrorString(err);
|
||||
spdlog::error("Could not select RSP device: {0}", errStr);
|
||||
flog::error("Could not select RSP device: {0}", errStr);
|
||||
_this->selectedName = "";
|
||||
return;
|
||||
}
|
||||
@ -553,7 +553,7 @@ private:
|
||||
err = sdrplay_api_GetDeviceParams(_this->openDev.dev, &_this->openDevParams);
|
||||
if (err != sdrplay_api_Success) {
|
||||
const char* errStr = sdrplay_api_GetErrorString(err);
|
||||
spdlog::error("Could not get device params for RSP device: {0}", errStr);
|
||||
flog::error("Could not get device params for RSP device: {0}", errStr);
|
||||
_this->selectedName = "";
|
||||
return;
|
||||
}
|
||||
@ -561,7 +561,7 @@ private:
|
||||
err = sdrplay_api_Init(_this->openDev.dev, &_this->cbFuncs, _this);
|
||||
if (err != sdrplay_api_Success) {
|
||||
const char* errStr = sdrplay_api_GetErrorString(err);
|
||||
spdlog::error("Could not init RSP device: {0}", errStr);
|
||||
flog::error("Could not init RSP device: {0}", errStr);
|
||||
_this->selectedName = "";
|
||||
return;
|
||||
}
|
||||
@ -652,7 +652,7 @@ private:
|
||||
sdrplay_api_Update(_this->openDev.dev, _this->openDev.tuner, sdrplay_api_Update_Ctrl_Agc, sdrplay_api_Update_Ext1_None);
|
||||
|
||||
_this->running = true;
|
||||
spdlog::info("SDRPlaySourceModule '{0}': Start!", _this->name);
|
||||
flog::info("SDRPlaySourceModule '{0}': Start!", _this->name);
|
||||
}
|
||||
|
||||
static void stop(void* ctx) {
|
||||
@ -666,7 +666,7 @@ private:
|
||||
sdrplay_api_ReleaseDevice(&_this->openDev);
|
||||
|
||||
_this->stream.clearWriteStop();
|
||||
spdlog::info("SDRPlaySourceModule '{0}': Stop!", _this->name);
|
||||
flog::info("SDRPlaySourceModule '{0}': Stop!", _this->name);
|
||||
}
|
||||
|
||||
static void tune(double freq, void* ctx) {
|
||||
@ -676,7 +676,7 @@ private:
|
||||
sdrplay_api_Update(_this->openDev.dev, _this->openDev.tuner, sdrplay_api_Update_Tuner_Frf, sdrplay_api_Update_Ext1_None);
|
||||
}
|
||||
_this->freq = freq;
|
||||
spdlog::info("SDRPlaySourceModule '{0}': Tune: {1}!", _this->name, freq);
|
||||
flog::info("SDRPlaySourceModule '{0}': Tune: {1}!", _this->name, freq);
|
||||
}
|
||||
|
||||
static void menuHandler(void* ctx) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "sdrpp_server_client.h"
|
||||
#include <imgui.h>
|
||||
#include <spdlog/spdlog.h>
|
||||
#include <utils/flog.h>
|
||||
#include <module.h>
|
||||
#include <gui/gui.h>
|
||||
#include <signal_path/signal_path.h>
|
||||
@ -96,13 +96,13 @@ private:
|
||||
core::setInputSampleRate(_this->client->getSampleRate());
|
||||
}
|
||||
gui::mainWindow.playButtonLocked = !(_this->client && _this->client->isOpen());
|
||||
spdlog::info("SDRPPServerSourceModule '{0}': Menu Select!", _this->name);
|
||||
flog::info("SDRPPServerSourceModule '{0}': Menu Select!", _this->name);
|
||||
}
|
||||
|
||||
static void menuDeselected(void* ctx) {
|
||||
SDRPPServerSourceModule* _this = (SDRPPServerSourceModule*)ctx;
|
||||
gui::mainWindow.playButtonLocked = false;
|
||||
spdlog::info("SDRPPServerSourceModule '{0}': Menu Deselect!", _this->name);
|
||||
flog::info("SDRPPServerSourceModule '{0}': Menu Deselect!", _this->name);
|
||||
}
|
||||
|
||||
static void start(void* ctx) {
|
||||
@ -120,7 +120,7 @@ private:
|
||||
_this->client->start();
|
||||
|
||||
_this->running = true;
|
||||
spdlog::info("SDRPPServerSourceModule '{0}': Start!", _this->name);
|
||||
flog::info("SDRPPServerSourceModule '{0}': Start!", _this->name);
|
||||
}
|
||||
|
||||
static void stop(void* ctx) {
|
||||
@ -130,7 +130,7 @@ private:
|
||||
if (_this->client) { _this->client->stop(); }
|
||||
|
||||
_this->running = false;
|
||||
spdlog::info("SDRPPServerSourceModule '{0}': Stop!", _this->name);
|
||||
flog::info("SDRPPServerSourceModule '{0}': Stop!", _this->name);
|
||||
}
|
||||
|
||||
static void tune(double freq, void* ctx) {
|
||||
@ -139,7 +139,7 @@ private:
|
||||
_this->client->setFrequency(freq);
|
||||
}
|
||||
_this->freq = freq;
|
||||
spdlog::info("SDRPPServerSourceModule '{0}': Tune: {1}!", _this->name, freq);
|
||||
flog::info("SDRPPServerSourceModule '{0}': Tune: {1}!", _this->name, freq);
|
||||
}
|
||||
|
||||
static void menuHandler(void* ctx) {
|
||||
@ -234,7 +234,7 @@ private:
|
||||
deviceInit();
|
||||
}
|
||||
catch (std::exception e) {
|
||||
spdlog::error("Could not connect to SDR: {0}", e.what());
|
||||
flog::error("Could not connect to SDR: {0}", e.what());
|
||||
if (!strcmp(e.what(), "Server busy")) { serverBusy = true; }
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "sdrpp_server_client.h"
|
||||
#include <volk/volk.h>
|
||||
#include <cstring>
|
||||
#include <spdlog/spdlog.h>
|
||||
#include <utils/flog.h>
|
||||
#include <core.h>
|
||||
|
||||
using namespace std::chrono_literals;
|
||||
@ -76,7 +76,7 @@ namespace server {
|
||||
|
||||
// Send
|
||||
if (syncRequired) {
|
||||
spdlog::warn("Action requires resync");
|
||||
flog::warn("Action requires resync");
|
||||
auto waiter = awaitCommandAck(COMMAND_UI_ACTION);
|
||||
sendCommand(COMMAND_UI_ACTION, size);
|
||||
if (waiter->await(PROTOCOL_TIMEOUT_MS)) {
|
||||
@ -84,13 +84,13 @@ namespace server {
|
||||
dl.load(r_cmd_data, r_pkt_hdr->size - sizeof(PacketHeader) - sizeof(CommandHeader));
|
||||
}
|
||||
else {
|
||||
spdlog::error("Timeout out after asking for UI");
|
||||
flog::error("Timeout out after asking for UI");
|
||||
}
|
||||
waiter->handled();
|
||||
spdlog::warn("Resync done");
|
||||
flog::warn("Resync done");
|
||||
}
|
||||
else {
|
||||
spdlog::warn("Action does not require resync");
|
||||
flog::warn("Action does not require resync");
|
||||
sendCommand(COMMAND_UI_ACTION, size);
|
||||
}
|
||||
}
|
||||
@ -166,7 +166,7 @@ namespace server {
|
||||
core::setInputSampleRate(_this->currentSampleRate);
|
||||
}
|
||||
else if (_this->r_cmd_hdr->cmd == COMMAND_DISCONNECT) {
|
||||
spdlog::error("Asked to disconnect by the server");
|
||||
flog::error("Asked to disconnect by the server");
|
||||
_this->serverBusy = true;
|
||||
|
||||
// Cancel waiters
|
||||
@ -207,10 +207,10 @@ namespace server {
|
||||
if (outCount) { _this->decompIn.swap(outCount); };
|
||||
}
|
||||
else if (_this->r_pkt_hdr->type == PACKET_TYPE_ERROR) {
|
||||
spdlog::error("SDR++ Server Error: {0}", buf[sizeof(PacketHeader)]);
|
||||
flog::error("SDR++ Server Error: {0}", buf[sizeof(PacketHeader)]);
|
||||
}
|
||||
else {
|
||||
spdlog::error("Invalid packet type: {0}", _this->r_pkt_hdr->type);
|
||||
flog::error("Invalid packet type: {0}", _this->r_pkt_hdr->type);
|
||||
}
|
||||
|
||||
// Restart an async read
|
||||
@ -225,7 +225,7 @@ namespace server {
|
||||
dl.load(r_cmd_data, r_pkt_hdr->size - sizeof(PacketHeader) - sizeof(CommandHeader));
|
||||
}
|
||||
else {
|
||||
if (!serverBusy) { spdlog::error("Timeout out after asking for UI"); };
|
||||
if (!serverBusy) { flog::error("Timeout out after asking for UI"); };
|
||||
waiter->handled();
|
||||
return serverBusy ? -2 : -1;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include <SoapySDR/Constants.h>
|
||||
#include <imgui.h>
|
||||
#include <spdlog/spdlog.h>
|
||||
#include <utils/flog.h>
|
||||
#include <module.h>
|
||||
#include <gui/gui.h>
|
||||
#include <gui/widgets/stepped_slider.h>
|
||||
@ -103,12 +103,12 @@ private:
|
||||
break;
|
||||
}
|
||||
}
|
||||
spdlog::info("Bandwidth for samplerate {0} is {1}", samplerate, cur);
|
||||
flog::info("Bandwidth for samplerate {0} is {1}", samplerate, cur);
|
||||
return cur;
|
||||
}
|
||||
|
||||
void selectSampleRate(double samplerate) {
|
||||
spdlog::info("Setting sample rate to {0}", samplerate);
|
||||
flog::info("Setting sample rate to {0}", samplerate);
|
||||
if (sampleRates.size() == 0) {
|
||||
devId = -1;
|
||||
return;
|
||||
@ -287,7 +287,7 @@ private:
|
||||
|
||||
static void menuSelected(void* ctx) {
|
||||
SoapyModule* _this = (SoapyModule*)ctx;
|
||||
spdlog::info("SoapyModule '{0}': Menu Select!", _this->name);
|
||||
flog::info("SoapyModule '{0}': Menu Select!", _this->name);
|
||||
if (_this->devList.size() == 0) {
|
||||
return;
|
||||
}
|
||||
@ -296,14 +296,14 @@ private:
|
||||
|
||||
static void menuDeselected(void* ctx) {
|
||||
SoapyModule* _this = (SoapyModule*)ctx;
|
||||
spdlog::info("SoapyModule '{0}': Menu Deselect!", _this->name);
|
||||
flog::info("SoapyModule '{0}': Menu Deselect!", _this->name);
|
||||
}
|
||||
|
||||
static void start(void* ctx) {
|
||||
SoapyModule* _this = (SoapyModule*)ctx;
|
||||
if (_this->running) { return; }
|
||||
if (_this->devId < 0) {
|
||||
spdlog::error("No device available");
|
||||
flog::error("No device available");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -336,7 +336,7 @@ private:
|
||||
_this->dev->activateStream(_this->devStream);
|
||||
_this->running = true;
|
||||
_this->workerThread = std::thread(_worker, _this);
|
||||
spdlog::info("SoapyModule '{0}': Start!", _this->name);
|
||||
flog::info("SoapyModule '{0}': Start!", _this->name);
|
||||
}
|
||||
|
||||
static void stop(void* ctx) {
|
||||
@ -350,7 +350,7 @@ private:
|
||||
_this->stream.clearWriteStop();
|
||||
SoapySDR::Device::unmake(_this->dev);
|
||||
|
||||
spdlog::info("SoapyModule '{0}': Stop!", _this->name);
|
||||
flog::info("SoapyModule '{0}': Stop!", _this->name);
|
||||
}
|
||||
|
||||
static void tune(double freq, void* ctx) {
|
||||
@ -359,7 +359,7 @@ private:
|
||||
if (_this->running) {
|
||||
_this->dev->setFrequency(SOAPY_SDR_RX, _this->channelId, freq);
|
||||
}
|
||||
spdlog::info("SoapyModule '{0}': Tune: {1}!", _this->name, freq);
|
||||
flog::info("SoapyModule '{0}': Tune: {1}!", _this->name, freq);
|
||||
}
|
||||
|
||||
static void menuHandler(void* ctx) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "spectran_http_client.h"
|
||||
#include <spdlog/spdlog.h>
|
||||
#include <utils/flog.h>
|
||||
#include <module.h>
|
||||
#include <gui/gui.h>
|
||||
#include <signal_path/signal_path.h>
|
||||
@ -67,13 +67,13 @@ private:
|
||||
static void menuSelected(void* ctx) {
|
||||
SpectranHTTPSourceModule* _this = (SpectranHTTPSourceModule*)ctx;
|
||||
core::setInputSampleRate(_this->sampleRate);
|
||||
spdlog::info("SpectranHTTPSourceModule '{0}': Menu Select!", _this->name);
|
||||
flog::info("SpectranHTTPSourceModule '{0}': Menu Select!", _this->name);
|
||||
}
|
||||
|
||||
static void menuDeselected(void* ctx) {
|
||||
SpectranHTTPSourceModule* _this = (SpectranHTTPSourceModule*)ctx;
|
||||
gui::mainWindow.playButtonLocked = false;
|
||||
spdlog::info("SpectranHTTPSourceModule '{0}': Menu Deselect!", _this->name);
|
||||
flog::info("SpectranHTTPSourceModule '{0}': Menu Deselect!", _this->name);
|
||||
}
|
||||
|
||||
static void start(void* ctx) {
|
||||
@ -87,7 +87,7 @@ private:
|
||||
// TODO: Set options
|
||||
|
||||
_this->running = true;
|
||||
spdlog::info("SpectranHTTPSourceModule '{0}': Start!", _this->name);
|
||||
flog::info("SpectranHTTPSourceModule '{0}': Start!", _this->name);
|
||||
}
|
||||
|
||||
static void stop(void* ctx) {
|
||||
@ -98,7 +98,7 @@ private:
|
||||
// TODO: Implement stop
|
||||
_this->client->streaming(false);
|
||||
|
||||
spdlog::info("SpectranHTTPSourceModule '{0}': Stop!", _this->name);
|
||||
flog::info("SpectranHTTPSourceModule '{0}': Stop!", _this->name);
|
||||
}
|
||||
|
||||
static void tune(double freq, void* ctx) {
|
||||
@ -107,7 +107,7 @@ private:
|
||||
// TODO
|
||||
}
|
||||
_this->freq = freq;
|
||||
spdlog::info("SpectranHTTPSourceModule '{0}': Tune: {1}!", _this->name, freq);
|
||||
flog::info("SpectranHTTPSourceModule '{0}': Tune: {1}!", _this->name, freq);
|
||||
}
|
||||
|
||||
static void menuHandler(void* ctx) {
|
||||
@ -157,7 +157,7 @@ private:
|
||||
client = std::make_shared<SpectranHTTPClient>(hostname, port, &stream);
|
||||
}
|
||||
catch (std::runtime_error e) {
|
||||
spdlog::error("Could not connect: {0}", e.what());
|
||||
flog::error("Could not connect: {0}", e.what());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "spectran_http_client.h"
|
||||
#include <spdlog/spdlog.h>
|
||||
#include <utils/flog.h>
|
||||
|
||||
SpectranHTTPClient::SpectranHTTPClient(std::string host, int port, dsp::stream<dsp::complex_t>* stream) {
|
||||
this->stream = stream;
|
||||
@ -48,7 +48,7 @@ void SpectranHTTPClient::worker() {
|
||||
std::string jsonData;
|
||||
int jlen = sock->recvline(jsonData, clen, 5000);
|
||||
if (jlen <= 0) {
|
||||
spdlog::error("Couldn't read JSON metadata");
|
||||
flog::error("Couldn't read JSON metadata");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -56,7 +56,7 @@ void SpectranHTTPClient::worker() {
|
||||
uint8_t rs;
|
||||
int rslen = sock->recv(&rs, 1, true, 5000);
|
||||
if (rslen != 1 || rs != 0x1E) {
|
||||
spdlog::error("Missing record separator");
|
||||
flog::error("Missing record separator");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -66,7 +66,7 @@ void SpectranHTTPClient::worker() {
|
||||
for (int i = jlen + 1; i < clen;) {
|
||||
int read = sock->recv(&buf[sampLen], clen - i, true);
|
||||
if (read <= 0) {
|
||||
spdlog::error("Recv failed while reading data");
|
||||
flog::error("Recv failed while reading data");
|
||||
return;
|
||||
}
|
||||
i += read;
|
||||
@ -82,7 +82,7 @@ void SpectranHTTPClient::worker() {
|
||||
std::string dummy;
|
||||
sock->recvline(dummy, 2);
|
||||
if (dummy != "\r") {
|
||||
spdlog::error("Missing trailing CRLF");
|
||||
flog::error("Missing trailing CRLF");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include <imgui.h>
|
||||
#include <spdlog/spdlog.h>
|
||||
#include <utils/flog.h>
|
||||
#include <module.h>
|
||||
#include <gui/gui.h>
|
||||
#include <signal_path/signal_path.h>
|
||||
@ -130,7 +130,7 @@ public:
|
||||
|
||||
// Open device
|
||||
if (AARTSAAPI_OpenDevice(&api, &dev, L"spectranv6/raw", devList[devId].c_str()) != AARTSAAPI_OK) {
|
||||
spdlog::error("Failed to open device");
|
||||
flog::error("Failed to open device");
|
||||
selectedSerial.clear();
|
||||
return;
|
||||
}
|
||||
@ -145,7 +145,7 @@ public:
|
||||
AARTSAAPI_ConfigGetInfo(&dev, &config, &clockInfo);
|
||||
|
||||
// Enumerate valid samplerates
|
||||
spdlog::warn("{0}", clockInfo.disabledOptions);
|
||||
flog::warn("{0}", clockInfo.disabledOptions);
|
||||
std::vector<SRCombo> srs;
|
||||
for (int i = 0; i < 4; i++) {
|
||||
if ((clockInfo.disabledOptions >> i) & 1) { continue; }
|
||||
@ -215,12 +215,12 @@ private:
|
||||
static void menuSelected(void* ctx) {
|
||||
SpectranSourceModule* _this = (SpectranSourceModule*)ctx;
|
||||
core::setInputSampleRate(_this->samplerate.effective);
|
||||
spdlog::info("SpectranSourceModule '{0}': Menu Select!", _this->name);
|
||||
flog::info("SpectranSourceModule '{0}': Menu Select!", _this->name);
|
||||
}
|
||||
|
||||
static void menuDeselected(void* ctx) {
|
||||
SpectranSourceModule* _this = (SpectranSourceModule*)ctx;
|
||||
spdlog::info("SpectranSourceModule '{0}': Menu Deselect!", _this->name);
|
||||
flog::info("SpectranSourceModule '{0}': Menu Deselect!", _this->name);
|
||||
}
|
||||
|
||||
static void start(void* ctx) {
|
||||
@ -229,7 +229,7 @@ private:
|
||||
if (_this->selectedSerial.empty()) { return; }
|
||||
|
||||
if (AARTSAAPI_OpenDevice(&_this->api, &_this->dev, L"spectranv6/raw", _this->devList[_this->devId].c_str()) != AARTSAAPI_OK) {
|
||||
spdlog::error("Failed to open device");
|
||||
flog::error("Failed to open device");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -266,12 +266,12 @@ private:
|
||||
_this->updateAmps();
|
||||
|
||||
if (AARTSAAPI_ConnectDevice(&_this->dev) != AARTSAAPI_OK) {
|
||||
spdlog::error("Failed to connect device");
|
||||
flog::error("Failed to connect device");
|
||||
return;
|
||||
}
|
||||
|
||||
if (AARTSAAPI_StartDevice(&_this->dev) != AARTSAAPI_OK) {
|
||||
spdlog::error("Failed to start device");
|
||||
flog::error("Failed to start device");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -288,7 +288,7 @@ private:
|
||||
_this->workerThread = std::thread(&SpectranSourceModule::worker, _this);
|
||||
|
||||
_this->running = true;
|
||||
spdlog::info("SpectranSourceModule '{0}': Start!", _this->name);
|
||||
flog::info("SpectranSourceModule '{0}': Start!", _this->name);
|
||||
}
|
||||
|
||||
static void stop(void* ctx) {
|
||||
@ -307,7 +307,7 @@ private:
|
||||
|
||||
_this->stream.clearWriteStop();
|
||||
|
||||
spdlog::info("SpectranSourceModule '{0}': Stop!", _this->name);
|
||||
flog::info("SpectranSourceModule '{0}': Stop!", _this->name);
|
||||
}
|
||||
|
||||
static void tune(double freq, void* ctx) {
|
||||
@ -318,7 +318,7 @@ private:
|
||||
AARTSAAPI_ConfigSetFloat(&_this->dev, &config, freq);
|
||||
}
|
||||
_this->freq = freq;
|
||||
spdlog::info("SpectranSourceModule '{0}': Tune: {1}!", _this->name, freq);
|
||||
flog::info("SpectranSourceModule '{0}': Tune: {1}!", _this->name, freq);
|
||||
}
|
||||
|
||||
static void menuHandler(void* ctx) {
|
||||
@ -411,7 +411,7 @@ private:
|
||||
if (res != AARTSAAPI_OK) { break; }
|
||||
|
||||
if (pkt.num > STREAM_BUFFER_SIZE) {
|
||||
spdlog::error("Buffer too big!!!!");
|
||||
flog::error("Buffer too big!!!!");
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include <spyserver_client.h>
|
||||
#include <imgui.h>
|
||||
#include <spdlog/spdlog.h>
|
||||
#include <utils/flog.h>
|
||||
#include <module.h>
|
||||
#include <gui/gui.h>
|
||||
#include <signal_path/signal_path.h>
|
||||
@ -108,13 +108,13 @@ private:
|
||||
SpyServerSourceModule* _this = (SpyServerSourceModule*)ctx;
|
||||
core::setInputSampleRate(_this->sampleRate);
|
||||
gui::mainWindow.playButtonLocked = !(_this->client && _this->client->isOpen());
|
||||
spdlog::info("SpyServerSourceModule '{0}': Menu Select!", _this->name);
|
||||
flog::info("SpyServerSourceModule '{0}': Menu Select!", _this->name);
|
||||
}
|
||||
|
||||
static void menuDeselected(void* ctx) {
|
||||
SpyServerSourceModule* _this = (SpyServerSourceModule*)ctx;
|
||||
gui::mainWindow.playButtonLocked = false;
|
||||
spdlog::info("SpyServerSourceModule '{0}': Menu Deselect!", _this->name);
|
||||
flog::info("SpyServerSourceModule '{0}': Menu Deselect!", _this->name);
|
||||
}
|
||||
|
||||
static void start(void* ctx) {
|
||||
@ -137,7 +137,7 @@ private:
|
||||
_this->client->startStream();
|
||||
|
||||
_this->running = true;
|
||||
spdlog::info("SpyServerSourceModule '{0}': Start!", _this->name);
|
||||
flog::info("SpyServerSourceModule '{0}': Start!", _this->name);
|
||||
}
|
||||
|
||||
static void stop(void* ctx) {
|
||||
@ -147,7 +147,7 @@ private:
|
||||
_this->client->stopStream();
|
||||
|
||||
_this->running = false;
|
||||
spdlog::info("SpyServerSourceModule '{0}': Stop!", _this->name);
|
||||
flog::info("SpyServerSourceModule '{0}': Stop!", _this->name);
|
||||
}
|
||||
|
||||
static void tune(double freq, void* ctx) {
|
||||
@ -156,7 +156,7 @@ private:
|
||||
_this->client->setSetting(SPYSERVER_SETTING_IQ_FREQUENCY, freq);
|
||||
}
|
||||
_this->freq = freq;
|
||||
spdlog::info("SpyServerSourceModule '{0}': Tune: {1}!", _this->name, freq);
|
||||
flog::info("SpyServerSourceModule '{0}': Tune: {1}!", _this->name, freq);
|
||||
}
|
||||
|
||||
static void menuHandler(void* ctx) {
|
||||
@ -246,7 +246,7 @@ private:
|
||||
client = spyserver::connect(hostname, port, &stream);
|
||||
|
||||
if (!client->waitForDevInfo(3000)) {
|
||||
spdlog::error("SpyServer didn't respond with device information");
|
||||
flog::error("SpyServer didn't respond with device information");
|
||||
}
|
||||
else {
|
||||
char buf[1024];
|
||||
@ -280,11 +280,11 @@ private:
|
||||
|
||||
sampleRate = sampleRates[srId];
|
||||
core::setInputSampleRate(sampleRate);
|
||||
spdlog::info("Connected to server");
|
||||
flog::info("Connected to server");
|
||||
}
|
||||
}
|
||||
catch (std::exception e) {
|
||||
spdlog::error("Could not connect to spyserver {0}", e.what());
|
||||
flog::error("Could not connect to spyserver {0}", e.what());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include <spdlog/spdlog.h>
|
||||
#include <utils/flog.h>
|
||||
#include <module.h>
|
||||
#include <gui/gui.h>
|
||||
#include <signal_path/signal_path.h>
|
||||
@ -171,7 +171,6 @@ public:
|
||||
std::string name = s;
|
||||
name[0] = std::toupper(name[0]);
|
||||
clockSources.define(s, name, s);
|
||||
spdlog::warn(s);
|
||||
}
|
||||
|
||||
// Load settings
|
||||
@ -261,12 +260,12 @@ private:
|
||||
}
|
||||
|
||||
core::setInputSampleRate(_this->sampleRate);
|
||||
spdlog::info("USRPSourceModule '{0}': Menu Select!", _this->name);
|
||||
flog::info("USRPSourceModule '{0}': Menu Select!", _this->name);
|
||||
}
|
||||
|
||||
static void menuDeselected(void* ctx) {
|
||||
USRPSourceModule* _this = (USRPSourceModule*)ctx;
|
||||
spdlog::info("USRPSourceModule '{0}': Menu Deselect!", _this->name);
|
||||
flog::info("USRPSourceModule '{0}': Menu Deselect!", _this->name);
|
||||
}
|
||||
|
||||
static void start(void* ctx) {
|
||||
@ -295,7 +294,7 @@ private:
|
||||
_this->workerThread = std::thread(&USRPSourceModule::worker, _this);
|
||||
|
||||
_this->running = true;
|
||||
spdlog::info("USRPSourceModule '{0}': Start!", _this->name);
|
||||
flog::info("USRPSourceModule '{0}': Start!", _this->name);
|
||||
}
|
||||
|
||||
static void stop(void* ctx) {
|
||||
@ -311,7 +310,7 @@ private:
|
||||
_this->streamer.reset();
|
||||
_this->dev.reset();
|
||||
|
||||
spdlog::info("USRPSourceModule '{0}': Stop!", _this->name);
|
||||
flog::info("USRPSourceModule '{0}': Stop!", _this->name);
|
||||
}
|
||||
|
||||
static void tune(double freq, void* ctx) {
|
||||
@ -320,7 +319,7 @@ private:
|
||||
_this->dev->set_rx_freq(freq, _this->chanId);
|
||||
}
|
||||
_this->freq = freq;
|
||||
spdlog::info("USRPSourceModule '{0}': Tune: {1}!", _this->name, freq);
|
||||
flog::info("USRPSourceModule '{0}': Tune: {1}!", _this->name, freq);
|
||||
}
|
||||
|
||||
static void menuHandler(void* ctx) {
|
||||
|
Reference in New Issue
Block a user