File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -217,7 +217,7 @@ bool ArduinoCellular::awaitNetworkRegistration(){
217217 if (this ->debugStream != nullptr ){
218218 this ->debugStream ->println (" Waiting for network registration..." );
219219 }
220- while (!modem.waitForNetwork (20000L )) {
220+ while (!modem.waitForNetwork (waitForNetworkTimeout )) {
221221 if (this ->debugStream != nullptr ){
222222 this ->debugStream ->print (" ." );
223223 }
Original file line number Diff line number Diff line change @@ -277,6 +277,8 @@ class ArduinoCellular {
277277 Stream* debugStream = nullptr ; /* *< The stream to be used for printing debugging messages. */
278278
279279 static unsigned long getTime (); /* * Callback for getting the current time as an unix timestamp. */
280+
281+ static constexpr unsigned long waitForNetworkTimeout = 20000L ; /* *< Maximum wait time for network registration (In milliseconds). */
280282};
281283
282284
You can’t perform that action at this time.
0 commit comments