Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: RemoteIR TextLCD
Diff: main.cpp
- Revision:
- 56:d02c62149a19
- Parent:
- 55:d3c19efa1ef9
- Child:
- 57:65dd71a6ce72
--- a/main.cpp Thu Sep 03 01:26:36 2020 +0000
+++ b/main.cpp Thu Sep 03 02:30:29 2020 +0000
@@ -82,7 +82,7 @@
AVOIDANCE, // 7:障害物回避
SPEED, // 8:スピード制御
LT_R, // 9:低速右折(ライントレース時)
- LT_L, // 10:低速左折(ライントレース時)
+ LT_L, // 10:低速左折(ライントレース時)
A1RIGHT,
A1LEFT,
A2RIGHT,
@@ -789,6 +789,9 @@
viewTimer.reset(); // タイマーリセット
viewTimer.start(); // タイマースタート
break;
+ default:
+ lcd.printf("Mode:ModeError ");
+ break;
}
mutex.unlock(); // ミューテックスアンロック
}
@@ -1271,8 +1274,6 @@
}
if( strstr(webdata, "GO") != NULL ) {
//*-*-*-5("+++++++++++++++++前進+++++++++++++++++++++\r\n");
- //delete avoi_thread; //障害物回避スレッド停止
- //delete trace_thread; //ライントレーススレッド停止
run = ADVANCE; // 前進
mode = ADVANCE; // モード変更
display(); // ディスプレイ表示
@@ -1280,8 +1281,6 @@
if( strstr(webdata, "LEFT") != NULL ) {
//*-*-*-5("+++++++++++++++++左折+++++++++++++++++++++\r\n");
- //delete avoi_thread; //障害物回避スレッド停止
- //delete trace_thread; //ライントレーススレッド停止
run = LEFT; // 左折
mode = LEFT; // モード変更
display(); // ディスプレイ表示
@@ -1289,8 +1288,6 @@
if( strstr(webdata, "STOP") != NULL ) {
//*-*-*-5("+++++++++++++++++停止+++++++++++++++++++++\r\n");
- //delete avoi_thread; //障害物回避スレッド停止
- //delete trace_thread; //ライントレーススレッド停止
run = STOP; // 停止
mode = STOP; // モード変更
display(); // ディスプレイ表示
@@ -1298,8 +1295,6 @@
if( strstr(webdata, "RIGHT") != NULL ) {
//*-*-*-5("+++++++++++++++++右折+++++++++++++++++++++\r\n");
- //delete avoi_thread; //障害物回避スレッド停止
- //delete trace_thread; //ライントレーススレッド停止
run = RIGHT; // 右折
mode = RIGHT; // モード変更
display(); // ディスプレイ表示
@@ -1307,8 +1302,6 @@
if( strstr(webdata, "BACK") != NULL ) {
//*-*-*-5("+++++++++++++++++後進+++++++++++++++++++++\r\n");
- //delete avoi_thread; //障害物回避スレッド停止
- //delete trace_thread; //ライントレーススレッド停止
run = BACK; // 後進
mode = BACK; // モード変更
display(); // ディスプレイ表示
@@ -1427,6 +1420,10 @@
led2=!led2;
led3=!led3;
led4=!led4;
+ mutex.lock(); // ミューテックスロック
+ lcd.setAddress(0,1);
+ lcd.printf("Mode:WiFiError ");
+ mutex.unlock();
ThisThread::sleep_for(1000);
}
}