From d2c20389b64a387d04cb3a7b3206656d94be4787 Mon Sep 17 00:00:00 2001 From: TD-er Date: Tue, 12 Jan 2021 13:15:26 +0100 Subject: [PATCH] [Cleanup] Fix issues compile caused by uncrustify --- src/_C001.ino | 2 +- src/_C003.ino | 2 +- src/_C004.ino | 2 +- src/_C007.ino | 2 +- src/_C008.ino | 2 +- src/_C009.ino | 2 +- src/_C010.ino | 2 +- src/_C011.ino | 2 +- src/_C012.ino | 2 +- src/_C015.ino | 5 ++--- src/_C016.ino | 2 +- src/_C017.ino | 4 ++-- src/_C018.ino | 2 +- src/src/ControllerQueue/C015_queue_element.h | 3 +-- 14 files changed, 16 insertions(+), 18 deletions(-) diff --git a/src/_C001.ino b/src/_C001.ino index 52b5f61e90..15d2f88ca5 100644 --- a/src/_C001.ino +++ b/src/_C001.ino @@ -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)) { diff --git a/src/_C003.ino b/src/_C003.ino index 4ad5601a8e..c4b0b50013 100644 --- a/src/_C003.ino +++ b/src/_C003.ino @@ -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 diff --git a/src/_C004.ino b/src/_C004.ino index 138d5065be..0e14d9c628 100644 --- a/src/_C004.ino +++ b/src/_C004.ino @@ -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)) { diff --git a/src/_C007.ino b/src/_C007.ino index 0f484b20fe..3cd69456c1 100644 --- a/src/_C007.ino +++ b/src/_C007.ino @@ -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)) { diff --git a/src/_C008.ino b/src/_C008.ino index 559b193c66..7fb460b1f6 100644 --- a/src/_C008.ino +++ b/src/_C008.ino @@ -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. diff --git a/src/_C009.ino b/src/_C009.ino index a1233c742f..48d14016bc 100644 --- a/src/_C009.ino +++ b/src/_C009.ino @@ -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)) { diff --git a/src/_C010.ino b/src/_C010.ino index 326dbc837f..7cff1d73fa 100644 --- a/src/_C010.ino +++ b/src/_C010.ino @@ -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. diff --git a/src/_C011.ino b/src/_C011.ino index a6fb8cdee2..c8d9ef138d 100644 --- a/src/_C011.ino +++ b/src/_C011.ino @@ -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; } diff --git a/src/_C012.ino b/src/_C012.ino index d8afc7559a..0749d9a66c 100644 --- a/src/_C012.ino +++ b/src/_C012.ino @@ -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. diff --git a/src/_C015.ino b/src/_C015.ino index 32a1fce8e2..756c066c34 100644 --- a/src/_C015.ino +++ b/src/_C015.ino @@ -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; diff --git a/src/_C016.ino b/src/_C016.ino index e4b62dc946..5cbe8416da 100644 --- a/src/_C016.ino +++ b/src/_C016.ino @@ -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. diff --git a/src/_C017.ino b/src/_C017.ino index a1ef7097f7..dd8938f088 100644 --- a/src/_C017.ino +++ b/src/_C017.ino @@ -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. diff --git a/src/_C018.ino b/src/_C018.ino index 561835ad87..c2ee2aa852 100644 --- a/src/_C018.ino +++ b/src/_C018.ino @@ -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; diff --git a/src/src/ControllerQueue/C015_queue_element.h b/src/src/ControllerQueue/C015_queue_element.h index f85ad69079..10e3bf4530 100644 --- a/src/src/ControllerQueue/C015_queue_element.h +++ b/src/src/ControllerQueue/C015_queue_element.h @@ -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;