Lab2_web / Mbed 2 deprecated webserverBlinky

Dependencies:   mbed

Fork of webserverBlinky by RealTimeCompLab2

Revision:
3:bcc66de0bdcd
Parent:
2:b6ccdc962742
Child:
4:a469050d5b80
diff -r b6ccdc962742 -r bcc66de0bdcd main.cpp
--- a/main.cpp	Tue Dec 27 17:46:27 2016 +0000
+++ b/main.cpp	Tue Dec 27 18:38:49 2016 +0000
@@ -44,7 +44,6 @@
 {
     pc.baud(115200);
     pc.attach(&rxHandler,Serial::RxIrq); // activate the receive interrupt handler
-    int waitingForPpp = 1; // client string not found yet
     int flagCount=0;
     while(1) {
         while ( pc_readable() ) {
@@ -53,8 +52,7 @@
             char * clientFound = strstr( rxbuf, "CLIENTCLIENT" ); // look for string
             if( clientFound ) {
                 strcpy( clientFound, "FOUND!FOUND!" ); // overwrite found string
-                if (waitingForPpp) pc.printf("CLIENTSERVER"); // respond to PC
-                waitingForPpp = waitingForPpp ? 0 : 1; // TOGGLE waiting flag
+                pc.printf("CLIENTSERVER"); // respond to PC
             }
             if ( flagCount>0 ) myled = ((flagCount/2)%2); // toggle on PPP frame found
         }