From 7268f79074ff2d7902a5f438f8d8a86bdbeef9f9 Mon Sep 17 00:00:00 2001 From: "lxbpxylps@126.com" Date: Mon, 1 Mar 2021 21:15:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E8=BD=AC=E5=90=91=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- TaiChi/TaiChi.ino | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/TaiChi/TaiChi.ino b/TaiChi/TaiChi.ino index 6507cec..cfee524 100644 --- a/TaiChi/TaiChi.ino +++ b/TaiChi/TaiChi.ino @@ -65,8 +65,10 @@ int8_t route[][3] = //最大抓取尝试次数 #define MAX_CATCH_TIMES 2 -//传感器判断转向完成延时 -#define TRUN_CHECK_DELAY 1000 +//从触碰白线到开始转向延时 +#define BEFORE_TURN_DELAY 775 +//从开始转向到转向结束延时 +#define AFTER_TURN_DELAY 1130 //修正循迹时单侧减速比率 #define LINE_FIX_SPEED_RATE 0.8 @@ -643,11 +645,9 @@ void TurnDirection(float speed_rate) } else //继续转向 { + delay(BEFORE_TURN_DELAY); move.MoveDirection(direction, speed_rate); - - //传感器判断转向完成 - delay(TRUN_CHECK_DELAY); //延时后判断 - while(!(sensor.IsWhite(GRAY_3) && sensor.IsWhite(GRAY_4))) {} + delay(AFTER_TURN_DELAY); } #ifdef TAICHI_DEBUG