新桨叶完赛

This commit is contained in:
2024-07-01 19:07:11 +08:00
parent 50b5cd3f2d
commit 8b5799302b
6 changed files with 41 additions and 34 deletions

View File

@@ -6,11 +6,11 @@
#define FAN_LL_PWM_PIN TIM8_PWM_MAP1_CH1_B6 // 左升力风扇
#define FAN_RL_PWM_PIN TIM8_PWM_MAP1_CH2_B7 // 右升力风扇
// M4
#define FAN_RB_PWM_A_PIN TIM10_PWM_MAP3_CH2_D3 //
#define FAN_RB_PWM_B_PIN TIM10_PWM_MAP3_CH4_D7 //
#define FAN_RB_PWM_A_PIN TIM10_PWM_MAP3_CH4_D7 // 后
#define FAN_RB_PWM_B_PIN TIM10_PWM_MAP3_CH2_D3 // you
// M1
#define FAN_LB_PWM_A_PIN TIM4_PWM_MAP1_CH1_D12 //
#define FAN_LB_PWM_B_PIN TIM4_PWM_MAP1_CH3_D14 //
#define FAN_LB_PWM_A_PIN TIM4_PWM_MAP1_CH3_D14 // zuo
#define FAN_LB_PWM_B_PIN TIM4_PWM_MAP1_CH1_D12 // 后
// M3
#define FAN_RS_PWM_B_PIN TIM10_PWM_MAP3_CH1_D1 // 右侧
#define FAN_RS_PWM_A_PIN TIM10_PWM_MAP3_CH3_D5 // you侧
@@ -65,9 +65,9 @@ void by_pwm_init(void)
pwm_init(FAN_LS_PWM_B_PIN, 20000, 0);
pwm_init(FAN_RS_PWM_A_PIN, 20000, 0);
pwm_init(FAN_RS_PWM_B_PIN, 20000, 0);
pwm_init(FAN_LB_PWM_A_PIN, 20000, 0);
pwm_init(FAN_LB_PWM_A_PIN, 20000,1000);
pwm_init(FAN_LB_PWM_B_PIN, 20000, 0);
pwm_init(FAN_RB_PWM_A_PIN, 20000, 0);
pwm_init(FAN_RB_PWM_A_PIN, 20000, 1000);
pwm_init(FAN_RB_PWM_B_PIN, 20000, 0);
while (1);
#endif