Formatted the entire codebase and added a CI check for formatting

This commit is contained in:
AlexandreRouma
2021-12-19 22:11:44 +01:00
parent 8644957881
commit ea587db0cb
161 changed files with 3302 additions and 3393 deletions

View File

@ -8,11 +8,9 @@ namespace sched_action {
~StartRecorderClass() {}
void trigger() {
}
void prepareEditMenu() {
}
bool showEditMenu(bool& valid) {
@ -40,7 +38,6 @@ namespace sched_action {
std::string recorderName;
std::string name = "Start \"\"";
};
Action StartRecorder() {

View File

@ -138,7 +138,6 @@ namespace sched_action {
int vfoNameId = -1;
std::string name;
};
Action TuneVFO() {

View File

@ -4,7 +4,7 @@
#include <sched_task.h>
#include <map>
SDRPP_MOD_INFO {
SDRPP_MOD_INFO{
/* Name: */ "scheduler",
/* Description: */ "SDR++ Scheduler",
/* Author: */ "Ryzerth",
@ -23,7 +23,7 @@ public:
json recStartConfig;
recStartConfig["recorder"] = "Recorder";
json tuneVFOConfig;
tuneVFOConfig["vfo"] = "Radio";
tuneVFOConfig["frequency"] = 103500000.0;
@ -62,7 +62,7 @@ public:
private:
static void menuHandler(void* ctx) {
DemoModule* _this = (DemoModule*)ctx;
// If editing, show menu
if (!_this->editedTask.empty()) {
gui::mainWindow.lockWaterfallControls = true;
@ -89,7 +89,7 @@ private:
}
}
if (ImGui::BeginTable(("freq_manager_bkm_table"+_this->name).c_str(), 2, ImGuiTableFlags_Borders | ImGuiTableFlags_RowBg | ImGuiTableFlags_ScrollY, ImVec2(0, 200))) {
if (ImGui::BeginTable(("freq_manager_bkm_table" + _this->name).c_str(), 2, ImGuiTableFlags_Borders | ImGuiTableFlags_RowBg | ImGuiTableFlags_ScrollY, ImVec2(0, 200))) {
ImGui::TableSetupColumn("Name");
ImGui::TableSetupColumn("Countdown");
ImGui::TableSetupScrollFreeze(2, 1);
@ -127,7 +127,6 @@ private:
char editedName[1024];
std::map<std::string, Task> tasks;
};
MOD_EXPORT void _INIT_() {

View File

@ -8,7 +8,7 @@ using namespace nlohmann;
namespace sched_action {
class ActionClass {
public:
virtual ~ActionClass() {};
virtual ~ActionClass(){};
virtual void trigger() = 0;
virtual void prepareEditMenu() = 0;
virtual bool showEditMenu(bool& valid) = 0;
@ -21,12 +21,12 @@ namespace sched_action {
}
bool selected = false;
private:
bool valid = false;
};
typedef std::shared_ptr<ActionClass> Action;
typedef std::shared_ptr<ActionClass> Action;
}
#include <actions/start_recorder.h>

View File

@ -56,7 +56,7 @@ public:
ImGui::TableSetupColumn("Triggers");
ImGui::TableSetupScrollFreeze(1, 1);
ImGui::TableHeadersRow();
// Fill rows here
ImGui::TableNextRow();
ImGui::TableSetColumnIndex(0);
@ -119,5 +119,4 @@ private:
std::vector<sched_action::Action> actions;
int editedAction = -1;
};