From b25cc60323721db1a0496082903fe7ecdb04baac Mon Sep 17 00:00:00 2001 From: Pradeep CK Date: Thu, 28 Nov 2024 10:09:25 +1100 Subject: [PATCH] SITL : set ESC motor mask This is specific to Carbonix. --- libraries/SITL/SIM_Plane.cpp | 4 ++-- libraries/SITL/SIM_QuadPlane.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/SITL/SIM_Plane.cpp b/libraries/SITL/SIM_Plane.cpp index 8dbdfc6fc4..7d58b3da6e 100644 --- a/libraries/SITL/SIM_Plane.cpp +++ b/libraries/SITL/SIM_Plane.cpp @@ -362,8 +362,8 @@ void Plane::calculate_forces(const struct sitl_input &input, Vector3f &rot_accel } // simulate engine RPM - motor_mask |= (1U<<2); - rpm[2] = thrust * 7000; + motor_mask |= (1U<<4); + rpm[4] = thrust * 7000; // scale thrust to newtons thrust *= thrust_scale; diff --git a/libraries/SITL/SIM_QuadPlane.cpp b/libraries/SITL/SIM_QuadPlane.cpp index a58b673405..3c613f4992 100644 --- a/libraries/SITL/SIM_QuadPlane.cpp +++ b/libraries/SITL/SIM_QuadPlane.cpp @@ -27,7 +27,7 @@ QuadPlane::QuadPlane(const char *frame_str) : { // default to X frame const char *frame_type = "x"; - uint8_t motor_offset = 4; + uint8_t motor_offset = 0; ground_behavior = GROUND_BEHAVIOR_NO_MOVEMENT;