mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2025-06-26 12:27: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>
|
||||
@ -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());
|
||||
|
Reference in New Issue
Block a user