From ff5b7117bfd081c43474ea6817ed2a4adaac56cc Mon Sep 17 00:00:00 2001 From: jgromes Date: Sat, 29 Jun 2024 18:32:19 +0200 Subject: [PATCH] [PHY] Added delay to halting while loops --- .../PhysicalLayer_Interface.ino | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/PhysicalLayer/PhysicalLayer_Interface/PhysicalLayer_Interface.ino b/examples/PhysicalLayer/PhysicalLayer_Interface/PhysicalLayer_Interface.ino index 58a95360..b56da33f 100644 --- a/examples/PhysicalLayer/PhysicalLayer_Interface/PhysicalLayer_Interface.ino +++ b/examples/PhysicalLayer/PhysicalLayer_Interface/PhysicalLayer_Interface.ino @@ -42,7 +42,7 @@ void setup() { } else { Serial.print(F("failed, code ")); Serial.println(state); - while(true); + while (true) { delay(10); } } // or we can use the "phy" pointer to access the common layer @@ -54,7 +54,7 @@ void setup() { } else { Serial.print(F("failed, code ")); Serial.println(state); - while(true); + while (true) { delay(10); } } // PhysicalLayer also contains basic functionality @@ -66,7 +66,7 @@ void setup() { } else { Serial.print(F("failed, code ")); Serial.println(state); - while(true); + while (true) { delay(10); } } // try to receive now - this will almost certainly timeout @@ -82,7 +82,7 @@ void setup() { } else { Serial.print(F("failed, code ")); Serial.println(state); - while(true); + while (true) { delay(10); } } // interrupt-driven versions of Rx/Tx are supported as well @@ -105,7 +105,7 @@ void setup() { } else { Serial.print(F("failed, code ")); Serial.println(state); - while(true); + while (true) { delay(10); } } // ... or standby @@ -116,7 +116,7 @@ void setup() { } else { Serial.print(F("failed, code ")); Serial.println(state); - while(true); + while (true) { delay(10); } } // there are also common SNR/RSSI measurement functions