Copter: added tailsitter frame support

This commit is contained in:
Andrew Tridgell 2017-02-11 16:50:34 +11:00
parent 83f3cee99e
commit 3cb88d0a23
1 changed files with 5 additions and 0 deletions

View File

@ -496,6 +496,7 @@ uint8_t Copter::get_frame_mav_type()
return MAV_TYPE_TRICOPTER;
case AP_Motors::MOTOR_FRAME_SINGLE:
case AP_Motors::MOTOR_FRAME_COAX:
case AP_Motors::MOTOR_FRAME_TAILSITTER:
return MAV_TYPE_COAXIAL;
}
// unknown frame so return generic
@ -561,6 +562,10 @@ void Copter::allocate_motors(void)
motors = new AP_MotorsCoax(MAIN_LOOP_RATE);
var_info = AP_MotorsCoax::var_info;
break;
case AP_Motors::MOTOR_FRAME_TAILSITTER:
motors = new AP_MotorsTailsitter(MAIN_LOOP_RATE);
var_info = AP_MotorsTailsitter::var_info;
break;
#else // FRAME_CONFIG == HELI_FRAME
case AP_Motors::MOTOR_FRAME_HELI:
default: