From 2e24c35906503679a638278c8bc332bc05c171ed Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 16 May 2017 15:16:15 +1000 Subject: [PATCH] Rover: setup default esc scaling for rovers without a k_throttle channel we need a default ESC scaling value --- APMrover2/radio.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/APMrover2/radio.cpp b/APMrover2/radio.cpp index bcc9140a3c..b39473756a 100644 --- a/APMrover2/radio.cpp +++ b/APMrover2/radio.cpp @@ -28,8 +28,10 @@ void Rover::set_control_channels(void) } } // setup correct scaling for ESCs like the UAVCAN PX4ESC which - // take a proportion of speed. - hal.rcout->set_esc_scaling(channel_throttle->get_radio_min(), channel_throttle->get_radio_max()); + // take a proportion of speed. Default to 1000 to 2000 for systems without + // a k_throttle output + hal.rcout->set_esc_scaling(1000, 2000); + g2.servo_channels.set_esc_scaling_for(SRV_Channel::k_throttle); } void Rover::init_rc_in()