For test

Dependencies:   mbed

Revision:
17:c449356787f1
Parent:
14:40b1decf03f3
Child:
18:37254b357abd
--- a/ESP8266.cpp	Wed Feb 04 02:47:28 2015 +0000
+++ b/ESP8266.cpp	Wed Feb 04 03:06:54 2015 +0000
@@ -100,12 +100,12 @@
         false   -   unsuccessfully
 
 ***************************************************************************/
-bool ESP8266::ipConfig(uint8_t type, String addr, int port, uint8_t a, uint8_t id)
+bool ESP8266::ipConfig(uint8_t type, String addr, int port, uint8_t mux, uint8_t id)
 {
     bool result = false;
-    if (a == 0 )
+    if (mux == 0 )
     {
-        confMux(a);
+        confMux(mux);
         
         long timeStart = millis();
         while (1)
@@ -118,9 +118,9 @@
         }
         result = newMux(type, addr, port);
     }
-    else if (a == 1)
+    else if (mux == 1)
     {
-        confMux(a);
+        confMux(mux);
         long timeStart = millis();
         while (1)
         {
@@ -311,18 +311,18 @@
 
 ***************************************************************************/
 
-bool ESP8266::confMode(uint8_t a)
+bool ESP8266::confMode(uint8_t mode)
 {
     String data;
      esp_uart.print("AT+CWMODE=");  
-     esp_uart.println(String(a));
+     esp_uart.println(String(mode));
      unsigned long start;
     start = millis();
     while (millis()-start<2000) {
       if(esp_uart.available()>0)
       {
-      char a =esp_uart.read_char();
-      data=data+a;
+      char mode =esp_uart.read_char();
+      data=data+mode;
       }
       if (data.indexOf("OK")!=-1 || data.indexOf("no change")!=-1)
       {
@@ -657,10 +657,10 @@
         true    -   successfully
         false   -   unsuccessfully
 ***************************************************************************/
-bool ESP8266::confMux(int a)
+bool ESP8266::confMux(int mux)
 {
     esp_uart.print("AT+CIPMUX=");
-    esp_uart.println(a);           
+    esp_uart.println(mux);           
     unsigned long start;
     start = millis();
     while (millis()-start<3000) {