mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-19 00:40:36 +08:00
Bug Fix(es): 3D-thrust ranges fixed to -1..1 and manual z maps to negative z-thrust now
- The range for 3D-thrust in the 6-DOF multirotor mixer is changed to -1 to 1 now (fixed from 0 to 1) - The Z thrust in the 6-DOF multirotor mixer is mapped to the Z-thrust command now (fixed from thrust command) - The manual Z command in the rate controller maps to the negative Z-thrust (fixed from positive Z) - The variable _thrust_body_sp in the rate controller renamed to _thrust_sp to be compatible with the older variable removed in the last commit - The code tested in TakeOff, Manual, Hold, Position and Land modes on both tilted hex and iris Accepting and working with 3D thrust commands now
This commit is contained in:
@@ -336,9 +336,9 @@ MultirotorMixer6dof::mix(float *outputs, unsigned space)
|
||||
float roll = math::constrain(get_control(0, 0) * _roll_scale, -1.0f, 1.0f);
|
||||
float pitch = math::constrain(get_control(0, 1) * _pitch_scale, -1.0f, 1.0f);
|
||||
float yaw = math::constrain(get_control(0, 2) * _yaw_scale, -1.0f, 1.0f);
|
||||
float x_thrust = math::constrain(get_control(0, 8), 0.0f, 1.0f);
|
||||
float y_thrust = math::constrain(get_control(0, 9), 0.0f, 1.0f);
|
||||
float z_thrust = - math::constrain(get_control(0, 3), 0.0f, 1.0f);
|
||||
float x_thrust = math::constrain(get_control(0, 8), -1.0f, 1.0f);
|
||||
float y_thrust = math::constrain(get_control(0, 9), -1.0f, 1.0f);
|
||||
float z_thrust = math::constrain(get_control(0, 10), -1.0f, 1.0f);
|
||||
|
||||
// clean out class variable used to capture saturation
|
||||
_saturation_status.value = 0;
|
||||
|
||||
Reference in New Issue
Block a user