From c1c25c24bb916100a9883c764f22751b31fb520f Mon Sep 17 00:00:00 2001 From: Felix Ruess Date: Thu, 13 Feb 2014 14:04:31 +0100 Subject: [PATCH] [rotorcraft] MOTOR_MIXING_MAX_SATURATION_OFFSET defaults to 10% --- sw/airborne/subsystems/actuators/motor_mixing.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sw/airborne/subsystems/actuators/motor_mixing.c b/sw/airborne/subsystems/actuators/motor_mixing.c index e79daa50edd..9cd978f250d 100644 --- a/sw/airborne/subsystems/actuators/motor_mixing.c +++ b/sw/airborne/subsystems/actuators/motor_mixing.c @@ -47,8 +47,14 @@ #define MOTOR_MIXING_STOP_MOTOR -MAX_PPRZ #endif +/** + * Maximum offset in case of saturation. + * If a saturation is reached (desired motor command outside of possible MIN_MOTOR/MAX_MOTOR range), + * this saturation_offset is applied to all motors in order to give attitude commands a higher priority than thrust. + * This setting limits the saturation_offset. Default is 10% of maximum command. + */ #ifndef MOTOR_MIXING_MAX_SATURATION_OFFSET -#define MOTOR_MIXING_MAX_SATURATION_OFFSET MAX_PPRZ/3 +#define MOTOR_MIXING_MAX_SATURATION_OFFSET MAX_PPRZ/10 #endif #ifndef MOTOR_MIXING_MIN_MOTOR_STARTUP