mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 11:13:34 +08:00
fix(control_allcoator): actually use the defined constants
This commit is contained in:
+2
-2
@@ -270,10 +270,10 @@ bool ActuatorEffectivenessRotors::isAlignedWithAxis(const Vector3f &axis_abs, in
|
|||||||
{
|
{
|
||||||
for (int i = 0; i < 3; ++i) {
|
for (int i = 0; i < 3; ++i) {
|
||||||
if (i == primary_idx) {
|
if (i == primary_idx) {
|
||||||
if (axis_abs(i) <= 0.1f) { return false; }
|
if (axis_abs(i) <= MAX_AXIS_NEGLIGIBLE) { return false; }
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (axis_abs(i) >= 0.5f) { return false; }
|
if (axis_abs(i) >= MIN_AXIS_DOMINANT) { return false; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -55,7 +55,7 @@ using namespace matrix;
|
|||||||
using ActuatorBitmask = ActuatorEffectiveness::ActuatorBitmask;
|
using ActuatorBitmask = ActuatorEffectiveness::ActuatorBitmask;
|
||||||
|
|
||||||
static constexpr float MIN_AXIS_DOMINANT = 0.5f;
|
static constexpr float MIN_AXIS_DOMINANT = 0.5f;
|
||||||
static constexpr float MAX_AXIS_NEGLIGIBLE = 0.5f;
|
static constexpr float MAX_AXIS_NEGLIGIBLE = 0.1f;
|
||||||
|
|
||||||
class ActuatorEffectivenessRotors : public ModuleParams, public ActuatorEffectiveness
|
class ActuatorEffectivenessRotors : public ModuleParams, public ActuatorEffectiveness
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user