修正默认偏转角
This commit is contained in:
@@ -49,7 +49,7 @@
|
||||
#define EN PDin(3)
|
||||
|
||||
#define Servo_PWM TIM12->CCR2
|
||||
#define SERVO_INIT 1600 //Servo zero point //¶æ»úÁãµã
|
||||
#define SERVO_INIT 1590 //Servo zero point //<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
void Enable_Pin(void);
|
||||
void Servo_PWM_Init(u16 arr,u16 psc);
|
||||
|
||||
@@ -465,10 +465,9 @@ void TIM12_SERVO_Init(u16 arr,u16 psc)
|
||||
//Enable timer //使能定时器
|
||||
TIM_Cmd(TIM12, ENABLE);
|
||||
|
||||
//The channel value is initialized to 1500, corresponding to the steering gear zero
|
||||
//通道值初始化为1500,舵机零点对应值
|
||||
TIM12->CCR2=1500;
|
||||
TIM12->CCR1=1500;
|
||||
//Initialize both servo channels to the configured steering center.
|
||||
TIM12->CCR2=SERVO_INIT;
|
||||
TIM12->CCR1=SERVO_INIT;
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user