mbed_robotcar / Mbed OS saikyo-0903

Dependencies:   RemoteIR TextLCD

Files at this revision

API Documentation at this revision

Comitter:
nishimura_taku_pet
Date:
Thu Sep 03 08:26:54 2020 +0000
Parent:
57:65dd71a6ce72
Child:
59:9e35200f52ea
Commit message:
iphone use

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Thu Sep 03 06:03:01 2020 +0000
+++ b/main.cpp	Thu Sep 03 08:26:54 2020 +0000
@@ -848,7 +848,7 @@
 // Serial Interrupt read ESP data
 void callback()
 {
-    ////*-*-*-5("\n\r------------ callback is being called --------------\n\r");
+    //pc.printf("\n\r------------ callback is being called --------------\n\r");
     led3=1;
     while (esp.readable()) {
         webbuff[ount] = esp.getc();
@@ -857,7 +857,7 @@
     if(strlen(webbuff)>bufflen) {
 //        //*-*-*-5("\f\n\r------------ webbuff over bufflen --------------\n\r");
         DataRX=1;
-        led3=0;
+        led4=1;
     }
 }
  
@@ -903,7 +903,8 @@
 {
 // WEB page data
  
-    strcpy(webbuff, "<!DOCTYPE html>");
+    strcpy(webbuff, "HTTP/1.1 200 OK\nDate: Thu, 03 Sep 2020 07:43:28 GMT\nContent-Type: text/html\nContent-Length: 2843\nConnection: keep-alive\n\n");
+    strcat(webbuff, "<!DOCTYPE html>");
     strcat(webbuff, "<html><head><title>RobotCar</title><meta name='viewport' content='width=device-width'/>");
     //strcat(webbuff, "<meta http-equiv=\"refresh\" content=\"5\"; >");
     strcat(webbuff, "<style type=\"text/css\">.noselect{ width:100px;height:60px;}.light{ width:100px;height:60px;background-color:#00ff66;}.load{ width: 50px; height: 30px;font-size:10px}</style>");
@@ -1189,6 +1190,8 @@
             i++;
             ////*-*-*-5("%c",webbuff[i]);
         }
+        led1 = !led1;
+        pc.printf("%d",bufl);
     }
     //*-*-*-5("\n++++++++++ send web i= %dinfo ++++++++++\r\n",i);
 }