2
Dependencies: RemoteIR TextLCD
Diff: main.cpp
- Revision:
- 68:d9ce7c09b127
- Parent:
- 67:0333997269dc
- Child:
- 69:7f305b4e706e
--- a/main.cpp Wed Sep 09 00:21:38 2020 +0000 +++ b/main.cpp Wed Sep 09 07:57:59 2020 +0000 @@ -4,9 +4,9 @@ */ /* - Version 0.10 - Date 2020/09/08 - Uploader Taku Nishimura + Version 0.11 + Date 2020/09/09 + Uploader Tomotsugu Ogawa 更新するときにここも変える! @@ -62,7 +62,7 @@ #define MBED02 0.719 //Mbed02号機の左右のモーター速度比(R:L = 1: 0.719) #define MBED03 1 #define MBED04 0.781 //Mbed04号機の左右のモーター速度比(R:L = 1: 0.781) -#define MBED05 0.95 //Mbed05号機の左右のモーター速度比(R:L = 1: 0.953) +#define MBED05 0.947 //Mbed05号機の左右のモーター速度比(R:L = 1: 0.953) #define MBED06 1 #define MBED07 1 //Mbed07号機の左右のモーター速度比(R:L = 1: 1.000) #define MBED08 1 @@ -192,7 +192,8 @@ int SLD; // 左前 int SRD; // 右前 int flag_a = 0; // 障害物有無のフラグ -const int limit = 20; // 障害物の距離のリミット(単位:cm) +int limit = 25; // 障害物の距離のリミット(単位:cm) +int backlimit = 20; int far; // 最も遠い距離 int houkou; // 進行方向(1:前 2:左 3:右) int t1 = 0; @@ -271,14 +272,12 @@ } switch(code){ case 0x40bf27d8: // クイック - //pc.printf("mode = SPEED\r\n"); mode = SPEED; // スピードモード changeSpeed(); // 速度変更 display(); // ディスプレイ表示 mode = beforeMode; // 現在のモードに前回のモードを設定 break; case 0x40be34cb: // レグザリンク - //pc.printf("mode = LINE_TRACE\r\n"); if(trace_thread->get_state() == Thread::Deleted){ delete trace_thread; trace_thread = new Thread(trace); @@ -288,7 +287,6 @@ display(); // ディスプレイ表示 break; case 0x40bf6e91: // 番組表 - //pc.printf("mode = AVOIDANCE\r\n"); if(avoi_thread->get_state() == Thread::Deleted){ delete avoi_thread; avoi_thread = new Thread(avoidance); @@ -300,31 +298,26 @@ display(); // ディスプレイ表示 break; case 0x40bf3ec1: // ↑ - //pc.printf("mode = ADVANCE\r\n"); mode = ADVANCE; // 前進モード run = ADVANCE; // 前進 display(); // ディスプレイ表示 break; case 0x40bf3fc0: // ↓ - //pc.printf("mode = BACK\r\n"); mode = BACK; // 後退モード run = BACK; // 後退 display(); // ディスプレイ表示 break; case 0x40bf5fa0: // ← - //pc.printf("mode = LEFT\r\n"); mode = LEFT; // 左折モード run = LEFT; // 左折 display(); // ディスプレイ表示 break; case 0x40bf5ba4: // → - //pc.printf("mode = RIGHT\r\n"); mode = RIGHT; // 右折モード run = RIGHT; // 右折 display(); // ディスプレイ表示 break; case 0x40bf3dc2: // 決定 - //pc.printf("mode = STOP\r\n"); mode = STOP; // 停止モード run = STOP; // 停止 display(); // ディスプレイ表示 @@ -357,6 +350,20 @@ if(mode != LINE_TRACE){ // スピード変更フラグが2より大きいなら flag_sp %= 3; // スピード変更フラグ調整 } + switch(flag_sp){ + case 1: + limit = 25; + backlimit = 20; + break; + case 2: + limit = 28; + backlimit = 18; + break; + case 3: + limit = 32; + backlimit = 15; + break; + } switch(run){ /* 前進 */ case ADVANCE: @@ -514,22 +521,12 @@ /* 障害物回避走行スレッド */ void avoidance(){ - int i; while(1){ watchsurrounding3(); - if(flag_a == 0){ // 障害物がない場合 - run = ADVANCE; // 前進 -// if(SLD < 25){ // 正面15cm以内に障害物が現れた場合 -// run = RIGHT; // 右折 -// ThisThread::sleep_for(100); // 100ms待つ -// run = STOP; // 停止 -// }else if(SRD < 25){ -// run = LEFT; // 左折 -// ThisThread::sleep_for(100); // 100ms待つ -// run = STOP; // 停止 -// } - }else{ // 障害物がある場合 - i = 0; + if(flag_a == 0){ // 障害物がない場合 + run = ADVANCE; // 前進 + }else{ // 障害物がある場合 + int i = 0; int cnt_kyori; int kyori; if(SC < 15){ @@ -538,22 +535,9 @@ run = STOP; ThisThread::sleep_for(80); run = BACK; -// switch(flag_sp){ -// case 0: -// ThisThread::sleep_for(200); -// break; -// case 1: -// ThisThread::sleep_for(150); -// break; -// case 2: -// ThisThread::sleep_for(120); -// break; -// default: -// break; -// } cnt_kyori = 0; kyori = watch(); - while(kyori < limit){ // 正面20cm以内に障害物がある間 + while(kyori < backlimit){ // 正面20cm以内に障害物がある間 if(kyori == -1){ cnt_kyori++; if(cnt_kyori > 15){ @@ -566,20 +550,32 @@ run = STOP; } watchsurrounding5(); - if(SC < limit && SLD < limit && SL < limit && SRD < limit && SR < limit){ // 全方向に障害物がある場合 - run = A1LEFT; // 左折 - while(i < 15){ // 進行方向確認 - if(watch() > limit){ - break; - }else{ - i++; + if(SC < 25 && SLD < 37 && SL < 30 && SRD < 37 && SR < 30){ // 全方向に障害物がある場合 + run = A1LEFT; // 左折 + cnt_kyori = 0; + kyori = watch(); + while(kyori < 53){ + if(kyori == -1){ + cnt_kyori++; + if(cnt_kyori > 25){ + cnt_kyori = 0; + break; + } } - } + kyori = watch(); + } + // while(i < 15){ // 進行方向確認 +// if(watch() > limit){ +// break; +// }else{ +// i++; +// } +// } run = STOP; // 停止 }else { // 全方向以外 far = SC; // 正面を最も遠い距離に設定 houkou = 1; // 進行方向を前に設定 - if(SC < limit + 5){ + if(SC < 25){ if(far < SLD || far < SL){ // 左または左前がより遠い場合 if(SL < SLD){ // 左前が左より遠い場合 far = SLD; // 左前を最も遠い距離に設定 @@ -602,7 +598,7 @@ run = ADVANCE; // 前進 switch(flag_sp){ case 0: - ThisThread::sleep_for(300); // 0.5秒待つ + ThisThread::sleep_for(300); break; case 1: ThisThread::sleep_for(200); @@ -616,29 +612,29 @@ run = A1LEFT; // 左折 while(i < 15){ // 進行方向確認 if(watch() > (far - 2)){ // 正面の計測距離と最も遠い距離が一致したら(誤差-2cm) - break; // ループ+ + break; }else{ i++; } } - run = ADVANCE; // 停止 + run = ADVANCE; break; case 3: // 右の場合 run = A1RIGHT; // 右折 while(i < 15){ // 進行方向確認 if(watch() > (far - 2)){ // 正面の計測距離と最も遠い距離が一致したら(誤差-2cm) - break; // ループ+ + break; }else{ i++; } } - run = ADVANCE; // 停止 + run = ADVANCE; break; } } } flag_a = 0; // 障害物有無フラグを0にセット - if(SLD < 30 && SRD > 30){ // 正面15cm以内に障害物が現れた場合 + if(SLD < 30 && SRD > 30){ run = A2RIGHT; // 右折 ThisThread::sleep_for(100); run = ADVANCE; @@ -697,7 +693,7 @@ } } servo.pulsewidth_us(1930); // サーボを左に40度回転 - ThisThread::sleep_for(100); // 250ms待つ + ThisThread::sleep_for(100); SLD = watch(); if(SLD < 18){ // 左前20cm以内に障害物がある場合 run = STOP; @@ -711,7 +707,7 @@ ThisThread::sleep_for(170); break; case 2: - ThisThread::sleep_for(150); + ThisThread::sleep_for(140); break; } run = A2RIGHT; @@ -729,10 +725,10 @@ } } servo.pulsewidth_us(920); // サーボを右に40度回転 - ThisThread::sleep_for(100); // 250ms待つ + ThisThread::sleep_for(100); SRD = watch(); if(SRD < 18){ // 右前20cm以内に障害物がある場合 - run = STOP; // 停止 + run = STOP; // 停止 ThisThread::sleep_for(90); run = BACK; switch(flag_sp){ @@ -743,7 +739,7 @@ ThisThread::sleep_for(170); break; case 2: - ThisThread::sleep_for(150); + ThisThread::sleep_for(140); break; } run = A2LEFT; @@ -978,11 +974,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 +987,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>");