From ab781189546dfc5383d994941168e7ba13ec9f20 Mon Sep 17 00:00:00 2001 From: Willian Galvani Date: Thu, 16 Jun 2022 21:42:00 -0700 Subject: [PATCH] AP_Motors6DOF: add Sub OMNI frame --- libraries/AP_Motors/AP_Motors6DOF.cpp | 11 +++++++++++ libraries/AP_Motors/AP_Motors6DOF.h | 3 ++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/libraries/AP_Motors/AP_Motors6DOF.cpp b/libraries/AP_Motors/AP_Motors6DOF.cpp index 239544f968..bda8c5dc14 100644 --- a/libraries/AP_Motors/AP_Motors6DOF.cpp +++ b/libraries/AP_Motors/AP_Motors6DOF.cpp @@ -175,6 +175,17 @@ void AP_Motors6DOF::setup_motors(motor_frame_class frame_class, motor_frame_type add_motor_raw_6dof(AP_MOTORS_MOT_6, -1.0f, 0, 0, -1.0f, 0, 0, 6); break; + case SUB_FRAME_VECTORED_OMNI: + add_motor_raw_6dof(AP_MOTORS_MOT_1, -1, -1, 1, -1, 1, 1, 1); + add_motor_raw_6dof(AP_MOTORS_MOT_2, 1, -1, -1, -1, 1, -1, 2); + add_motor_raw_6dof(AP_MOTORS_MOT_3, 1, 1, 1, -1, -1, -1, 3); + add_motor_raw_6dof(AP_MOTORS_MOT_4, -1, 1, -1, -1, -1, 1, 4); + add_motor_raw_6dof(AP_MOTORS_MOT_5, 1, 1, 1, 1, 1, 1, 5); + add_motor_raw_6dof(AP_MOTORS_MOT_6, -1, 1, -1, 1, 1, -1, 6); + add_motor_raw_6dof(AP_MOTORS_MOT_7, -1, -1, 1, 1, -1, -1, 7); + add_motor_raw_6dof(AP_MOTORS_MOT_8, 1, -1, -1, 1, -1, 1, 8); + break; + case SUB_FRAME_CUSTOM: // Put your custom motor setup here //break; diff --git a/libraries/AP_Motors/AP_Motors6DOF.h b/libraries/AP_Motors/AP_Motors6DOF.h index 90d7c0e00f..dba527156d 100644 --- a/libraries/AP_Motors/AP_Motors6DOF.h +++ b/libraries/AP_Motors/AP_Motors6DOF.h @@ -26,7 +26,8 @@ public: SUB_FRAME_SIMPLEROV_3, SUB_FRAME_SIMPLEROV_4, SUB_FRAME_SIMPLEROV_5, - SUB_FRAME_CUSTOM + SUB_FRAME_CUSTOM, + SUB_FRAME_VECTORED_OMNI } sub_frame_t; // Override parent