智能车制作
标题:
下面个那个直立电压输出式为什么要那样写
[打印本页]
作者:
丨奇灬锦兮丶
时间:
2015-4-23 17:04
标题:
下面个那个直立电压输出式为什么要那样写
void Car_Upright_Ctrl() //stand control signal output
{
float fValue; //ensure the PWM is postive when the car forward
fValue = (CAR_ANGLE_SET - Angle ) * P_Upright_Ctrl + (CAR_ANGLE_SPEED_SET- Angle_dot ) * D_Upright_Ctrl ;
if (fValue > PWM_Val_Max) fValue = PWM_Val_Max;
if (fValue < PWM_Val_Min) fValue = PWM_Val_Min;
g_fAngleControlOut = fValue;
}
欢迎光临 智能车制作 (http://111.231.132.190/)
Powered by Discuz! X3.2