Parser for AT commands and similar protocols

Dependencies:   BufferedSerial

Revision:
11:fd406d4c4227
Parent:
10:553f9ffaf657
Child:
12:7d3c3f7ce928
diff -r 553f9ffaf657 -r fd406d4c4227 ATParser.cpp
--- a/ATParser.cpp	Sun Jul 26 21:53:28 2015 +0000
+++ b/ATParser.cpp	Mon Dec 28 05:37:44 2015 +0000
@@ -184,7 +184,7 @@
         }
     }
 
-    debug_if(at_echo, "AT> %s\r\n", _buffer);
+    debug_if(dbg_on, "AT> %s\r\n", _buffer);
     return true;
 }
 
@@ -247,7 +247,7 @@
 
             // We only succeed if all characters in the response are matched
             if (count == j) {
-                debug_if(at_echo, "AT= %s\r\n", _buffer+offset);
+                debug_if(dbg_on, "AT= %s\r\n", _buffer+offset);
                 // Reuse the front end of the buffer
                 memcpy(_buffer, response, i);
                 _buffer[i] = 0;
@@ -262,7 +262,7 @@
 
             // Clear the buffer when we hit a newline
             if (strcmp(&_buffer[offset + j-_delim_size], _delimiter) == 0) {
-                debug_if(at_echo, "AT< %s", _buffer+offset);
+                debug_if(dbg_on, "AT< %s", _buffer+offset);
                 j = 0;
             }
         }