mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2025-06-29 22:07:51 +02:00
Formatted the entire codebase and added a CI check for formatting
This commit is contained in:
@ -13,7 +13,7 @@
|
||||
|
||||
#define CONCAT(a, b) ((std::string(a) + b).c_str())
|
||||
|
||||
SDRPP_MOD_INFO {
|
||||
SDRPP_MOD_INFO{
|
||||
/* Name: */ "rfspace_source",
|
||||
/* Description: */ "RFspace source module for SDR++",
|
||||
/* Author: */ "Ryzerth",
|
||||
@ -88,7 +88,7 @@ private:
|
||||
gui::mainWindow.playButtonLocked = false;
|
||||
spdlog::info("SpyServerSourceModule '{0}': Menu Deselect!", _this->name);
|
||||
}
|
||||
|
||||
|
||||
static void start(void* ctx) {
|
||||
SpyServerSourceModule* _this = (SpyServerSourceModule*)ctx;
|
||||
if (_this->running) { return; }
|
||||
@ -98,17 +98,17 @@ private:
|
||||
_this->running = true;
|
||||
spdlog::info("SpyServerSourceModule '{0}': Start!", _this->name);
|
||||
}
|
||||
|
||||
|
||||
static void stop(void* ctx) {
|
||||
SpyServerSourceModule* _this = (SpyServerSourceModule*)ctx;
|
||||
if (!_this->running) { return; }
|
||||
|
||||
|
||||
// TODO: Stop
|
||||
|
||||
_this->running = false;
|
||||
spdlog::info("SpyServerSourceModule '{0}': Stop!", _this->name);
|
||||
}
|
||||
|
||||
|
||||
static void tune(double freq, void* ctx) {
|
||||
SpyServerSourceModule* _this = (SpyServerSourceModule*)ctx;
|
||||
if (_this->running) {
|
||||
@ -117,7 +117,7 @@ private:
|
||||
_this->freq = freq;
|
||||
spdlog::info("SpyServerSourceModule '{0}': Tune: {1}!", _this->name, freq);
|
||||
}
|
||||
|
||||
|
||||
static void menuHandler(void* ctx) {
|
||||
SpyServerSourceModule* _this = (SpyServerSourceModule*)ctx;
|
||||
float menuWidth = ImGui::GetContentRegionAvailWidth();
|
||||
@ -154,7 +154,6 @@ private:
|
||||
}
|
||||
if (_this->running) { style::endDisabled(); }
|
||||
|
||||
|
||||
|
||||
if (connected) {
|
||||
// TODO: Options here
|
||||
|
@ -24,7 +24,7 @@ namespace rfspace {
|
||||
udpClient->readAsync(sizeof(udpHeader), (uint8_t*)&udpHeader, udpHandler, this);
|
||||
|
||||
// Start SDR
|
||||
uint8_t args[4] = {0x70, 2, 0, 0};
|
||||
uint8_t args[4] = { 0x70, 2, 0, 0 };
|
||||
setControlItem(0x18, args, 4);
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include <dsp/types.h>
|
||||
#include <atomic>
|
||||
|
||||
#define RFSPACE_MAX_SIZE 8192
|
||||
#define RFSPACE_MAX_SIZE 8192
|
||||
|
||||
namespace rfspace {
|
||||
enum {
|
||||
@ -40,7 +40,7 @@ namespace rfspace {
|
||||
|
||||
// Wait for data
|
||||
std::unique_lock<std::mutex> lck(mtx);
|
||||
return cnd.wait_for(lck, std::chrono::milliseconds(timeoutMS), [this](){ return triggered; });
|
||||
return cnd.wait_for(lck, std::chrono::milliseconds(timeoutMS), [this]() { return triggered; });
|
||||
|
||||
// Mark as not waiting
|
||||
{
|
||||
@ -75,7 +75,7 @@ namespace rfspace {
|
||||
// Wait for waiter to handle
|
||||
{
|
||||
std::unique_lock<std::mutex> lck(mtx);
|
||||
cnd.wait(lck, [this](){ return !triggered; });
|
||||
cnd.wait(lck, [this]() { return !triggered; });
|
||||
}
|
||||
}
|
||||
|
||||
@ -86,7 +86,6 @@ namespace rfspace {
|
||||
|
||||
bool waiting;
|
||||
std::mutex waitingmtx;
|
||||
|
||||
};
|
||||
|
||||
class RFspaceClientClass {
|
||||
@ -122,9 +121,9 @@ namespace rfspace {
|
||||
SyncEvent SCIRRecv;
|
||||
int SCIRSize;
|
||||
};
|
||||
|
||||
|
||||
typedef std::unique_ptr<RFspaceClientClass> RFspaceClient;
|
||||
|
||||
RFspaceClient connect(std::string host, uint16_t port, dsp::stream<dsp::complex_t>* out);
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user