FRDM-K64F, Avnet M14A2A, Grove Shield, to create smart home system. In use with AT&Ts M2x & Flow.

Dependencies:   mbed FXOS8700CQ MODSERIAL

Files at this revision

API Documentation at this revision

Comitter:
fkellermavnet
Date:
Sun Jul 24 17:50:42 2016 +0000
Parent:
44:c95a85b5cf92
Child:
46:da9d788f5d5a
Commit message:
Setup no response string for when WNC is down. Now erases string in case user manipulated it between calls.

Changed in this revision

wnc_control.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/wnc_control.cpp	Sun Jul 24 17:45:30 2016 +0000
+++ b/wnc_control.cpp	Sun Jul 24 17:50:42 2016 +0000
@@ -269,12 +269,13 @@
 {
   if (check_wnc_ready() < 0)
   {
-     static string noRespStr("");
+     static string noRespStr;
      string truncStr(s, 50);
      pc.puts("FAIL send cmd: ");
      pc.puts(truncStr.c_str());
      pc.puts("\r\n");
      WNC_MDM_ERR = WNC_NO_RESPONSE;
+     noRespStr.erase();
      *r = &noRespStr;
      return (-2);
   }