WncController

Fork of WncControllerLibrary by Fred Kellerman

Files at this revision

API Documentation at this revision

Comitter:
jk431j
Date:
Mon Dec 11 19:58:38 2017 +0000
Parent:
35:7c9d0f29ff7a
Commit message:
Added wait for cellular link.

Changed in this revision

WncController.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/WncController.cpp	Thu Mar 09 00:58:50 2017 +0000
+++ b/WncController.cpp	Mon Dec 11 19:58:38 2017 +0000
@@ -631,8 +631,17 @@
 {
   static bool reportStatus = true;
   unsigned i;
+  bool cellLink = false;
   
-  if (checkCellLink() == true) {
+  for (short idx = 0; idx < 12; idx++) {
+      cellLink = checkCellLink();
+      if (cellLink) 
+        break;
+      dbgPuts("Waiting for cell link to be established.");
+      waitMs(10*1000);
+  };
+    
+  if (cellLink) {
       if (reportStatus == false) {
           dbgPuts("Re-connected to cellular network!");
           reportStatus = true;