ボタンを押すと、 バッテリ更新を停止し、 他のボタンもロックさせる

Dependencies:   RemoteIR TextLCD

Revision:
32:049d9ba081d4
Parent:
31:3665282561d6
Child:
33:a6f1090e0174
--- a/main.cpp	Thu Aug 06 03:13:05 2020 +0000
+++ b/main.cpp	Thu Aug 06 06:25:50 2020 +0000
@@ -912,7 +912,7 @@
     SendCMD();
     getreply();
     pc.printf(replybuff);
-    pc.printf("\n++++++++++ AT+CIPSENDBUF=%d,%d+++++++++\r\n", linkID, (bufl>2048?2048:bufl));
+    //pc.printf("\n++++++++++ AT+CIPSENDBUF=%d,%d+++++++++\r\n", linkID, (bufl>2048?2048:bufl));
  
     pc.printf("\n++++++++++ bufl is %d ++++++++++\r\n",bufl);
  
@@ -936,18 +936,19 @@
             //output at command when 2000
             if(((i%2047)==0) && (i>0)) {
                 //wait_ms(10);
+                ThisThread::sleep_for(10);
                 sprintf(cmdbuff,"AT+CIPSENDBUF=%d,%d\r\n", linkID, (bufl-2048)>2048?2048:(bufl-2048)); // send IPD link channel and buffer character length.
-                pc.printf("\r\n++++++++++ AT+CIPSENDBUF=%d,%d ++++++++++\r\n", linkID, (bufl-2048)>2048?2048:(bufl-2048));
+                //pc.printf("\r\n++++++++++ AT+CIPSENDBUF=%d,%d ++++++++++\r\n", linkID, (bufl-2048)>2048?2048:(bufl-2048));
                 timeout=600;
                 getcount=50;
                 SendCMD();
                 getreply();
-                pc.printf(replybuff);
-                pc.printf("\r\n+++++++++++++++++++\r\n");
+                //pc.printf(replybuff);
+                //pc.printf("\r\n+++++++++++++++++++\r\n");
             }
             //****
             i++;
-            pc.printf("%c",webbuff[i]);
+            //pc.printf("%c",webbuff[i]);
         }
     }
     pc.printf("\n++++++++++ send web i= %dinfo ++++++++++\r\n",i);
@@ -1015,35 +1016,35 @@
         if( strstr(webdata, "GO") != NULL ) {
             pc.printf("+++++++++++++++++前進+++++++++++++++++++++\r\n");
             run = ADVANCE;           // 前進
-            mode = READY;            // モードs変更
+            mode = ADVANCE;            // モード変更
             display();          // ディスプレイ表示
         }
 
         if( strstr(webdata, "LEFT") != NULL ) {
             pc.printf("+++++++++++++++++左折+++++++++++++++++++++\r\n");
             run = LEFT;
-            mode = READY;
+            mode = LEFT;
             display();          // ディスプレイ表示
         }
  
         if( strstr(webdata, "STOP") != NULL ) {
             pc.printf("+++++++++++++++++停止+++++++++++++++++++++\r\n");
             run = STOP;
-            mode = READY;
+            mode = STOP;
             display();          // ディスプレイ表示
         }
  
         if( strstr(webdata, "RIGHT") != NULL ) {
             pc.printf("+++++++++++++++++右折+++++++++++++++++++++\r\n");
             run = RIGHT;
-            mode = READY;
+            mode = RIGHT;
             display();          // ディスプレイ表示
         }
  
         if( strstr(webdata, "BACK") != NULL ) {
             pc.printf("+++++++++++++++++後進+++++++++++++++++++++\r\n");
             run = BACK;
-            mode = READY;
+            mode = BACK;
             display();          // ディスプレイ表示
         }
         pc.printf("+++++++++++++++++succed+++++++++++++++++++++");