Skip to content

Commit

Permalink
remove behavior alteration for roll and pitch
Browse files Browse the repository at this point in the history
  • Loading branch information
Master Chief committed Dec 23, 2024
1 parent 8d8f269 commit 9f8b6d9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/lib/mixer_module/params.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ PARAM_DEFINE_INT32(MC_AIRMODE, 0);
*
* If false, Z-thrust is never sacrificed for yaw actuation.
* If true, default behavior. Z-thrust is reduced to make room yaw actuation when saturated.
* Only applies when airmode is disabled.
*
* @boolean
* @group Mixer Output
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,8 @@ ControlAllocationSequentialDesaturation::mixAirmodeDisabled()
pitch(i) = _mix(i, ControlAxis::PITCH);
}

if (_param_mc_reduce_thrust.get()) {
// only reduce thrust
desaturateActuators(_actuator_sp, thrust_z, true);
}
// only reduce thrust
desaturateActuators(_actuator_sp, thrust_z, true);

// Reduce roll/pitch acceleration if needed to unsaturate
desaturateActuators(_actuator_sp, roll);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ class ControlAllocationSequentialDesaturation: public ControlAllocationPseudoInv
* Desaturation behavior: no airmode, thrust is NEVER increased to meet the demanded
* roll/pitch/yaw. Instead roll/pitch/yaw is reduced as much as needed.
* Thrust can be reduced to unsaturate the upper side.
*
* @see mixYaw() for the exact yaw behavior.
*/
void mixAirmodeDisabled();
Expand All @@ -140,7 +139,7 @@ class ControlAllocationSequentialDesaturation: public ControlAllocationPseudoInv

DEFINE_PARAMETERS(
(ParamInt<px4::params::MC_AIRMODE>) _param_mc_airmode, ///< air-mode
// If false, thrust is never reduced to increase attitude control,
// If false, thrust is never sacrificed for yaw actuation,
// and MINIMUM_YAW_MARGIN has no effect.
// Only applies when airmode is disabled.
(ParamBool<px4::params::MC_REDUCE_THRUST>) _param_mc_reduce_thrust
Expand Down

0 comments on commit 9f8b6d9

Please sign in to comment.