日常更新
This commit is contained in:
@@ -15,6 +15,8 @@ int32_t Right_Border_ToLeft_Circle = 0;
|
||||
int32_t Left_Border_ToRight_Circle = 0;
|
||||
int32_t Right_Border_ToRight_Circle = 0;
|
||||
|
||||
int32_t ceshi = 0;
|
||||
|
||||
void CheckCircle()
|
||||
{
|
||||
// 非圆环模式下,单边L角点, 单边长直道
|
||||
@@ -59,7 +61,7 @@ void RunCircle()
|
||||
}
|
||||
} else if (circle_type == CIRCLE_LEFT_RUNNING) // 正常巡线,寻外圆右线
|
||||
{
|
||||
//track_type = TRACK_RIGHT;
|
||||
// track_type = TRACK_RIGHT;
|
||||
track_type = TRACK_LEFT; // 看看加一个如果丢线才切换
|
||||
if (Lpt1_found) {
|
||||
pts_resample_right_count = mid_right_count = Lpt1_rpts1s_id;
|
||||
@@ -125,8 +127,8 @@ void RunCircle()
|
||||
} else if (circle_type == CIRCLE_RIGHT_RUNNING) // 正常巡线,寻外圆左线
|
||||
{
|
||||
track_type = TRACK_RIGHT;
|
||||
//track_type = TRACK_LEFT; // 看看加一个如果丢线才切换
|
||||
if (Lpt0_found) // 外环存在拐点,可再加拐点距离判据 (左 L 点)
|
||||
// track_type = TRACK_LEFT; // 看看加一个如果丢线才切换
|
||||
if (Lpt0_found) // 外环存在拐点,可再加拐点距离判据 (左 L 点)
|
||||
{
|
||||
pts_resample_left_count = mid_left_count = Lpt0_rpts0s_id;
|
||||
}
|
||||
@@ -149,13 +151,13 @@ void RunCircle()
|
||||
{
|
||||
Right_Border_None_Circle++;
|
||||
}
|
||||
if (pts_resample_right_count > 0.7 / RESAMPLEDIST &&
|
||||
Right_Border_None_Circle > FRAMENONE) {
|
||||
if (pts_resample_right_count > (0.7 / RESAMPLEDIST) && Right_Border_None_Circle > FRAMENONE) {
|
||||
circle_type = CIRCLE_NONE;
|
||||
Right_Border_None_Circle = 0;
|
||||
Right_Border_Have_Circle = 0;
|
||||
Left_Border_ToLeft_Circle = 0;
|
||||
Left_Border_ToRight_Circle = 0;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user