适配新班子
This commit is contained in:
@@ -6,17 +6,17 @@
|
||||
#define FAN_LL_PWM_PIN TIM8_PWM_MAP1_CH1_B6 // 左升力风扇
|
||||
#define FAN_RL_PWM_PIN TIM8_PWM_MAP1_CH2_B7 // 右升力风扇
|
||||
// M4
|
||||
#define FAN_LB_PWM_A_PIN TIM10_PWM_MAP3_CH2_D3 // 左后
|
||||
#define FAN_LB_PWM_B_PIN TIM10_PWM_MAP3_CH4_D7 // 左后
|
||||
#define FAN_RB_PWM_A_PIN TIM10_PWM_MAP3_CH2_D3 // 左后
|
||||
#define FAN_RB_PWM_B_PIN TIM10_PWM_MAP3_CH4_D7 // 左后
|
||||
// M1
|
||||
#define FAN_RB_PWM_A_PIN TIM4_PWM_MAP1_CH1_D12 // 右后
|
||||
#define FAN_RB_PWM_B_PIN TIM4_PWM_MAP1_CH3_D14 // 右后
|
||||
#define FAN_LB_PWM_A_PIN TIM4_PWM_MAP1_CH1_D12 // 右后
|
||||
#define FAN_LB_PWM_B_PIN TIM4_PWM_MAP1_CH3_D14 // 右后
|
||||
// M3
|
||||
#define FAN_LS_PWM_B_PIN TIM10_PWM_MAP3_CH3_D5 // 左侧
|
||||
#define FAN_LS_PWM_A_PIN TIM10_PWM_MAP3_CH1_D1 // 左侧
|
||||
#define FAN_RS_PWM_B_PIN TIM10_PWM_MAP3_CH3_D5 // 左侧
|
||||
#define FAN_RS_PWM_A_PIN TIM10_PWM_MAP3_CH1_D1 // 左侧
|
||||
// M2
|
||||
#define FAN_RS_PWM_B_PIN TIM4_PWM_MAP1_CH4_D15 // 右侧
|
||||
#define FAN_RS_PWM_A_PIN TIM4_PWM_MAP1_CH2_D13 // 右侧
|
||||
#define FAN_LS_PWM_B_PIN TIM4_PWM_MAP1_CH4_D15 // 右侧
|
||||
#define FAN_LS_PWM_A_PIN TIM4_PWM_MAP1_CH2_D13 // 右侧
|
||||
|
||||
int32_t pwm_duty_ls_g;
|
||||
int32_t pwm_duty_rs_g;
|
||||
@@ -45,6 +45,8 @@ inline static float clip_f32(float x, float low, float up)
|
||||
|
||||
void by_pwm_init(void)
|
||||
{
|
||||
gpio_init(D4, GPO, 1, GPO_PUSH_PULL);
|
||||
gpio_init(C8, GPO, 1, GPO_PUSH_PULL);
|
||||
pwm_init(FAN_LL_PWM_PIN, 50, 500);
|
||||
pwm_init(FAN_RL_PWM_PIN, 50, 500);
|
||||
|
||||
@@ -59,13 +61,13 @@ void by_pwm_init(void)
|
||||
pwm_init(FAN_RB_PWM_B_PIN, 20000, 7000);
|
||||
while (1);
|
||||
#elif FIX_DRIVE == 2
|
||||
pwm_init(FAN_LS_PWM_A_PIN, 20000, 7000);
|
||||
pwm_init(FAN_LS_PWM_A_PIN, 20000, 0);
|
||||
pwm_init(FAN_LS_PWM_B_PIN, 20000, 0);
|
||||
pwm_init(FAN_RS_PWM_A_PIN, 20000, 7000);
|
||||
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, 7000);
|
||||
pwm_init(FAN_LB_PWM_A_PIN, 20000, 0);
|
||||
pwm_init(FAN_LB_PWM_B_PIN, 20000, 0);
|
||||
pwm_init(FAN_RB_PWM_A_PIN, 20000, 7000);
|
||||
pwm_init(FAN_RB_PWM_A_PIN, 20000, 1000);
|
||||
pwm_init(FAN_RB_PWM_B_PIN, 20000, 0);
|
||||
while (1);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user