Init

Fork of ESP8266Interface by ESP8266

Revision:
46:913d07795182
Parent:
45:c180905b5b79
Child:
47:1f4dd0e91837
--- a/ESP8266/ESP8266.cpp	Wed Jun 03 18:36:02 2015 +0000
+++ b/ESP8266/ESP8266.cpp	Fri Jun 05 16:17:07 2015 +0000
@@ -23,13 +23,13 @@
 #include <algorithm>
 
 //Debug is disabled by default
-#if 1
+#if 0
 #define DBG(x, ...)  printf("[ESP8266 : DBG]"x" \t[%s,%d]\r\n", ##__VA_ARGS__,__FILE__,__LINE__); 
 #define WARN(x, ...) printf("[ESP8266 : WARN]"x" \t[%s,%d]\r\n", ##__VA_ARGS__,__FILE__,__LINE__); 
 #define ERR(x, ...)  printf("[ESP8266 : ERR]"x" \t[%s,%d]\r\n", ##__VA_ARGS__,__FILE__,__LINE__); 
 #else
-#define DBG(x, ...)
-#define WARN(x, ...)
+#define DBG(x, ...) //wait_us(10);
+#define WARN(x, ...) //wait_us(10);
 #define ERR(x, ...)
 #endif
 
@@ -288,9 +288,9 @@
     wait_us(20);
     reset_pin = 1;
     //wait(1);
-
+    //reset_pin = !reset_pin
     //send("+++",3);
-    //wait(1);
+    wait(1);
     state.cmdMode = true;
     sendCommand("AT", "OK", NULL, 1000);
     sendCommand("AT+RST", "ready", NULL, 10000);
@@ -441,7 +441,7 @@
     }
 
     //the user wants the result from the command (ACK == NULL, res != NULL)
-    if ( res != NULL) {
+    if (res != NULL) {
         int i = 0;
         Timer timeout;
         timeout.start();