mirror of
https://gitee.com/yyz_o/bk_bishe_pi.git
synced 2025-09-07 23:21:26 +00:00
2025.5.15测试
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user