2025.5.15测试

This commit is contained in:
Ñõԭ×Ó
2025-05-15 20:21:34 +08:00
parent 9cd5540936
commit 69f91d3b52
2 changed files with 67 additions and 45 deletions

View File

@@ -8,8 +8,8 @@ using namespace std;
// const int DIST_cell = 300 ;
// const int DIST_wall = 100 ;
const int DIST_cell = 300;
const int DIST_wall_f = 68;
// const int DIST_wall_rl = 88;
const int DIST_wall_f = 80;
const int DIST_wall_rl = 87;
/*---全局各种变量与常量定义完成---*/
@@ -28,7 +28,7 @@ int main()
//判断旋转方向
if (Lwall)
{
VWTurn(+90,10); //向左旋转
VWTurn(+90,15); //向左旋转
VWWait();
}
else if (Fwall)
@@ -37,15 +37,16 @@ int main()
}
else if (Rwall)
{
VWTurn(-90,10); //向右旋转
VWTurn(-90,15); //向右旋转
VWWait();
}
else
{
VWTurn(180,10);
VWTurn(180,15);
VWWait();
}
//直走
PIDStraight();
VWWait();
} while (KEYRead() != KEY4);
}