From 4fe904ea78d0a6cee3e0f478c7a2d78f4d5db2a8 Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Thu, 4 Apr 2013 11:50:05 +0900 Subject: [PATCH] Copter: add V frame support for Quads --- libraries/AP_Motors/AP_MotorsQuad.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libraries/AP_Motors/AP_MotorsQuad.cpp b/libraries/AP_Motors/AP_MotorsQuad.cpp index ba6876b5cd..fc27581048 100644 --- a/libraries/AP_Motors/AP_MotorsQuad.cpp +++ b/libraries/AP_Motors/AP_MotorsQuad.cpp @@ -23,6 +23,12 @@ void AP_MotorsQuad::setup_motors() add_motor(AP_MOTORS_MOT_2, -90, AP_MOTORS_MATRIX_MOTOR_CCW, 4); add_motor(AP_MOTORS_MOT_3, 0, AP_MOTORS_MATRIX_MOTOR_CW, 1); add_motor(AP_MOTORS_MOT_4, 180, AP_MOTORS_MATRIX_MOTOR_CW, 3); + }else if( _frame_orientation == AP_MOTORS_V_FRAME ) { + // V frame set-up + add_motor(AP_MOTORS_MOT_1, 45, 0.8877, 1); + add_motor(AP_MOTORS_MOT_2, -135, 1.1123, 3); + add_motor(AP_MOTORS_MOT_3, -45, -0.8877, 4); + add_motor(AP_MOTORS_MOT_4, 135, -1.1123, 2); }else{ // X frame set-up add_motor(AP_MOTORS_MOT_1, 45, AP_MOTORS_MATRIX_MOTOR_CCW, 1);