新增移动用时宏便于调参

This commit is contained in:
lxbpxylps@126.com 2021-02-14 15:44:39 +08:00
parent e9f30112fc
commit 303368818c

View File

@ -32,6 +32,11 @@ int8_t route[][3] =
//****************************************可调参数**************************************** //****************************************可调参数****************************************
//抓取点移动用时
#define CATCH_MOVE_DELAY_TIME 2000
//释放点移动用时
#define RELEASE_MOVE_DELAY_TIME 2000
//重置留时 //重置留时
#define RESET_DELAY_TIME 10000 #define RESET_DELAY_TIME 10000
//抓取留时 //抓取留时
@ -295,12 +300,12 @@ void LineForward(uint8_t end_position, double speed_rate)
} }
else if (end_position == CATCH_END) //到达抓取位置为止 else if (end_position == CATCH_END) //到达抓取位置为止
{ {
if (micros() - begin_time > 2000) if (micros() - begin_time > CATCH_MOVE_DELAY_TIME)
break; break;
} }
else //到达释放位置为止 else //到达释放位置为止
{ {
if (micros() - begin_time > 2000) if (micros() - begin_time > RELEASE_MOVE_DELAY_TIME)
break; break;
} }
} }