linetrace saikyou

Dependencies:   RemoteIR TextLCD

Revision:
37:0cde453dce7d
Parent:
36:66d42cf30dac
Child:
38:39db3f7450c2
--- a/main.cpp	Tue Aug 18 00:59:31 2020 +0000
+++ b/main.cpp	Tue Aug 18 01:43:15 2020 +0000
@@ -691,7 +691,7 @@
  
     strcpy(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\; URL=\"RobotCar2.html\">");
+    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;}</style>");
     strcat(webbuff, "</head><body><center><p><strong>Robot Car Remote Controller");
     strcat(webbuff, "</strong></p><td style='vertical-align:top;'><strong>Battery level ");
@@ -1026,8 +1026,8 @@
         pc.printf("+++++++++++++++++succed rec end+++++++++++++++++++++\r\n");
         if( strstr(webdata, "GO") != NULL ) {
             pc.printf("+++++++++++++++++前進+++++++++++++++++++++\r\n");
-            delete avoi_thread;     //障害物回避スレッド停止
-            delete trace_thread;    //ライントレーススレッド停止
+            //delete avoi_thread;     //障害物回避スレッド停止
+            //delete trace_thread;    //ライントレーススレッド停止
             run = ADVANCE;          // 前進
             mode = ADVANCE;         // モード変更
             display();              // ディスプレイ表示
@@ -1035,8 +1035,8 @@
 
         if( strstr(webdata, "LEFT") != NULL ) {
             pc.printf("+++++++++++++++++左折+++++++++++++++++++++\r\n");
-            delete avoi_thread;     //障害物回避スレッド停止
-            delete trace_thread;    //ライントレーススレッド停止
+            //delete avoi_thread;     //障害物回避スレッド停止
+            //delete trace_thread;    //ライントレーススレッド停止
             run = LEFT;             // 左折
             mode = LEFT;            // モード変更
             display();              // ディスプレイ表示
@@ -1044,8 +1044,8 @@
  
         if( strstr(webdata, "STOP") != NULL ) {
             pc.printf("+++++++++++++++++停止+++++++++++++++++++++\r\n");
-            delete avoi_thread;     //障害物回避スレッド停止
-            delete trace_thread;    //ライントレーススレッド停止
+            //delete avoi_thread;     //障害物回避スレッド停止
+            //delete trace_thread;    //ライントレーススレッド停止
             run = STOP;             // 停止
             mode = STOP;            // モード変更
             display();              // ディスプレイ表示
@@ -1053,8 +1053,8 @@
  
         if( strstr(webdata, "RIGHT") != NULL ) {
             pc.printf("+++++++++++++++++右折+++++++++++++++++++++\r\n");
-            delete avoi_thread;     //障害物回避スレッド停止
-            delete trace_thread;    //ライントレーススレッド停止
+            //delete avoi_thread;     //障害物回避スレッド停止
+            //delete trace_thread;    //ライントレーススレッド停止
             run = RIGHT;            // 右折
             mode = RIGHT;           // モード変更
             display();              // ディスプレイ表示
@@ -1062,8 +1062,8 @@
  
         if( strstr(webdata, "BACK") != NULL ) {
             pc.printf("+++++++++++++++++後進+++++++++++++++++++++\r\n");
-            delete avoi_thread;     //障害物回避スレッド停止
-            delete trace_thread;    //ライントレーススレッド停止
+            //delete avoi_thread;     //障害物回避スレッド停止
+            //delete trace_thread;    //ライントレーススレッド停止
             run = BACK;             // 後進
             mode = BACK;            // モード変更
             display();              // ディスプレイ表示