更改抓取环时的逻辑

This commit is contained in:
lxbpxylps@126.com 2021-03-05 21:56:27 +08:00
parent e39d78ea77
commit 7320b6b163

View File

@ -681,12 +681,15 @@ bool CatchAndCheck(float speed)
Serial.print(" catch_times: "); Serial.println((int)catch_times);
#endif
if (catch_times == MAX_CATCH_TIMES) //达到最大尝试次数,返回
return false;
//停止动作组运行
servo.StopActionGroup();
if (catch_times == MAX_CATCH_TIMES) //达到最大尝试次数,返回
{
servo.Reset();
return false;
}
//打开爪子
if(!OpenClawAndCheck()) //未能打开爪子
return false;