mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2025-08-23 00:11:49 +02:00
Formatted the entire codebase and added a CI check for formatting
This commit is contained in:
.clang-format
.github/workflows
core/src
config.cppconfig.hcore.cppcore.h
dsp
audio.hblock.hbuffer.hchain.hclock_recovery.hcompression.hconversion.hcorrection.hdecimation.hdeframing.hdemodulator.hfalcon_fec.hfalcon_packet.hfilter.hmath.hmeasure.h
meteor
noaa
noise_reduction.hpll.hprocessing.hresampling.hrouting.hsink.hsource.hstereo_fm.hstream.htypes.hutils
vfo.hwindow.hgui
colormaps.cpp
module.cppmodule.hoptions.cppoptions.hdialogs
file_dialogs.hicons.cppmain_window.cppmain_window.hmenus
theme_manager.cpptheme_manager.htuner.cppwidgets
bandplan.cppbandplan.hconstellation_diagram.cppconstellation_diagram.hfile_select.cppfile_select.hfolder_select.cppfolder_select.hfrequency_select.cppimage.cppimage.hline_push_image.cppline_push_image.hmenu.cppmenu.hsnr_meter.cppstepped_slider.cppsymbol_diagram.cppsymbol_diagram.hvolume_meter.cppwaterfall.cppwaterfall.h
signal_path
utils
decoder_modules
falcon9_decoder
m17_decoder
meteor_demodulator
src
radio
weather_sat_decoder
misc_modules
demo_module
src
discord_integration
src
frequency_manager
src
recorder
rigctl_server
src
scanner
src
scheduler
sink_modules
source_modules
airspy_source
src
airspyhf_source
src
bladerf_source
src
file_source
hackrf_source
src
limesdr_source
src
plutosdr_source
src
rfspace_source
rtl_sdr_source
src
rtl_tcp_source
sddc_source
src
sdrplay_source
src
soapy_source
src
spyserver_source
src
@@ -8,7 +8,7 @@
|
||||
#include <thread>
|
||||
#include <radio_interface.h>
|
||||
|
||||
SDRPP_MOD_INFO {
|
||||
SDRPP_MOD_INFO{
|
||||
/* Name: */ "discord_integration",
|
||||
/* Description: */ "Discord Rich Presence module for SDR++",
|
||||
/* Author: */ "Cam K.;Ryzerth",
|
||||
@@ -16,7 +16,7 @@ SDRPP_MOD_INFO {
|
||||
/* Max instances */ 1
|
||||
};
|
||||
|
||||
#define DISCORD_APP_ID "834590435708108860"
|
||||
#define DISCORD_APP_ID "834590435708108860"
|
||||
|
||||
class DiscordIntegrationModule : public ModuleManager::Instance {
|
||||
public:
|
||||
@@ -61,14 +61,13 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
// Main thread
|
||||
void worker() {
|
||||
// TODO: Switch out for condition variable to terminate thread instantly
|
||||
// OR even better, the new timer class that I still need to add
|
||||
while (workerRunning) {
|
||||
workerCounter++;
|
||||
if(workerCounter >= 1000) {
|
||||
if (workerCounter >= 1000) {
|
||||
workerCounter = 0;
|
||||
updatePresence();
|
||||
}
|
||||
@@ -87,15 +86,27 @@ private:
|
||||
int modeNum;
|
||||
core::modComManager.callInterface(selectedName, RADIO_IFACE_CMD_GET_MODE, NULL, &modeNum);
|
||||
if (modeNum == RADIO_IFACE_MODE_NFM) { strcpy(mode, "NFM"); }
|
||||
else if (modeNum == RADIO_IFACE_MODE_WFM) { strcpy(mode, "FM"); }
|
||||
else if (modeNum == RADIO_IFACE_MODE_AM) { strcpy(mode, "AM"); }
|
||||
else if (modeNum == RADIO_IFACE_MODE_DSB) { strcpy(mode, "DSB"); }
|
||||
else if (modeNum == RADIO_IFACE_MODE_USB) { strcpy(mode, "USB"); }
|
||||
else if (modeNum == RADIO_IFACE_MODE_CW) { strcpy(mode, "CW"); }
|
||||
else if (modeNum == RADIO_IFACE_MODE_LSB) { strcpy(mode, "LSB"); }
|
||||
else if (modeNum == RADIO_IFACE_MODE_WFM) {
|
||||
strcpy(mode, "FM");
|
||||
}
|
||||
else if (modeNum == RADIO_IFACE_MODE_AM) {
|
||||
strcpy(mode, "AM");
|
||||
}
|
||||
else if (modeNum == RADIO_IFACE_MODE_DSB) {
|
||||
strcpy(mode, "DSB");
|
||||
}
|
||||
else if (modeNum == RADIO_IFACE_MODE_USB) {
|
||||
strcpy(mode, "USB");
|
||||
}
|
||||
else if (modeNum == RADIO_IFACE_MODE_CW) {
|
||||
strcpy(mode, "CW");
|
||||
}
|
||||
else if (modeNum == RADIO_IFACE_MODE_LSB) {
|
||||
strcpy(mode, "LSB");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (selectedFreq != lastFreq || mode != lastMode) {
|
||||
lastFreq = selectedFreq;
|
||||
lastMode = mode;
|
||||
@@ -146,7 +157,6 @@ private:
|
||||
int workerCounter = 0;
|
||||
std::thread workerThread;
|
||||
bool workerRunning;
|
||||
|
||||
};
|
||||
|
||||
MOD_EXPORT void _INIT_() {
|
||||
|
Reference in New Issue
Block a user