;程序的目的时求得两个轮子的速度矢量,但是却不知道为何是这样
speed.left =
tiM_GetCounter(TIM3)-0x7fff;
speed.right=TIM_GetCounter(TIM4)-0x7fff;/
speed.average*=0.7;
speed.average+=((float)(speed.left+speed.right))*0.5*0.3
TIM_SetCounter(TIM3, 0x7fff);
TIM_SetCounter(TIM4, 0x7fff);
一周热门 更多>