表示された文字の修正
Dependencies: RemoteIR TextLCD
Revision 68:d60e97c82c03, committed 2020-09-09
- Comitter:
- faker_71
- Date:
- Wed Sep 09 07:21:00 2020 +0000
- Parent:
- 67:0333997269dc
- Commit message:
- 0909
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 0333997269dc -r d60e97c82c03 main.cpp --- a/main.cpp Wed Sep 09 00:21:38 2020 +0000 +++ b/main.cpp Wed Sep 09 07:21:00 2020 +0000 @@ -978,11 +978,11 @@ //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"); strcpy(webbuff, "<!DOCTYPE html>"); - strcat(webbuff, "<html><head><title>RobotCar</title><meta name='viewport' content='width=device-width'/>"); + strcat(webbuff, "<html><head><title>RobotCarControl</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;border-radius: 25px;outline:0;}.light{ width:100px;height:60px;background-color:#00ff66;border-radius: 25px;outline:0;}.load{ width: 50px; height: 30px;font-size:10px}</style>"); - strcat(webbuff, "</head><body><center><p><strong>Robot Car Remote Controller"); - strcat(webbuff, "</strong></p><td style='vertical-align:top;'><strong>Battery level "); + strcat(webbuff, "</head><body><center><p><strong>RobotCarControl"); + strcat(webbuff, "</strong></p><td style='vertical-align:top;'><strong>Battery"); if(b<=30){ //30%より下の場合残電量を赤文字 strcat(webbuff, "<font color=\"red\">"); sprintf(webbuff, "%s%3d", webbuff, b); @@ -991,139 +991,139 @@ sprintf(webbuff, "%s%3d", webbuff, b); } strcat(webbuff, "%</strong>"); - strcat(webbuff, "<button id=\"reloadbtn\" type=\"button\" class=\"load\" onmousedown=\"location.reload()\">RELOAD</button>"); + strcat(webbuff, "<button id=\"reloadbtn\" type=\"button\" class=\"load\" onmousedown=\"location.reload()\">Reload</button>"); strcat(webbuff, "</td></p>"); strcat(webbuff, "<br>"); strcat(webbuff, "<table><tr><td></td><td>"); switch(mode) { //ブラウザ更新時の現在の車の状態からボタンの点灯判定 case ADVANCE: //前進 - strcat(webbuff, "<button id='gobtn' type='button' class=\"light\" value=\"GO\" onmousedown='send_mes(this.value)'>GO"); + strcat(webbuff, "<button id='gobtn' type='button' class=\"light\" value=\"GO\" onmousedown='send_mes(this.value)'>Go"); strcat(webbuff, "</button></td><td></td></tr><tr><td>"); - strcat(webbuff, "<button id='leftbtn' type='button' class=\"noselect\" value=\"LEFT\" onmousedown='send_mes(this.value)' >LEFT"); + strcat(webbuff, "<button id='leftbtn' type='button' class=\"noselect\" value=\"LEFT\" onmousedown='send_mes(this.value)' >Left"); strcat(webbuff, "</button></td><td>"); - strcat(webbuff, "<button id='stopbtn' type='button' class=\"noselect\" value=\"STOP\" onmousedown='send_mes(this.value)' >STOP"); + strcat(webbuff, "<button id='stopbtn' type='button' class=\"noselect\" value=\"STOP\" onmousedown='send_mes(this.value)' >Stop"); strcat(webbuff, "</button></td><td>"); - strcat(webbuff, "<button id='rightbtn' type='button' class=\"noselect\" value=\"RIGHT\" onmousedown='send_mes(this.value)' >RIGHT"); + strcat(webbuff, "<button id='rightbtn' type='button' class=\"noselect\" value=\"RIGHT\" onmousedown='send_mes(this.value)' >Right"); strcat(webbuff, "</button></td></tr><td></td><td>"); - strcat(webbuff, "<button id='backbtn' type='button' class=\"noselect\" value=\"BACK\" onmousedown='send_mes(this.value)' >BACK"); + strcat(webbuff, "<button id='backbtn' type='button' class=\"noselect\" value=\"BACK\" onmousedown='send_mes(this.value)' >Back"); strcat(webbuff, "</button></td><td style='vertical-align:top; text-align:right;'></td></tr></table>"); strcat(webbuff, "<strong>Mode</strong>"); strcat(webbuff, "<table><tr><td><button id='avoidbtn' type='button' class=\"noselect\" value=\"AVOIDANCE\" onmousedown='send_mes(this.value)' >"); - strcat(webbuff, "AVOIDANCE</button></td><td>"); - strcat(webbuff, "<button id='tracebtn' type='button' class=\"noselect\" value=\"LINE_TRACE\" onmousedown='send_mes(this.value)' >LINE_TRACE"); + strcat(webbuff, "Avoidance</button></td><td>"); + strcat(webbuff, "<button id='tracebtn' type='button' class=\"noselect\" value=\"LINE_TRACE\" onmousedown='send_mes(this.value)' >LineTrace"); break; case LEFT: //左折 - strcat(webbuff, "<button id='gobtn' type='button' class=\"noselect\" value=\"GO\" onmousedown='send_mes(this.value)'>GO"); + strcat(webbuff, "<button id='gobtn' type='button' class=\"noselect\" value=\"GO\" onmousedown='send_mes(this.value)'>Go"); strcat(webbuff, "</button></td><td></td></tr><tr><td>"); - strcat(webbuff, "<button id='leftbtn' type='button' class=\"light\" value=\"LEFT\" onmousedown='send_mes(this.value)' >LEFT"); + strcat(webbuff, "<button id='leftbtn' type='button' class=\"light\" value=\"LEFT\" onmousedown='send_mes(this.value)' >Left"); strcat(webbuff, "</button></td><td>"); - strcat(webbuff, "<button id='stopbtn' type='button' class=\"noselect\" value=\"STOP\" onmousedown='send_mes(this.value)' >STOP"); + strcat(webbuff, "<button id='stopbtn' type='button' class=\"noselect\" value=\"STOP\" onmousedown='send_mes(this.value)' >Stop"); strcat(webbuff, "</button></td><td>"); - strcat(webbuff, "<button id='rightbtn' type='button' class=\"noselect\" value=\"RIGHT\" onmousedown='send_mes(this.value)' >RIGHT"); + strcat(webbuff, "<button id='rightbtn' type='button' class=\"noselect\" value=\"RIGHT\" onmousedown='send_mes(this.value)' >Right"); strcat(webbuff, "</button></td></tr><td></td><td>"); - strcat(webbuff, "<button id='backbtn' type='button' class=\"noselect\" value=\"BACK\" onmousedown='send_mes(this.value)' >BACK"); + strcat(webbuff, "<button id='backbtn' type='button' class=\"noselect\" value=\"BACK\" onmousedown='send_mes(this.value)' >Back"); strcat(webbuff, "</button></td><td style='vertical-align:top; text-align:right;'></td></tr></table>"); strcat(webbuff, "<strong>Mode</strong>"); strcat(webbuff, "<table><tr><td><button id='avoidbtn' type='button' class=\"noselect\" value=\"AVOIDANCE\" onmousedown='send_mes(this.value)' >"); - strcat(webbuff, "AVOIDANCE</button></td><td>"); - strcat(webbuff, "<button id='tracebtn' type='button' class=\"noselect\" value=\"LINE_TRACE\" onmousedown='send_mes(this.value)' >LINE_TRACE"); + strcat(webbuff, "Avoidance</button></td><td>"); + strcat(webbuff, "<button id='tracebtn' type='button' class=\"noselect\" value=\"LINE_TRACE\" onmousedown='send_mes(this.value)' >LineTrace"); break; case STOP: //停止 - strcat(webbuff, "<button id='gobtn' type='button' class=\"noselect\" value=\"GO\" onmousedown='send_mes(this.value)'>GO"); + strcat(webbuff, "<button id='gobtn' type='button' class=\"noselect\" value=\"GO\" onmousedown='send_mes(this.value)'>Go"); strcat(webbuff, "</button></td><td></td></tr><tr><td>"); - strcat(webbuff, "<button id='leftbtn' type='button' class=\"noselect\" value=\"LEFT\" onmousedown='send_mes(this.value)' >LEFT"); + strcat(webbuff, "<button id='leftbtn' type='button' class=\"noselect\" value=\"LEFT\" onmousedown='send_mes(this.value)' >Left"); strcat(webbuff, "</button></td><td>"); - strcat(webbuff, "<button id='stopbtn' type='button' class=\"light\" value=\"STOP\" onmousedown='send_mes(this.value)' >STOP"); + strcat(webbuff, "<button id='stopbtn' type='button' class=\"light\" value=\"STOP\" onmousedown='send_mes(this.value)' >Stop"); strcat(webbuff, "</button></td><td>"); - strcat(webbuff, "<button id='rightbtn' type='button' class=\"noselect\" value=\"RIGHT\" onmousedown='send_mes(this.value)' >RIGHT"); + strcat(webbuff, "<button id='rightbtn' type='button' class=\"noselect\" value=\"RIGHT\" onmousedown='send_mes(this.value)' >Right"); strcat(webbuff, "</button></td></tr><td></td><td>"); - strcat(webbuff, "<button id='backbtn' type='button' class=\"noselect\" value=\"BACK\" onmousedown='send_mes(this.value)' >BACK"); + strcat(webbuff, "<button id='backbtn' type='button' class=\"noselect\" value=\"BACK\" onmousedown='send_mes(this.value)' >Back"); strcat(webbuff, "</button></td><td style='vertical-align:top; text-align:right;'></td></tr></table>"); strcat(webbuff, "<strong>Mode</strong>"); strcat(webbuff, "<table><tr><td><button id='avoidbtn' type='button' class=\"noselect\" value=\"AVOIDANCE\" onmousedown='send_mes(this.value)' >"); - strcat(webbuff, "AVOIDANCE</button></td><td>"); - strcat(webbuff, "<button id='tracebtn' type='button' class=\"noselect\" value=\"LINE_TRACE\" onmousedown='send_mes(this.value)' >LINE_TRACE"); + strcat(webbuff, "Avoidance</button></td><td>"); + strcat(webbuff, "<button id='tracebtn' type='button' class=\"noselect\" value=\"LINE_TRACE\" onmousedown='send_mes(this.value)' >LineTrace"); break; case RIGHT: //右折 - strcat(webbuff, "<button id='gobtn' type='button' class=\"noselect\" value=\"GO\" onmousedown='send_mes(this.value)'>GO"); + strcat(webbuff, "<button id='gobtn' type='button' class=\"noselect\" value=\"GO\" onmousedown='send_mes(this.value)'>Go"); strcat(webbuff, "</button></td><td></td></tr><tr><td>"); - strcat(webbuff, "<button id='leftbtn' type='button' class=\"noselect\" value=\"LEFT\" onmousedown='send_mes(this.value)' >LEFT"); + strcat(webbuff, "<button id='leftbtn' type='button' class=\"noselect\" value=\"LEFT\" onmousedown='send_mes(this.value)' >Left"); strcat(webbuff, "</button></td><td>"); - strcat(webbuff, "<button id='stopbtn' type='button' class=\"noselect\" value=\"STOP\" onmousedown='send_mes(this.value)' >STOP"); + strcat(webbuff, "<button id='stopbtn' type='button' class=\"noselect\" value=\"STOP\" onmousedown='send_mes(this.value)' >Stop"); strcat(webbuff, "</button></td><td>"); - strcat(webbuff, "<button id='rightbtn' type='button' class=\"light\" value=\"RIGHT\" onmousedown='send_mes(this.value)' >RIGHT"); + strcat(webbuff, "<button id='rightbtn' type='button' class=\"light\" value=\"RIGHT\" onmousedown='send_mes(this.value)' >Right"); strcat(webbuff, "</button></td></tr><td></td><td>"); - strcat(webbuff, "<button id='backbtn' type='button' class=\"noselect\" value=\"BACK\" onmousedown='send_mes(this.value)' >BACK"); + strcat(webbuff, "<button id='backbtn' type='button' class=\"noselect\" value=\"BACK\" onmousedown='send_mes(this.value)' >Back"); strcat(webbuff, "</button></td><td style='vertical-align:top; text-align:right;'></td></tr></table>"); strcat(webbuff, "<strong>Mode</strong>"); strcat(webbuff, "<table><tr><td><button id='avoidbtn' type='button' class=\"noselect\" value=\"AVOIDANCE\" onmousedown='send_mes(this.value)' >"); - strcat(webbuff, "AVOIDANCE</button></td><td>"); - strcat(webbuff, "<button id='tracebtn' type='button' class=\"noselect\" value=\"LINE_TRACE\" onmousedown='send_mes(this.value)' >LINE_TRACE"); + strcat(webbuff, "Avoidance</button></td><td>"); + strcat(webbuff, "<button id='tracebtn' type='button' class=\"noselect\" value=\"LINE_TRACE\" onmousedown='send_mes(this.value)' >LineTrace"); break; case BACK: //後進 - strcat(webbuff, "<button id='gobtn' type='button' class=\"noselect\" value=\"GO\" onmousedown='send_mes(this.value)'>GO"); + strcat(webbuff, "<button id='gobtn' type='button' class=\"noselect\" value=\"GO\" onmousedown='send_mes(this.value)'>Go"); strcat(webbuff, "</button></td><td></td></tr><tr><td>"); - strcat(webbuff, "<button id='leftbtn' type='button' class=\"noselect\" value=\"LEFT\" onmousedown='send_mes(this.value)' >LEFT"); + strcat(webbuff, "<button id='leftbtn' type='button' class=\"noselect\" value=\"LEFT\" onmousedown='send_mes(this.value)' >Left"); strcat(webbuff, "</button></td><td>"); - strcat(webbuff, "<button id='stopbtn' type='button' class=\"noselect\" value=\"STOP\" onmousedown='send_mes(this.value)' >STOP"); + strcat(webbuff, "<button id='stopbtn' type='button' class=\"noselect\" value=\"STOP\" onmousedown='send_mes(this.value)' >Stop"); strcat(webbuff, "</button></td><td>"); - strcat(webbuff, "<button id='rightbtn' type='button' class=\"noselect\" value=\"RIGHT\" onmousedown='send_mes(this.value)' >RIGHT"); + strcat(webbuff, "<button id='rightbtn' type='button' class=\"noselect\" value=\"RIGHT\" onmousedown='send_mes(this.value)' >Right"); strcat(webbuff, "</button></td></tr><td></td><td>"); - strcat(webbuff, "<button id='backbtn' type='button' class=\"light\" value=\"BACK\" onmousedown='send_mes(this.value)' >BACK"); + strcat(webbuff, "<button id='backbtn' type='button' class=\"light\" value=\"BACK\" onmousedown='send_mes(this.value)' >Back"); strcat(webbuff, "</button></td><td style='vertical-align:top; text-align:right;'></td></tr></table>"); strcat(webbuff, "<strong>Mode</strong>"); strcat(webbuff, "<table><tr><td><button id='avoidbtn' type='button' class=\"noselect\" value=\"AVOIDANCE\" onmousedown='send_mes(this.value)' >"); - strcat(webbuff, "AVOIDANCE</button></td><td>"); - strcat(webbuff, "<button id='tracebtn' type='button' class=\"noselect\" value=\"LINE_TRACE\" onmousedown='send_mes(this.value)' >LINE_TRACE"); + strcat(webbuff, "Avoidance</button></td><td>"); + strcat(webbuff, "<button id='tracebtn' type='button' class=\"noselect\" value=\"LINE_TRACE\" onmousedown='send_mes(this.value)' >LineTrace"); break; case AVOIDANCE: //障害物回避 - strcat(webbuff, "<button id='gobtn' type='button' class=\"noselect\" value=\"GO\" onmousedown='send_mes(this.value)'>GO"); + strcat(webbuff, "<button id='gobtn' type='button' class=\"noselect\" value=\"GO\" onmousedown='send_mes(this.value)'>Go"); strcat(webbuff, "</button></td><td></td></tr><tr><td>"); - strcat(webbuff, "<button id='leftbtn' type='button' class=\"noselect\" value=\"LEFT\" onmousedown='send_mes(this.value)' >LEFT"); + strcat(webbuff, "<button id='leftbtn' type='button' class=\"noselect\" value=\"LEFT\" onmousedown='send_mes(this.value)' >Left"); strcat(webbuff, "</button></td><td>"); - strcat(webbuff, "<button id='stopbtn' type='button' class=\"noselect\" value=\"STOP\" onmousedown='send_mes(this.value)' >STOP"); + strcat(webbuff, "<button id='stopbtn' type='button' class=\"noselect\" value=\"STOP\" onmousedown='send_mes(this.value)' >Stop"); strcat(webbuff, "</button></td><td>"); - strcat(webbuff, "<button id='rightbtn' type='button' class=\"noselect\" value=\"RIGHT\" onmousedown='send_mes(this.value)' >RIGHT"); + strcat(webbuff, "<button id='rightbtn' type='button' class=\"noselect\" value=\"RIGHT\" onmousedown='send_mes(this.value)' >Right"); strcat(webbuff, "</button></td></tr><td></td><td>"); - strcat(webbuff, "<button id='backbtn' type='button' class=\"noselect\" value=\"BACK\" onmousedown='send_mes(this.value)' >BACK"); + strcat(webbuff, "<button id='backbtn' type='button' class=\"noselect\" value=\"BACK\" onmousedown='send_mes(this.value)' >Back"); strcat(webbuff, "</button></td><td style='vertical-align:top; text-align:right;'></td></tr></table>"); strcat(webbuff, "<strong>Mode</strong>"); strcat(webbuff, "<table><tr><td><button id='avoidbtn' type='button' class=\"light\" value=\"AVOIDANCE\" onmousedown='send_mes(this.value)' >"); - strcat(webbuff, "AVOIDANCE</button></td><td>"); - strcat(webbuff, "<button id='tracebtn' type='button' class=\"noselect\" value=\"LINE_TRACE\" onmousedown='send_mes(this.value)' >LINE_TRACE"); + strcat(webbuff, "Avoidance</button></td><td>"); + strcat(webbuff, "<button id='tracebtn' type='button' class=\"noselect\" value=\"LINE_TRACE\" onmousedown='send_mes(this.value)' >LineTrace"); break; case LINE_TRACE: //ライントレース - strcat(webbuff, "<button id='gobtn' type='button' class=\"noselect\" value=\"GO\" onmousedown='send_mes(this.value)'>GO"); + strcat(webbuff, "<button id='gobtn' type='button' class=\"noselect\" value=\"GO\" onmousedown='send_mes(this.value)'>Go"); strcat(webbuff, "</button></td><td></td></tr><tr><td>"); - strcat(webbuff, "<button id='leftbtn' type='button' class=\"noselect\" value=\"LEFT\" onmousedown='send_mes(this.value)' >LEFT"); + strcat(webbuff, "<button id='leftbtn' type='button' class=\"noselect\" value=\"LEFT\" onmousedown='send_mes(this.value)' >Left"); strcat(webbuff, "</button></td><td>"); - strcat(webbuff, "<button id='stopbtn' type='button' class=\"noselect\" value=\"STOP\" onmousedown='send_mes(this.value)' >STOP"); + strcat(webbuff, "<button id='stopbtn' type='button' class=\"noselect\" value=\"STOP\" onmousedown='send_mes(this.value)' >Stop"); strcat(webbuff, "</button></td><td>"); - strcat(webbuff, "<button id='rightbtn' type='button' class=\"noselect\" value=\"RIGHT\" onmousedown='send_mes(this.value)' >RIGHT"); + strcat(webbuff, "<button id='rightbtn' type='button' class=\"noselect\" value=\"RIGHT\" onmousedown='send_mes(this.value)' >Right"); strcat(webbuff, "</button></td></tr><td></td><td>"); - strcat(webbuff, "<button id='backbtn' type='button' class=\"noselect\" value=\"BACK\" onmousedown='send_mes(this.value)' >BACK"); + strcat(webbuff, "<button id='backbtn' type='button' class=\"noselect\" value=\"BACK\" onmousedown='send_mes(this.value)' >Back"); strcat(webbuff, "</button></td><td style='vertical-align:top; text-align:right;'></td></tr></table>"); strcat(webbuff, "<strong>Mode</strong>"); strcat(webbuff, "<table><tr><td><button id='avoidbtn' type='button' class=\"noselect\" value=\"AVOIDANCE\" onmousedown='send_mes(this.value)' >"); - strcat(webbuff, "AVOIDANCE</button></td><td>"); - strcat(webbuff, "<button id='tracebtn' type='button' class=\"light\" value=\"LINE_TRACE\" onmousedown='send_mes(this.value)' >LINE_TRACE"); + strcat(webbuff, "Avoidance</button></td><td>"); + strcat(webbuff, "<button id='tracebtn' type='button' class=\"light\" value=\"LINE_TRACE\" onmousedown='send_mes(this.value)' >LineTrace"); break; default: //その他 - strcat(webbuff, "<button id='gobtn' type='button' class=\"noselect\" value=\"GO\" onmousedown='send_mes(this.value)'>GO"); + strcat(webbuff, "<button id='gobtn' type='button' class=\"noselect\" value=\"GO\" onmousedown='send_mes(this.value)'>Go"); strcat(webbuff, "</button></td><td></td></tr><tr><td>"); - strcat(webbuff, "<button id='leftbtn' type='button' class=\"noselect\" value=\"LEFT\" onmousedown='send_mes(this.value)' >LEFT"); + strcat(webbuff, "<button id='leftbtn' type='button' class=\"noselect\" value=\"LEFT\" onmousedown='send_mes(this.value)' >Left"); strcat(webbuff, "</button></td><td>"); - strcat(webbuff, "<button id='stopbtn' type='button' class=\"noselect\" value=\"STOP\" onmousedown='send_mes(this.value)' >STOP"); + strcat(webbuff, "<button id='stopbtn' type='button' class=\"noselect\" value=\"STOP\" onmousedown='send_mes(this.value)' >Stop"); strcat(webbuff, "</button></td><td>"); - strcat(webbuff, "<button id='rightbtn' type='button' class=\"noselect\" value=\"RIGHT\" onmousedown='send_mes(this.value)' >RIGHT"); + strcat(webbuff, "<button id='rightbtn' type='button' class=\"noselect\" value=\"RIGHT\" onmousedown='send_mes(this.value)' >Right"); strcat(webbuff, "</button></td></tr><td></td><td>"); - strcat(webbuff, "<button id='backbtn' type='button' class=\"noselect\" value=\"BACK\" onmousedown='send_mes(this.value)' >BACK"); + strcat(webbuff, "<button id='backbtn' type='button' class=\"noselect\" value=\"BACK\" onmousedown='send_mes(this.value)' >Back"); strcat(webbuff, "</button></td><td style='vertical-align:top; text-align:right;'></td></tr></table>"); strcat(webbuff, "<strong>Mode</strong>"); strcat(webbuff, "<table><tr><td><button id='avoidbtn' type='button' class=\"noselect\" value=\"AVOIDANCE\" onmousedown='send_mes(this.value)' >"); - strcat(webbuff, "AVOIDANCE</button></td><td>"); - strcat(webbuff, "<button id='tracebtn' type='button' class=\"noselect\" value=\"LINE_TRACE\" onmousedown='send_mes(this.value)' >LINE_TRACE"); + strcat(webbuff, "Avoidance</button></td><td>"); + strcat(webbuff, "<button id='tracebtn' type='button' class=\"noselect\" value=\"LINE_TRACE\" onmousedown='send_mes(this.value)' >LineTrace"); break; } strcat(webbuff, "</button></td></tr></table>");