mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-23 22:53:34 +08:00
ControlAllocation: introduce convention for control surface deflection sign
- horizontal control surfaces: up=positive deflection - vertical control surfaces (rudder): right=positive deflection - mixed (V-Tail): up=positive deflection Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
committed by
Daniel Agar
parent
5259877b1b
commit
1ad66e606b
+8
-7
@@ -82,8 +82,15 @@ void ActuatorEffectivenessControlSurfaces::updateParams()
|
||||
|
||||
param_get(_param_handles[i].trim, &_params[i].trim);
|
||||
|
||||
// TODO: enforce limits?
|
||||
// TODO: enforce limits (note that tailsitter uses different limits)?
|
||||
switch (_params[i].type) {
|
||||
|
||||
case Type::LeftAileron:
|
||||
break;
|
||||
|
||||
case Type::RightAileron:
|
||||
break;
|
||||
|
||||
case Type::Elevator:
|
||||
break;
|
||||
|
||||
@@ -107,12 +114,6 @@ void ActuatorEffectivenessControlSurfaces::updateParams()
|
||||
torque.setZero();
|
||||
break;
|
||||
|
||||
case Type::LeftAileron:
|
||||
break;
|
||||
|
||||
case Type::RightAileron:
|
||||
break;
|
||||
|
||||
case Type::Airbrakes:
|
||||
torque.setZero();
|
||||
break;
|
||||
|
||||
+10
-10
@@ -45,16 +45,16 @@ public:
|
||||
|
||||
enum class Type : int32_t {
|
||||
// This matches with the parameter
|
||||
Elevator = 1,
|
||||
Rudder = 2,
|
||||
LeftElevon = 3,
|
||||
RightElevon = 4,
|
||||
LeftVTail = 5,
|
||||
RightVTail = 6,
|
||||
LeftFlaps = 7,
|
||||
RightFlaps = 8,
|
||||
LeftAileron = 9,
|
||||
RightAileron = 10,
|
||||
LeftAileron = 1,
|
||||
RightAileron = 2,
|
||||
Elevator = 3,
|
||||
Rudder = 4,
|
||||
LeftElevon = 5,
|
||||
RightElevon = 6,
|
||||
LeftVTail = 7,
|
||||
RightVTail = 8,
|
||||
LeftFlaps = 9,
|
||||
RightFlaps = 10,
|
||||
Airbrakes = 11,
|
||||
Custom = 12,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user