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>
|
||||
@ -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 != "") {
|
||||
|
Reference in New Issue
Block a user