mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2025-06-25 12:07:49 +02:00
Switched to a custom logging lib instead of that spdlog junk
This commit is contained in:
@ -5,7 +5,7 @@
|
||||
#include <dsp/routing.h>
|
||||
#include <dsp/demodulator.h>
|
||||
#include <dsp/sink.h>
|
||||
#include <spdlog/spdlog.h>
|
||||
#include <utils/flog.h>
|
||||
|
||||
extern "C" {
|
||||
#include <correct.h>
|
||||
@ -156,7 +156,7 @@ namespace kgsstv {
|
||||
|
||||
// If full syncword was detected, switch to read mode
|
||||
if (++match == KGSSTV_SYNC_WORD_SIZE) {
|
||||
spdlog::warn("Frame detected");
|
||||
flog::warn("Frame detected");
|
||||
syncing = false;
|
||||
readCount = 0;
|
||||
writeCount = 0;
|
||||
@ -193,7 +193,7 @@ namespace kgsstv {
|
||||
// Decode convolutional code
|
||||
int convOutCount = correct_convolutional_decode_soft(conv, convTmp, 124, out.writeBuf);
|
||||
|
||||
spdlog::warn("Frames written: {0}, frameBytes: {1}", ++framesWritten, convOutCount);
|
||||
flog::warn("Frames written: {0}, frameBytes: {1}", ++framesWritten, convOutCount);
|
||||
if (!out.swap(7)) {
|
||||
_in->flush();
|
||||
return -1;
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include <stdio.h>
|
||||
#include <inttypes.h>
|
||||
#include <crc16.h>
|
||||
#include <spdlog/spdlog.h>
|
||||
#include <utils/flog.h>
|
||||
|
||||
bool M17CheckCRC(uint8_t* data, int len) {
|
||||
// TODO: Implement
|
||||
|
@ -227,7 +227,7 @@ namespace dsp {
|
||||
detect = true;
|
||||
outCount = 0;
|
||||
type = 0;
|
||||
//spdlog::warn("Found sync frame");
|
||||
//flog::warn("Found sync frame");
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -236,7 +236,7 @@ namespace dsp {
|
||||
detect = true;
|
||||
outCount = 0;
|
||||
type = 1;
|
||||
//spdlog::warn("Found stream frame");
|
||||
//flog::warn("Found stream frame");
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -245,7 +245,7 @@ namespace dsp {
|
||||
detect = true;
|
||||
outCount = 0;
|
||||
type = 2;
|
||||
//spdlog::warn("Found packet frame");
|
||||
//flog::warn("Found packet frame");
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -197,11 +197,11 @@ private:
|
||||
std::string filename = genFileName(folderSelect.expandString(folderSelect.path) + "/meteor", ".s");
|
||||
recFile = std::ofstream(filename, std::ios::binary);
|
||||
if (recFile.is_open()) {
|
||||
spdlog::info("Recording to '{0}'", filename);
|
||||
flog::info("Recording to '{0}'", filename);
|
||||
recording = true;
|
||||
}
|
||||
else {
|
||||
spdlog::error("Could not open file for recording!");
|
||||
flog::error("Could not open file for recording!");
|
||||
}
|
||||
}
|
||||
|
||||
@ -253,9 +253,9 @@ MOD_EXPORT void _INIT_() {
|
||||
// Create default recording directory
|
||||
std::string root = (std::string)core::args["root"];
|
||||
if (!std::filesystem::exists(root + "/recordings")) {
|
||||
spdlog::warn("Recordings directory does not exist, creating it");
|
||||
flog::warn("Recordings directory does not exist, creating it");
|
||||
if (!std::filesystem::create_directory(root + "/recordings")) {
|
||||
spdlog::error("Could not create recordings directory");
|
||||
flog::error("Could not create recordings directory");
|
||||
}
|
||||
}
|
||||
json def = json({});
|
||||
|
@ -321,7 +321,7 @@ private:
|
||||
auto startTime = std::chrono::high_resolution_clock::now();
|
||||
demod::Demodulator* demod = instantiateDemod(id);
|
||||
if (!demod) {
|
||||
spdlog::error("Demodulator {0} not implemented", id);
|
||||
flog::error("Demodulator {0} not implemented", (int)id);
|
||||
return;
|
||||
}
|
||||
selectedDemodID = id;
|
||||
@ -332,7 +332,7 @@ private:
|
||||
config.conf[name]["selectedDemodId"] = id;
|
||||
config.release(true);
|
||||
auto endTime = std::chrono::high_resolution_clock::now();
|
||||
spdlog::warn("Demod switch took {0} us", (std::chrono::duration_cast<std::chrono::microseconds>(endTime - startTime)).count());
|
||||
flog::warn("Demod switch took {0} us", (std::chrono::duration_cast<std::chrono::microseconds>(endTime - startTime)).count());
|
||||
}
|
||||
|
||||
void selectDemod(demod::Demodulator* demod) {
|
||||
|
Reference in New Issue
Block a user