|
RT
补充内容 (2014-7-7 21:58):
检查了下代码。。memset(S->in_e, 0, 3u * sizeof(unsigned short int));改成这样更好些。。
补充内容 (2014-7-7 21:59):
void *
memset (void *s, int c, unsigned n)
{
/* Not optimized, but very portable */
unsigned char *sp = (unsigned char *)s;
if ((s != NULL) && (n > 0))
{
while (n--)
{
补充内容 (2014-7-7 21:59):
*sp++ = (unsigned char)c;
}
}
return s;
}
补充内容 (2014-7-7 22:04):
我上传错版本了……正确文件在七楼
补充内容 (2014-7-7 22:24):
speed = lptmr_get();
lptmr_clean();
__push_pid_para_(&PID_change,need_speed - speed);
PWM = __s16_GetPluse_(&PID_change);
if( PWM > 0 )
{
PWMisZheng = 1;
vMoto
补充内容 (2014-7-7 22:25):
rBackChange(0);
vMotorForChange(__ABS(PWM));
}
else
{
PWMisZheng = 2;
vMotorForChange(0);
vMotorBackChange(__ABS(PWM));
} |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|