高级会员
- 积分
- 577
- 威望
- 293
- 贡献
- 162
- 兑换币
- 179
- 注册时间
- 2014-3-4
- 在线时间
- 61 小时
|
2#
楼主 |
发表于 2014-7-8 00:27:15
|
只看该作者
void directioncontrol(void)
{
int i,j;
float fdelta,fp,fd,directionvalue;
if(center_flage <= 8)
{ //直道
P_DIRECTION = 0.0;
D_DIRECTION =0.0;
}
else if( 8 <center_flage&¢er_flage <= 26)
{ //大C
P_DIRECTION = 0.0;
D_DIRECTION = 0.0 ;
}
else if( 25 <center_flage&¢er_flage <= 30)
{ //小弯
P_DIRECTION =0.0 ;
D_DIRECTION =0.0 ;
}
else if( 30<center_flage&¢er_flage <=45 )
{ //大弯
P_DIRECTION =0.0;
D_DIRECTION = 0.0;
}
else
{
P_DIRECTION =0.0;
D_DIRECTION = 0.0;
} |
|