Dom
21 hours ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with
58 additions and
9 deletions
-
examples/companion_radio/main.cpp
-
examples/kiss_modem/main.cpp
-
examples/simple_repeater/main.cpp
-
examples/simple_room_server/main.cpp
-
examples/simple_secure_chat/main.cpp
-
examples/simple_sensor/main.cpp
|
|
|
@ -134,7 +134,16 @@ void setup() { |
|
|
|
} |
|
|
|
#endif |
|
|
|
|
|
|
|
if (!radio_init()) { halt(); } |
|
|
|
int radioinit_attempts = 0; |
|
|
|
while (!radio_init()) { |
|
|
|
++radioinit_attempts; |
|
|
|
MESH_DEBUG_PRINTLN("Radio init failed! (attempt %d)", radioinit_attempts); |
|
|
|
if (radioinit_attempts >= 3) { |
|
|
|
MESH_DEBUG_PRINTLN("Radio init failed 3x - rebooting"); |
|
|
|
board.reboot(); |
|
|
|
} |
|
|
|
delay(500); |
|
|
|
} |
|
|
|
|
|
|
|
fast_rng.begin(radio_driver.getRngSeed()); |
|
|
|
|
|
|
|
|
|
|
|
@ -78,8 +78,15 @@ void onGetStats(uint32_t* rx, uint32_t* tx, uint32_t* errors) { |
|
|
|
void setup() { |
|
|
|
board.begin(); |
|
|
|
|
|
|
|
if (!radio_init()) { |
|
|
|
halt(); |
|
|
|
int radioinit_attempts = 0; |
|
|
|
while (!radio_init()) { |
|
|
|
++radioinit_attempts; |
|
|
|
MESH_DEBUG_PRINTLN("Radio init failed! (attempt %d)", radioinit_attempts); |
|
|
|
if (radioinit_attempts >= 3) { |
|
|
|
MESH_DEBUG_PRINTLN("Radio init failed 3x - rebooting"); |
|
|
|
board.reboot(); |
|
|
|
} |
|
|
|
delay(500); |
|
|
|
} |
|
|
|
|
|
|
|
radio_driver.begin(); |
|
|
|
|
|
|
|
@ -60,9 +60,15 @@ void setup() { |
|
|
|
} |
|
|
|
#endif |
|
|
|
|
|
|
|
if (!radio_init()) { |
|
|
|
MESH_DEBUG_PRINTLN("Radio init failed!"); |
|
|
|
halt(); |
|
|
|
int radioinit_attempts = 0; |
|
|
|
while (!radio_init()) { |
|
|
|
++radioinit_attempts; |
|
|
|
MESH_DEBUG_PRINTLN("Radio init failed! (attempt %d)", radioinit_attempts); |
|
|
|
if (radioinit_attempts >= 3) { |
|
|
|
MESH_DEBUG_PRINTLN("Radio init failed 3x - rebooting"); |
|
|
|
board.reboot(); |
|
|
|
} |
|
|
|
delay(500); |
|
|
|
} |
|
|
|
|
|
|
|
fast_rng.begin(radio_driver.getRngSeed()); |
|
|
|
|
|
|
|
@ -45,7 +45,16 @@ void setup() { |
|
|
|
} |
|
|
|
#endif |
|
|
|
|
|
|
|
if (!radio_init()) { halt(); } |
|
|
|
int radioinit_attempts = 0; |
|
|
|
while (!radio_init()) { |
|
|
|
++radioinit_attempts; |
|
|
|
MESH_DEBUG_PRINTLN("Radio init failed! (attempt %d)", radioinit_attempts); |
|
|
|
if (radioinit_attempts >= 3) { |
|
|
|
MESH_DEBUG_PRINTLN("Radio init failed 3x - rebooting"); |
|
|
|
board.reboot(); |
|
|
|
} |
|
|
|
delay(500); |
|
|
|
} |
|
|
|
|
|
|
|
fast_rng.begin(radio_driver.getRngSeed()); |
|
|
|
|
|
|
|
|
|
|
|
@ -564,7 +564,16 @@ void setup() { |
|
|
|
external_watchdog.begin(); |
|
|
|
#endif |
|
|
|
|
|
|
|
if (!radio_init()) { halt(); } |
|
|
|
int radioinit_attempts = 0; |
|
|
|
while (!radio_init()) { |
|
|
|
++radioinit_attempts; |
|
|
|
MESH_DEBUG_PRINTLN("Radio init failed! (attempt %d)", radioinit_attempts); |
|
|
|
if (radioinit_attempts >= 3) { |
|
|
|
MESH_DEBUG_PRINTLN("Radio init failed 3x - rebooting"); |
|
|
|
board.reboot(); |
|
|
|
} |
|
|
|
delay(500); |
|
|
|
} |
|
|
|
|
|
|
|
fast_rng.begin(radio_driver.getRngSeed()); |
|
|
|
|
|
|
|
|
|
|
|
@ -70,7 +70,16 @@ void setup() { |
|
|
|
} |
|
|
|
#endif |
|
|
|
|
|
|
|
if (!radio_init()) { halt(); } |
|
|
|
int radioinit_attempts = 0; |
|
|
|
while (!radio_init()) { |
|
|
|
++radioinit_attempts; |
|
|
|
MESH_DEBUG_PRINTLN("Radio init failed! (attempt %d)", radioinit_attempts); |
|
|
|
if (radioinit_attempts >= 3) { |
|
|
|
MESH_DEBUG_PRINTLN("Radio init failed 3x - rebooting"); |
|
|
|
board.reboot(); |
|
|
|
} |
|
|
|
delay(500); |
|
|
|
} |
|
|
|
|
|
|
|
fast_rng.begin(radio_driver.getRngSeed()); |
|
|
|
|
|
|
|
|