diff --git a/examples/SX127x/SX127x_Channel_Activity_Detection_Blocking/SX127x_Channel_Activity_Detection_Blocking.ino b/examples/SX127x/SX127x_Channel_Activity_Detection_Blocking/SX127x_Channel_Activity_Detection_Blocking.ino index 6a23001a..ebd3ed32 100644 --- a/examples/SX127x/SX127x_Channel_Activity_Detection_Blocking/SX127x_Channel_Activity_Detection_Blocking.ino +++ b/examples/SX127x/SX127x_Channel_Activity_Detection_Blocking/SX127x_Channel_Activity_Detection_Blocking.ino @@ -46,7 +46,7 @@ void setup() { } else { Serial.print(F("failed, code ")); Serial.println(state); - while (true); + while (true) { delay(10); } } } diff --git a/examples/SX127x/SX127x_Channel_Activity_Detection_Interrupt/SX127x_Channel_Activity_Detection_Interrupt.ino b/examples/SX127x/SX127x_Channel_Activity_Detection_Interrupt/SX127x_Channel_Activity_Detection_Interrupt.ino index 631ae909..edb01aa4 100644 --- a/examples/SX127x/SX127x_Channel_Activity_Detection_Interrupt/SX127x_Channel_Activity_Detection_Interrupt.ino +++ b/examples/SX127x/SX127x_Channel_Activity_Detection_Interrupt/SX127x_Channel_Activity_Detection_Interrupt.ino @@ -42,7 +42,7 @@ void setup() { } else { Serial.print(F("failed, code ")); Serial.println(state); - while (true); + while (true) { delay(10); } } // set the function that will be called diff --git a/examples/SX127x/SX127x_Channel_Activity_Detection_Receive/SX127x_Channel_Activity_Detection_Receive.ino b/examples/SX127x/SX127x_Channel_Activity_Detection_Receive/SX127x_Channel_Activity_Detection_Receive.ino index 945ded9f..35f9d40d 100644 --- a/examples/SX127x/SX127x_Channel_Activity_Detection_Receive/SX127x_Channel_Activity_Detection_Receive.ino +++ b/examples/SX127x/SX127x_Channel_Activity_Detection_Receive/SX127x_Channel_Activity_Detection_Receive.ino @@ -47,7 +47,7 @@ void setup() { } else { Serial.print(F("failed, code ")); Serial.println(state); - while (true); + while (true) { delay(10); } } // set the function that will be called diff --git a/examples/SX127x/SX127x_FSK_Modem/SX127x_FSK_Modem.ino b/examples/SX127x/SX127x_FSK_Modem/SX127x_FSK_Modem.ino index aa2b2127..49617884 100644 --- a/examples/SX127x/SX127x_FSK_Modem/SX127x_FSK_Modem.ino +++ b/examples/SX127x/SX127x_FSK_Modem/SX127x_FSK_Modem.ino @@ -41,7 +41,7 @@ void setup() { } else { Serial.print(F("failed, code ")); Serial.println(state); - while (true); + while (true) { delay(10); } } // if needed, you can switch between LoRa and FSK modes @@ -64,7 +64,7 @@ void setup() { if (state != RADIOLIB_ERR_NONE) { Serial.print(F("Unable to set configuration, code ")); Serial.println(state); - while (true); + while (true) { delay(10); } } // FSK modulation can be changed to OOK @@ -77,7 +77,7 @@ void setup() { if (state != RADIOLIB_ERR_NONE) { Serial.print(F("Unable to change modulation, code ")); Serial.println(state); - while (true); + while (true) { delay(10); } } #warning "This sketch is just an API guide! Read the note at line 6." diff --git a/examples/SX127x/SX127x_PingPong/SX127x_PingPong.ino b/examples/SX127x/SX127x_PingPong/SX127x_PingPong.ino index df025bc9..0e191f20 100644 --- a/examples/SX127x/SX127x_PingPong/SX127x_PingPong.ino +++ b/examples/SX127x/SX127x_PingPong/SX127x_PingPong.ino @@ -58,7 +58,7 @@ void setup() { } else { Serial.print(F("failed, code ")); Serial.println(state); - while (true); + while (true) { delay(10); } } // set the function that will be called @@ -79,7 +79,7 @@ void setup() { } else { Serial.print(F("failed, code ")); Serial.println(state); - while (true); + while (true) { delay(10); } } #endif } diff --git a/examples/SX127x/SX127x_Receive_Blocking/SX127x_Receive_Blocking.ino b/examples/SX127x/SX127x_Receive_Blocking/SX127x_Receive_Blocking.ino index bdfae6d5..b2a1e302 100644 --- a/examples/SX127x/SX127x_Receive_Blocking/SX127x_Receive_Blocking.ino +++ b/examples/SX127x/SX127x_Receive_Blocking/SX127x_Receive_Blocking.ino @@ -50,7 +50,7 @@ void setup() { } else { Serial.print(F("failed, code ")); Serial.println(state); - while (true); + while (true) { delay(10); } } } diff --git a/examples/SX127x/SX127x_Receive_Direct/SX127x_Receive_Direct.ino b/examples/SX127x/SX127x_Receive_Direct/SX127x_Receive_Direct.ino index dee4214f..d622a2a2 100644 --- a/examples/SX127x/SX127x_Receive_Direct/SX127x_Receive_Direct.ino +++ b/examples/SX127x/SX127x_Receive_Direct/SX127x_Receive_Direct.ino @@ -39,7 +39,7 @@ void setup() { } else { Serial.print(F("failed, code ")); Serial.println(state); - while (true); + while (true) { delay(10); } } // set the direct mode sync word diff --git a/examples/SX127x/SX127x_Receive_FHSS/SX127x_Receive_FHSS.ino b/examples/SX127x/SX127x_Receive_FHSS/SX127x_Receive_FHSS.ino index d3423b9e..7785a173 100644 --- a/examples/SX127x/SX127x_Receive_FHSS/SX127x_Receive_FHSS.ino +++ b/examples/SX127x/SX127x_Receive_FHSS/SX127x_Receive_FHSS.ino @@ -81,7 +81,7 @@ void setup() { } else { Serial.print(F("failed, code ")); Serial.println(state); - while (true); + while (true) { delay(10); } } // set hop period in symbols @@ -92,7 +92,7 @@ void setup() { } else { Serial.print(F("failed, code ")); Serial.println(state); - while (true); + while (true) { delay(10); } } // set the function to call when reception is finished @@ -109,7 +109,7 @@ void setup() { } else { Serial.print(F("failed, code ")); Serial.println(state); - while (true); + while (true) { delay(10); } } } diff --git a/examples/SX127x/SX127x_Receive_Interrupt/SX127x_Receive_Interrupt.ino b/examples/SX127x/SX127x_Receive_Interrupt/SX127x_Receive_Interrupt.ino index 0e833e0d..5d2adbff 100644 --- a/examples/SX127x/SX127x_Receive_Interrupt/SX127x_Receive_Interrupt.ino +++ b/examples/SX127x/SX127x_Receive_Interrupt/SX127x_Receive_Interrupt.ino @@ -46,7 +46,7 @@ void setup() { } else { Serial.print(F("failed, code ")); Serial.println(state); - while (true); + while (true) { delay(10); } } // set the function that will be called @@ -61,7 +61,7 @@ void setup() { } else { Serial.print(F("failed, code ")); Serial.println(state); - while (true); + while (true) { delay(10); } } // if needed, 'listen' mode can be disabled by calling diff --git a/examples/SX127x/SX127x_Settings/SX127x_Settings.ino b/examples/SX127x/SX127x_Settings/SX127x_Settings.ino index 007a49fb..6fbc631b 100644 --- a/examples/SX127x/SX127x_Settings/SX127x_Settings.ino +++ b/examples/SX127x/SX127x_Settings/SX127x_Settings.ino @@ -52,7 +52,7 @@ void setup() { } else { Serial.print(F("failed, code ")); Serial.println(state); - while (true); + while (true) { delay(10); } } // initialize the second LoRa instance with @@ -78,7 +78,7 @@ void setup() { } else { Serial.print(F("failed, code ")); Serial.println(state); - while (true); + while (true) { delay(10); } } // you can also change the settings at runtime @@ -87,32 +87,32 @@ void setup() { // set carrier frequency to 433.5 MHz if (radio1.setFrequency(433.5) == RADIOLIB_ERR_INVALID_FREQUENCY) { Serial.println(F("Selected frequency is invalid for this module!")); - while (true); + while (true) { delay(10); } } // set bandwidth to 250 kHz if (radio1.setBandwidth(250.0) == RADIOLIB_ERR_INVALID_BANDWIDTH) { Serial.println(F("Selected bandwidth is invalid for this module!")); - while (true); + while (true) { delay(10); } } // set spreading factor to 10 if (radio1.setSpreadingFactor(10) == RADIOLIB_ERR_INVALID_SPREADING_FACTOR) { Serial.println(F("Selected spreading factor is invalid for this module!")); - while (true); + while (true) { delay(10); } } // set coding rate to 6 if (radio1.setCodingRate(6) == RADIOLIB_ERR_INVALID_CODING_RATE) { Serial.println(F("Selected coding rate is invalid for this module!")); - while (true); + while (true) { delay(10); } } // set LoRa sync word to 0x14 // NOTE: value 0x34 is reserved for LoRaWAN networks and should not be used if (radio1.setSyncWord(0x14) != RADIOLIB_ERR_NONE) { Serial.println(F("Unable to set sync word!")); - while (true); + while (true) { delay(10); } } // set output power to 10 dBm (accepted range is -3 - 17 dBm) @@ -120,20 +120,20 @@ void setup() { // duty cycle MUST NOT exceed 1% if (radio1.setOutputPower(10) == RADIOLIB_ERR_INVALID_OUTPUT_POWER) { Serial.println(F("Selected output power is invalid for this module!")); - while (true); + while (true) { delay(10); } } // set over current protection limit to 80 mA (accepted range is 45 - 240 mA) // NOTE: set value to 0 to disable overcurrent protection if (radio1.setCurrentLimit(80) == RADIOLIB_ERR_INVALID_CURRENT_LIMIT) { Serial.println(F("Selected current limit is invalid for this module!")); - while (true); + while (true) { delay(10); } } // set LoRa preamble length to 15 symbols (accepted range is 6 - 65535) if (radio1.setPreambleLength(15) == RADIOLIB_ERR_INVALID_PREAMBLE_LENGTH) { Serial.println(F("Selected preamble length is invalid for this module!")); - while (true); + while (true) { delay(10); } } // set amplifier gain to 1 (accepted range is 1 - 6, where 1 is maximum gain) @@ -141,7 +141,7 @@ void setup() { // leave at 0 unless you know what you're doing if (radio1.setGain(1) == RADIOLIB_ERR_INVALID_GAIN) { Serial.println(F("Selected gain is invalid for this module!")); - while (true); + while (true) { delay(10); } } Serial.println(F("All settings successfully changed!")); diff --git a/examples/SX127x/SX127x_Transmit_Blocking/SX127x_Transmit_Blocking.ino b/examples/SX127x/SX127x_Transmit_Blocking/SX127x_Transmit_Blocking.ino index 2298ac2c..e5b258e3 100644 --- a/examples/SX127x/SX127x_Transmit_Blocking/SX127x_Transmit_Blocking.ino +++ b/examples/SX127x/SX127x_Transmit_Blocking/SX127x_Transmit_Blocking.ino @@ -45,7 +45,7 @@ void setup() { } else { Serial.print(F("failed, code ")); Serial.println(state); - while (true); + while (true) { delay(10); } } // some modules have an external RF switch diff --git a/examples/SX127x/SX127x_Transmit_FHSS/SX127x_Transmit_FHSS.ino b/examples/SX127x/SX127x_Transmit_FHSS/SX127x_Transmit_FHSS.ino index 15ef3ae8..5c2297db 100644 --- a/examples/SX127x/SX127x_Transmit_FHSS/SX127x_Transmit_FHSS.ino +++ b/examples/SX127x/SX127x_Transmit_FHSS/SX127x_Transmit_FHSS.ino @@ -93,7 +93,7 @@ void setup() { } else { Serial.print(F("failed, code ")); Serial.println(state); - while (true); + while (true) { delay(10); } } // set hop period in symbols @@ -104,7 +104,7 @@ void setup() { } else { Serial.print(F("failed, code ")); Serial.println(state); - while (true); + while (true) { delay(10); } } // set the function to call when transmission is finished diff --git a/examples/SX127x/SX127x_Transmit_Interrupt/SX127x_Transmit_Interrupt.ino b/examples/SX127x/SX127x_Transmit_Interrupt/SX127x_Transmit_Interrupt.ino index 7cdce593..7b78080e 100644 --- a/examples/SX127x/SX127x_Transmit_Interrupt/SX127x_Transmit_Interrupt.ino +++ b/examples/SX127x/SX127x_Transmit_Interrupt/SX127x_Transmit_Interrupt.ino @@ -45,7 +45,7 @@ void setup() { } else { Serial.print(F("failed, code ")); Serial.println(state); - while (true); + while (true) { delay(10); } } // set the function that will be called