From 83b421bac1998e059a2d7bbe5d7308a919f22f10 Mon Sep 17 00:00:00 2001 From: Andy Piper Date: Mon, 23 May 2022 13:59:37 +0100 Subject: [PATCH] AR_Motors: make sure ESC type is initialized early --- libraries/AR_Motors/AP_MotorsUGV.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/AR_Motors/AP_MotorsUGV.cpp b/libraries/AR_Motors/AP_MotorsUGV.cpp index 4ae276adc7..f812ead452 100644 --- a/libraries/AR_Motors/AP_MotorsUGV.cpp +++ b/libraries/AR_Motors/AP_MotorsUGV.cpp @@ -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);