日常更新
This commit is contained in:
@@ -112,23 +112,27 @@ void aim_distance_select(void)
|
||||
|
||||
void ElementJudge()
|
||||
{
|
||||
CheckGarage();
|
||||
if (garage_type == GARAGE_NONE) {
|
||||
CheckCross();
|
||||
if (cross_type == CROSS_NONE) {
|
||||
CheckBarrier();
|
||||
if (barrier_type == BARRIER_NONE) {
|
||||
CheckCircle();
|
||||
if (circle_type == CIRCLE_NONE) {
|
||||
Check_s();
|
||||
Check_shiled();
|
||||
if (shiled_type == SHILED_NONE) {
|
||||
CheckGarage();
|
||||
if (garage_type == GARAGE_NONE) {
|
||||
CheckCross();
|
||||
if (cross_type == CROSS_NONE) {
|
||||
CheckBarrier();
|
||||
if (barrier_type == BARRIER_NONE) {
|
||||
CheckCircle();
|
||||
if (circle_type == CIRCLE_NONE) {
|
||||
Check_s();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (garage_type != GARAGE_NONE) {
|
||||
cross_type = CROSS_NONE;
|
||||
circle_type = CIRCLE_NONE;
|
||||
cross_type = CROSS_NONE;
|
||||
circle_type = CIRCLE_NONE;
|
||||
barrier_type = BARRIER_NONE;
|
||||
}
|
||||
if (cross_type != CROSS_NONE) {
|
||||
circle_type = CIRCLE_NONE;
|
||||
@@ -147,12 +151,10 @@ void ElementRun()
|
||||
|
||||
else if (cross_type != CROSS_NONE) {
|
||||
RunCross();
|
||||
}
|
||||
|
||||
else if (circle_type != CIRCLE_NONE) {
|
||||
RunCircle();
|
||||
} else if (barrier_type != BARRIER_NONE) {
|
||||
RunBarrier();
|
||||
} else if (circle_type != CIRCLE_NONE) {
|
||||
RunCircle();
|
||||
} else if (s_type != S_NONE) {
|
||||
// RunS();
|
||||
}
|
||||
@@ -274,17 +276,17 @@ void MidLineTrack()
|
||||
switch (barrier_type) {
|
||||
case BARRIER_LEFT_BEGIN:
|
||||
// dx_near = mid_track[aim_idx_near][1] - cx + barrier_offset;
|
||||
pure_angle = -45.f;
|
||||
pure_angle = -atanf(PIXPERMETER * 2.0f * 0.2f * 0.5f * dx / dn) / PI32 * 180.0f - 20;
|
||||
break;
|
||||
case BARRIER_LEFT_RUNNING:
|
||||
pure_angle = 25.f;
|
||||
pure_angle = 15.f;
|
||||
break;
|
||||
case BARRIER_RIGHT_BEGIN:
|
||||
pure_angle = 45.f;
|
||||
pure_angle = -atanf(PIXPERMETER * 2.0f * 0.2f * 0.5f * dx / dn) / PI32 * 180.0f + 20;
|
||||
break;
|
||||
case BARRIER_RIGHT_RUNNING:
|
||||
// dx_near = mid_track[aim_idx_near][1] - cx - barrier_offset;
|
||||
pure_angle = -25.f;
|
||||
pure_angle = -15.f;
|
||||
default:
|
||||
// pure_angle = -atanf(PIXPERMETER * 2.0f * 0.2f * 0.5f * dx / dn) / PI32 * 180.0f;
|
||||
if (dy > 0) {
|
||||
@@ -326,7 +328,7 @@ void MidLineTrack()
|
||||
// // float error_near = -atan2f(dx_near, dy_near) * 180 / PI32;
|
||||
}
|
||||
|
||||
if (circle_type == CIRCLE_LEFT_IN || circle_type == CIRCLE_RIGHT_IN) {
|
||||
if (circle_type == CIRCLE_LEFT_IN || circle_type == CIRCLE_RIGHT_IN || circle_type == CIRCLE_LEFT_BEGIN || circle_type == CIRCLE_RIGHT_BEGIN) {
|
||||
state_type = CIRCLE_STATE;
|
||||
timer_clear(TIM_3);
|
||||
timer_start(TIM_3);
|
||||
|
||||
Reference in New Issue
Block a user