Hello!
I’m having doubts about custom motor mix. I have this layout and motor numbers:
Which gives me this output:
mmix 0 1 -0.767 -1 -1
mmix 1 1 0.767 1 -1
mmix 2 1 -0.531 -0.345 1
mmix 3 1 -0.767 1 1
mmix 4 1 0.767 -1 1
mmix 5 1 0.531 0.345 1
mmix 6 1 0.531 -0.345 -1
mmix 7 1 -0.531 0.345 -1
I want to edit libraries/AP_Motors/AP_MotorsMatrix.cpp
case MOTOR_FRAME_TYPE_V:
add_motor_raw(AP_MOTORS_MOT_1, 1.0f, 0.34f, AP_MOTORS_MATRIX_YAW_FACTOR_CW, 7);
add_motor_raw(AP_MOTORS_MOT_2, -1.0f, -0.32f, AP_MOTORS_MATRIX_YAW_FACTOR_CW, 3);
add_motor_raw(AP_MOTORS_MOT_3, 1.0f, -0.32f, AP_MOTORS_MATRIX_YAW_FACTOR_CCW, 6);
add_motor_raw(AP_MOTORS_MOT_4, -0.5f, -1.0f, AP_MOTORS_MATRIX_YAW_FACTOR_CCW, 4);
add_motor_raw(AP_MOTORS_MOT_5, 1.0f, 1.0f, AP_MOTORS_MATRIX_YAW_FACTOR_CCW, 8);
add_motor_raw(AP_MOTORS_MOT_6, -1.0f, 0.34f, AP_MOTORS_MATRIX_YAW_FACTOR_CCW, 2);
add_motor_raw(AP_MOTORS_MOT_7, -1.0f, 1.0f, AP_MOTORS_MATRIX_YAW_FACTOR_CW, 1);
add_motor_raw(AP_MOTORS_MOT_8, 0.5f, -1.0f, AP_MOTORS_MATRIX_YAW_FACTOR_CW, 5);
success = true;
break;
But I don’t really know how to combine upper “format” with this “format” in the library. The motor numbers, direction and everything else must match and there are a bit too many options to try and also too much to risk if this is not set correctly.
Could someone help me out by making correct adjustments in MOTOR_FRAME_TYPE_V or explain me the format.
Thank you very much!
Best regards,
Jure