Rover: setup default esc scaling

for rovers without a k_throttle channel we need a default ESC scaling
value
This commit is contained in:
Andrew Tridgell 2017-05-16 15:16:15 +10:00 committed by Randy Mackay
parent d060fd2826
commit 2e24c35906

View File

@ -28,8 +28,10 @@ void Rover::set_control_channels(void)
} }
} }
// setup correct scaling for ESCs like the UAVCAN PX4ESC which // setup correct scaling for ESCs like the UAVCAN PX4ESC which
// take a proportion of speed. // take a proportion of speed. Default to 1000 to 2000 for systems without
hal.rcout->set_esc_scaling(channel_throttle->get_radio_min(), channel_throttle->get_radio_max()); // 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() void Rover::init_rc_in()