AP_Mount: use configured function to determine if MNT_TYPE has been configured

This commit is contained in:
Jonathan Challinger 2015-10-24 19:33:40 -07:00 committed by Andrew Tridgell
parent 5486be34b1
commit c762865d66

View File

@ -483,7 +483,7 @@ void AP_Mount::init(const AP_SerialManager& serial_manager)
}
// default mount to servo mount if rc output channels to control roll, tilt or pan have been defined
if (!state[0]._type.load()) {
if (!state[0]._type.configured()) {
if (RC_Channel_aux::function_assigned(RC_Channel_aux::Aux_servo_function_t::k_mount_pan) ||
RC_Channel_aux::function_assigned(RC_Channel_aux::Aux_servo_function_t::k_mount_tilt) ||
RC_Channel_aux::function_assigned(RC_Channel_aux::Aux_servo_function_t::k_mount_roll)) {