diff --git a/examples/SX126x/SX126x_Channel_Activity_Detection_Blocking/SX126x_Channel_Activity_Detection_Blocking.ino b/examples/SX126x/SX126x_Channel_Activity_Detection_Blocking/SX126x_Channel_Activity_Detection_Blocking.ino index 0d2380dd..17d6b9f0 100644 --- a/examples/SX126x/SX126x_Channel_Activity_Detection_Blocking/SX126x_Channel_Activity_Detection_Blocking.ino +++ b/examples/SX126x/SX126x_Channel_Activity_Detection_Blocking/SX126x_Channel_Activity_Detection_Blocking.ino @@ -48,7 +48,7 @@ void setup() { } else { Serial.print(F("failed, code ")); Serial.println(state); - while (true); + while (true) { delay(10); } } } diff --git a/examples/SX126x/SX126x_Channel_Activity_Detection_Interrupt/SX126x_Channel_Activity_Detection_Interrupt.ino b/examples/SX126x/SX126x_Channel_Activity_Detection_Interrupt/SX126x_Channel_Activity_Detection_Interrupt.ino index 651da66b..0d0f45cd 100644 --- a/examples/SX126x/SX126x_Channel_Activity_Detection_Interrupt/SX126x_Channel_Activity_Detection_Interrupt.ino +++ b/examples/SX126x/SX126x_Channel_Activity_Detection_Interrupt/SX126x_Channel_Activity_Detection_Interrupt.ino @@ -43,7 +43,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/SX126x/SX126x_Channel_Activity_Detection_Receive/SX126x_Channel_Activity_Detection_Receive.ino b/examples/SX126x/SX126x_Channel_Activity_Detection_Receive/SX126x_Channel_Activity_Detection_Receive.ino index 20b0ae92..6b68227e 100644 --- a/examples/SX126x/SX126x_Channel_Activity_Detection_Receive/SX126x_Channel_Activity_Detection_Receive.ino +++ b/examples/SX126x/SX126x_Channel_Activity_Detection_Receive/SX126x_Channel_Activity_Detection_Receive.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 diff --git a/examples/SX126x/SX126x_FSK_Modem/SX126x_FSK_Modem.ino b/examples/SX126x/SX126x_FSK_Modem/SX126x_FSK_Modem.ino index 2c394c5c..93a18b65 100644 --- a/examples/SX126x/SX126x_FSK_Modem/SX126x_FSK_Modem.ino +++ b/examples/SX126x/SX126x_FSK_Modem/SX126x_FSK_Modem.ino @@ -44,7 +44,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 @@ -67,7 +67,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 modem on SX126x can handle the sync word setting in bits, not just diff --git a/examples/SX126x/SX126x_PingPong/SX126x_PingPong.ino b/examples/SX126x/SX126x_PingPong/SX126x_PingPong.ino index 99a962b2..0ec708c8 100644 --- a/examples/SX126x/SX126x_PingPong/SX126x_PingPong.ino +++ b/examples/SX126x/SX126x_PingPong/SX126x_PingPong.ino @@ -61,7 +61,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 @@ -82,7 +82,7 @@ void setup() { } else { Serial.print(F("failed, code ")); Serial.println(state); - while (true); + while (true) { delay(10); } } #endif } diff --git a/examples/SX126x/SX126x_Receive_Blocking/SX126x_Receive_Blocking.ino b/examples/SX126x/SX126x_Receive_Blocking/SX126x_Receive_Blocking.ino index 75fda8f6..0dee9533 100644 --- a/examples/SX126x/SX126x_Receive_Blocking/SX126x_Receive_Blocking.ino +++ b/examples/SX126x/SX126x_Receive_Blocking/SX126x_Receive_Blocking.ino @@ -53,7 +53,7 @@ void setup() { } else { Serial.print(F("failed, code ")); Serial.println(state); - while (true); + while (true) { delay(10); } } } diff --git a/examples/SX126x/SX126x_Receive_Interrupt/SX126x_Receive_Interrupt.ino b/examples/SX126x/SX126x_Receive_Interrupt/SX126x_Receive_Interrupt.ino index 11d6ea81..017c78cd 100644 --- a/examples/SX126x/SX126x_Receive_Interrupt/SX126x_Receive_Interrupt.ino +++ b/examples/SX126x/SX126x_Receive_Interrupt/SX126x_Receive_Interrupt.ino @@ -49,7 +49,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 @@ -64,7 +64,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/SX126x/SX126x_Settings/SX126x_Settings.ino b/examples/SX126x/SX126x_Settings/SX126x_Settings.ino index 530c49ab..28740398 100644 --- a/examples/SX126x/SX126x_Settings/SX126x_Settings.ino +++ b/examples/SX126x/SX126x_Settings/SX126x_Settings.ino @@ -59,7 +59,7 @@ void setup() { } else { Serial.print(F("failed, code ")); Serial.println(state); - while (true); + while (true) { delay(10); } } // initialize the second LoRa instance with @@ -80,7 +80,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 @@ -89,56 +89,56 @@ 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 0xAB if (radio1.setSyncWord(0xAB) != 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 -17 - 22 dBm) 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 0 - 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); } } // disable CRC if (radio1.setCRC(false) == RADIOLIB_ERR_INVALID_CRC_CONFIGURATION) { Serial.println(F("Selected CRC is invalid for this module!")); - while (true); + while (true) { delay(10); } } // Some SX126x modules have TCXO (temperature compensated crystal @@ -146,7 +146,7 @@ void setup() { // the following method can be used. if (radio1.setTCXO(2.4) == RADIOLIB_ERR_INVALID_TCXO_VOLTAGE) { Serial.println(F("Selected TCXO voltage is invalid for this module!")); - while (true); + while (true) { delay(10); } } // Some SX126x modules use DIO2 as RF switch. To enable @@ -155,7 +155,7 @@ void setup() { // it can't be used as interrupt pin! if (radio1.setDio2AsRfSwitch() != RADIOLIB_ERR_NONE) { Serial.println(F("Failed to set DIO2 as RF switch!")); - while (true); + while (true) { delay(10); } } Serial.println(F("All settings succesfully changed!")); diff --git a/examples/SX126x/SX126x_Spectrum_Scan/SX126x_Spectrum_Scan.ino b/examples/SX126x/SX126x_Spectrum_Scan/SX126x_Spectrum_Scan.ino index dbf4a9d2..987f4655 100644 --- a/examples/SX126x/SX126x_Spectrum_Scan/SX126x_Spectrum_Scan.ino +++ b/examples/SX126x/SX126x_Spectrum_Scan/SX126x_Spectrum_Scan.ino @@ -45,7 +45,7 @@ void setup() { } else { Serial.print(F("failed, code ")); Serial.println(state); - while(true); + while (true) { delay(10); } } // upload a patch to the SX1262 to enable spectral scan @@ -58,7 +58,7 @@ void setup() { } else { Serial.print(F("failed, code ")); Serial.println(state); - while(true); + while (true) { delay(10); } } // configure scan bandwidth to 234.4 kHz @@ -71,7 +71,7 @@ void setup() { } else { Serial.print(F("failed, code ")); Serial.println(state); - while(true); + while (true) { delay(10); } } } @@ -87,7 +87,7 @@ void loop() { } else { Serial.print(F("failed, code ")); Serial.println(state); - while(true); + while (true) { delay(10); } } // wait for spectral scan to finish diff --git a/examples/SX126x/SX126x_Spectrum_Scan_Frequency/SX126x_Spectrum_Scan_Frequency.ino b/examples/SX126x/SX126x_Spectrum_Scan_Frequency/SX126x_Spectrum_Scan_Frequency.ino index e7d6b33a..f5de4607 100644 --- a/examples/SX126x/SX126x_Spectrum_Scan_Frequency/SX126x_Spectrum_Scan_Frequency.ino +++ b/examples/SX126x/SX126x_Spectrum_Scan_Frequency/SX126x_Spectrum_Scan_Frequency.ino @@ -49,7 +49,7 @@ void setup() { } else { Serial.print(F("failed, code ")); Serial.println(state); - while(true); + while (true) { delay(10); } } // upload a patch to the SX1262 to enable spectral scan @@ -62,7 +62,7 @@ void setup() { } else { Serial.print(F("failed, code ")); Serial.println(state); - while(true); + while (true) { delay(10); } } // configure scan bandwidth to 234.4 kHz @@ -75,7 +75,7 @@ void setup() { } else { Serial.print(F("failed, code ")); Serial.println(state); - while(true); + while (true) { delay(10); } } } @@ -95,7 +95,7 @@ void loop() { } else { Serial.print(F("failed, code ")); Serial.println(state); - while(true); + while (true) { delay(10); } } // wait for spectral scan to finish diff --git a/examples/SX126x/SX126x_Transmit_Blocking/SX126x_Transmit_Blocking.ino b/examples/SX126x/SX126x_Transmit_Blocking/SX126x_Transmit_Blocking.ino index 8cf890eb..e090ef8e 100644 --- a/examples/SX126x/SX126x_Transmit_Blocking/SX126x_Transmit_Blocking.ino +++ b/examples/SX126x/SX126x_Transmit_Blocking/SX126x_Transmit_Blocking.ino @@ -48,7 +48,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/SX126x/SX126x_Transmit_Interrupt/SX126x_Transmit_Interrupt.ino b/examples/SX126x/SX126x_Transmit_Interrupt/SX126x_Transmit_Interrupt.ino index be281597..5f0b9ea1 100644 --- a/examples/SX126x/SX126x_Transmit_Interrupt/SX126x_Transmit_Interrupt.ino +++ b/examples/SX126x/SX126x_Transmit_Interrupt/SX126x_Transmit_Interrupt.ino @@ -48,7 +48,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