AP_Motors: make sure ESC type is initialized early

This commit is contained in:
Andy Piper 2022-05-23 13:59:22 +01:00 committed by Randy Mackay
parent 7d00167428
commit 7dcdf7b325

View File

@ -124,6 +124,7 @@ void AP_Motors::rc_set_freq(uint32_t motor_mask, uint16_t freq_hz)
const uint32_t mask = motor_mask_to_srv_channel_mask(motor_mask);
hal.rcout->set_freq(mask, freq_hz);
hal.rcout->set_dshot_esc_type(SRV_Channels::get_dshot_esc_type());
switch (pwm_type(_pwm_type.get())) {
case PWM_TYPE_ONESHOT: