AR_Motors: make sure ESC type is initialized early

This commit is contained in:
Andy Piper 2022-05-23 13:59:37 +01:00 committed by Andrew Tridgell
parent 3d9639181e
commit 0cd3636dfb
1 changed files with 2 additions and 0 deletions

View File

@ -504,6 +504,8 @@ void AP_MotorsUGV::setup_pwm_type()
{
_motor_mask = 0;
hal.rcout->set_dshot_esc_type(SRV_Channels::get_dshot_esc_type());
// work out mask of channels assigned to motors
_motor_mask |= SRV_Channels::get_output_channel_mask(SRV_Channel::k_throttle);
_motor_mask |= SRV_Channels::get_output_channel_mask(SRV_Channel::k_throttleLeft);