Skip to content

Commit

Permalink
[Cleanup] Fix issues compile caused by uncrustify
Browse files Browse the repository at this point in the history
  • Loading branch information
TD-er committed Jan 12, 2021
1 parent db02098 commit d2c2038
Show file tree
Hide file tree
Showing 14 changed files with 16 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/_C001.ino
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@ bool CPlugin_001(CPlugin::Function function, struct EventStruct *event, String&
// Uncrustify may change this into multi line, which will result in failed builds
// *INDENT-OFF*
bool do_process_c001_delay_queue(int controller_number, const C001_queue_element& element, ControllerSettingsStruct& ControllerSettings);
// *INDENT-ON*

bool do_process_c001_delay_queue(int controller_number, const C001_queue_element& element, ControllerSettingsStruct& ControllerSettings) {
// *INDENT-ON*
WiFiClient client;

if (!try_connect_host(controller_number, client, ControllerSettings)) {
Expand Down
2 changes: 1 addition & 1 deletion src/_C003.ino
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ bool CPlugin_003(CPlugin::Function function, struct EventStruct *event, String&
// Uncrustify may change this into multi line, which will result in failed builds
// *INDENT-OFF*
bool do_process_c003_delay_queue(int controller_number, const C003_queue_element& element, ControllerSettingsStruct& ControllerSettings);
// *INDENT-ON*

bool do_process_c003_delay_queue(int controller_number, const C003_queue_element& element, ControllerSettingsStruct& ControllerSettings) {
// *INDENT-ON*
bool success = false;

// Use WiFiClient class to create TCP connections
Expand Down
2 changes: 1 addition & 1 deletion src/_C004.ino
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ bool CPlugin_004(CPlugin::Function function, struct EventStruct *event, String&
// Uncrustify may change this into multi line, which will result in failed builds
// *INDENT-OFF*
bool do_process_c004_delay_queue(int controller_number, const C004_queue_element& element, ControllerSettingsStruct& ControllerSettings);
// *INDENT-ON*

bool do_process_c004_delay_queue(int controller_number, const C004_queue_element& element, ControllerSettingsStruct& ControllerSettings) {
// *INDENT-ON*
WiFiClient client;

if (!try_connect_host(controller_number, client, ControllerSettings)) {
Expand Down
2 changes: 1 addition & 1 deletion src/_C007.ino
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ bool CPlugin_007(CPlugin::Function function, struct EventStruct *event, String&
// Uncrustify may change this into multi line, which will result in failed builds
// *INDENT-OFF*
bool do_process_c007_delay_queue(int controller_number, const C007_queue_element& element, ControllerSettingsStruct& ControllerSettings);
// *INDENT-ON*

bool do_process_c007_delay_queue(int controller_number, const C007_queue_element& element, ControllerSettingsStruct& ControllerSettings) {
// *INDENT-ON*
WiFiClient client;

if (!try_connect_host(controller_number, client, ControllerSettings)) {
Expand Down
2 changes: 1 addition & 1 deletion src/_C008.ino
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ bool CPlugin_008(CPlugin::Function function, struct EventStruct *event, String&
// Uncrustify may change this into multi line, which will result in failed builds
// *INDENT-OFF*
bool do_process_c008_delay_queue(int controller_number, const C008_queue_element& element, ControllerSettingsStruct& ControllerSettings);
// *INDENT-ON*

bool do_process_c008_delay_queue(int controller_number, const C008_queue_element& element, ControllerSettingsStruct& ControllerSettings) {
// *INDENT-ON*
while (element.txt[element.valuesSent] == "") {
// A non valid value, which we are not going to send.
// Increase sent counter until a valid value is found.
Expand Down
2 changes: 1 addition & 1 deletion src/_C009.ino
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ bool CPlugin_009(CPlugin::Function function, struct EventStruct *event, String&
// Uncrustify may change this into multi line, which will result in failed builds
// *INDENT-OFF*
bool do_process_c009_delay_queue(int controller_number, const C009_queue_element& element, ControllerSettingsStruct& ControllerSettings);
// *INDENT-ON*

bool do_process_c009_delay_queue(int controller_number, const C009_queue_element& element, ControllerSettingsStruct& ControllerSettings) {
// *INDENT-ON*
WiFiClient client;

if (!try_connect_host(controller_number, client, ControllerSettings)) {
Expand Down
2 changes: 1 addition & 1 deletion src/_C010.ino
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ bool CPlugin_010(CPlugin::Function function, struct EventStruct *event, String&
// Uncrustify may change this into multi line, which will result in failed builds
// *INDENT-OFF*
bool do_process_c010_delay_queue(int controller_number, const C010_queue_element& element, ControllerSettingsStruct& ControllerSettings);
// *INDENT-ON*

bool do_process_c010_delay_queue(int controller_number, const C010_queue_element& element, ControllerSettingsStruct& ControllerSettings) {
// *INDENT-ON*
while (element.txt[element.valuesSent] == "") {
// A non valid value, which we are not going to send.
// Increase sent counter until a valid value is found.
Expand Down
2 changes: 1 addition & 1 deletion src/_C011.ino
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,9 @@ bool CPlugin_011(CPlugin::Function function, struct EventStruct *event, String&
// Uncrustify may change this into multi line, which will result in failed builds
// *INDENT-OFF*
bool do_process_c011_delay_queue(int controller_number, const C011_queue_element& element, ControllerSettingsStruct& ControllerSettings);
// *INDENT-ON*

bool do_process_c011_delay_queue(int controller_number, const C011_queue_element& element, ControllerSettingsStruct& ControllerSettings) {
// *INDENT-ON*
WiFiClient client;

if (!NetworkConnected()) { return false; }
Expand Down
2 changes: 1 addition & 1 deletion src/_C012.ino
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ bool CPlugin_012(CPlugin::Function function, struct EventStruct *event, String&
// Uncrustify may change this into multi line, which will result in failed builds
// *INDENT-OFF*
bool do_process_c012_delay_queue(int controller_number, const C012_queue_element& element, ControllerSettingsStruct& ControllerSettings);
// *INDENT-ON*

bool do_process_c012_delay_queue(int controller_number, const C012_queue_element& element, ControllerSettingsStruct& ControllerSettings) {
// *INDENT-ON*
while (element.txt[element.valuesSent] == "") {
// A non valid value, which we are not going to send.
// Increase sent counter until a valid value is found.
Expand Down
5 changes: 2 additions & 3 deletions src/_C015.ino
Original file line number Diff line number Diff line change
Expand Up @@ -234,10 +234,9 @@ bool CPlugin_015(CPlugin::Function function, struct EventStruct *event, String&
// Uncrustify may change this into multi line, which will result in failed builds
// *INDENT-OFF*
bool do_process_c015_delay_queue(int controller_plugin_number, const C015_queue_element& element, ControllerSettingsStruct& ControllerSettings);
// *INDENT-ON*

bool do_process_c015_delay_queue(int controller_plugin_number, const C015_queue_element& element,
ControllerSettingsStruct& ControllerSettings) {
bool do_process_c015_delay_queue(int controller_plugin_number, const C015_queue_element& element, ControllerSettingsStruct& ControllerSettings) {
// *INDENT-ON*
if (!Settings.ControllerEnabled[element.controller_idx]) {
// controller has been disabled. Answer true to flush queue.
return true;
Expand Down
2 changes: 1 addition & 1 deletion src/_C016.ino
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,9 @@ bool CPlugin_016(CPlugin::Function function, struct EventStruct *event, String&
// Uncrustify may change this into multi line, which will result in failed builds
// *INDENT-OFF*
bool do_process_c016_delay_queue(int controller_number, const C016_queue_element& element, ControllerSettingsStruct& ControllerSettings);
// *INDENT-ON*

bool do_process_c016_delay_queue(int controller_number, const C016_queue_element& element, ControllerSettingsStruct& ControllerSettings) {
// *INDENT-ON*
return true;

// FIXME TD-er: Hand over data to wherever it needs to be.
Expand Down
4 changes: 2 additions & 2 deletions src/_C017.ino
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ bool CPlugin_017(CPlugin::Function function, struct EventStruct *event, String&

// Uncrustify may change this into multi line, which will result in failed builds
// *INDENT-OFF*
bool do_process_c017_delay_queue(int controller_number, const C017_queue_element &element, ControllerSettingsStruct &ControllerSettings);
// *INDENT-ON*
bool do_process_c017_delay_queue(int controller_number, const C017_queue_element& element, ControllerSettingsStruct& ControllerSettings);

bool do_process_c017_delay_queue(int controller_number, const C017_queue_element& element, ControllerSettingsStruct& ControllerSettings)
// *INDENT-ON*
{
if (element.valueCount == 0) {
return true; // exit if we don't have anything to send.
Expand Down
2 changes: 1 addition & 1 deletion src/_C018.ino
Original file line number Diff line number Diff line change
Expand Up @@ -843,9 +843,9 @@ bool C018_init(struct EventStruct *event) {
// Uncrustify may change this into multi line, which will result in failed builds
// *INDENT-OFF*
bool do_process_c018_delay_queue(int controller_number, const C018_queue_element& element, ControllerSettingsStruct& ControllerSettings);
// *INDENT-ON*

bool do_process_c018_delay_queue(int controller_number, const C018_queue_element& element, ControllerSettingsStruct& ControllerSettings) {
// *INDENT-ON*
uint8_t pl = (element.packed.length() / 2);
float airtime_ms = C018_data->getLoRaAirTime(pl);
bool mustSetDelay = false;
Expand Down
3 changes: 1 addition & 2 deletions src/src/ControllerQueue/C015_queue_element.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ class C015_queue_element {

C015_queue_element();

C015_queue_element(const struct EventStruct *event,
byte value_count);
C015_queue_element(const struct EventStruct *event, byte value_count);

bool checkDone(bool succesfull) const;

Expand Down

0 comments on commit d2c2038

Please sign in to comment.