mbed_robotcar / Mbed 2 deprecated WiFi_Finish

Dependencies:   mbed

Revision:
1:479303f0e488
Parent:
0:04482d11976f
Child:
2:4d51edb0a6c9
--- a/main.cpp	Mon Aug 03 08:34:03 2020 +0000
+++ b/main.cpp	Tue Aug 04 00:34:41 2020 +0000
@@ -30,7 +30,7 @@
 int mode = ADVANCE;
 int beforeMode = mode;
 
-int bufflen, DataRX, count, getcount, replycount, servreq, timeout;
+int bufflen, DataRX, ount, getcount, replycount, servreq, timeout;
 int bufl, ipdLen, linkID, weberror, webcounter,click_flag;
 float temperature, AdcIn, Ht;
 float R1=100000, R2=10000; // resistor values to give a 10:1 reduction of measured AnalogIn voltage
@@ -61,8 +61,8 @@
     //pc.printf("\n\r------------ callback is being called --------------\n\r");
     led3=1;
     while (esp.readable()) {
-        webbuff[count] = esp.getc();
-        count++;
+        webbuff[ount] = esp.getc();
+        ount++;
     }
     if(strlen(webbuff)>bufflen) {
         pc.printf("\f\n\r------------ webbuff over bufflen --------------\n\r");
@@ -412,7 +412,7 @@
     pc.printf("+++++++++++++++++Read Web Data+++++++++++++++++++++\r\n");
     wait_ms(200);
     esp.attach(NULL);
-    count=0;
+    ount=0;
     DataRX=0;
     weberror=0;
     memset(webdata, '\0', sizeof(webdata));
@@ -526,7 +526,7 @@
     SendCMD();
     getreply();
     pc.printf(replybuff);
-    pc.printf("%d",count);
+    pc.printf("%d",ount);
     if (strstr(replybuff, "OK") != NULL) {
         pc.printf("\n++++++++++ Starting Server ++++++++++\r\n");
         strcpy(cmdbuff, "AT+CIPMUX=1\r\n");  // set multiple connections.
@@ -569,7 +569,7 @@
         led2=1;
         bufflen=200;
         //bufflen=100;
-        count=0;
+        ount=0;
         pc.printf("\n\n++++++++++ Ready ++++++++++\r\n\n");
         esp.attach(&callback);
     } else {