Hi there,
I am trying to understand how the motor order here ( https://ardupilot.org/copter/_images/motororder-quad-x-2d.png, https://ardupilot.org/copter/_images/APM_2_5_MOTORS_QUAD_enc.jpg ) is related to the code:
bool AP_MotorsMatrix::setup_quad_matrix(motor_frame_type frame_type)
{
...
case MOTOR_FRAME_TYPE_X: {
_frame_type_string = "X";
static const AP_MotorsMatrix::MotorDef motors[] {
{ 45, AP_MOTORS_MATRIX_YAW_FACTOR_CCW, 1 },
{ -135, AP_MOTORS_MATRIX_YAW_FACTOR_CCW, 3 },
{ -45, AP_MOTORS_MATRIX_YAW_FACTOR_CW, 4 },
{ 135, AP_MOTORS_MATRIX_YAW_FACTOR_CW, 2 },
};
add_motors(motors, ARRAY_SIZE(motors));
break;
}
...
}
In the code the CCW motors are 1 and 3, and CW motors are 2 and 4. But in the picture from the doc:
CCW → 1, 2
CW → 3, 4
According to my tests ( look at the text below ):
CC2 → 4 (A), 2 (C)
CW → 1 (B), 3 (D)
I’ve configure the drone ( by using SERVO OUTPUT tab in Mission Planner )
as it is shown in the picture QUAD X ( https://ardupilot.org/copter/_images/APM_2_5_MOTORS_QUAD_enc.jpg ) so when I am pressing in Test Motor in Mission Planner:
- TEST A → the top right mottor is spinning
- TEST B → the rear right motor is spinning
- TEST C → the rear left
- TEST D → the top left
But drones are doing backlip instead of flying.