diff --git a/sw/airborne/firmwares/rotorcraft/actuators/supervision.c b/sw/airborne/firmwares/rotorcraft/actuators/supervision.c index ad4cc13edf..6d96d6c0e6 100644 --- a/sw/airborne/firmwares/rotorcraft/actuators/supervision.c +++ b/sw/airborne/firmwares/rotorcraft/actuators/supervision.c @@ -64,7 +64,7 @@ * [SUPERVISION_MIN_MOTOR,SUPERVISION_MAX_MOTOR] * or sets it to SUPERVISION_STOP_MOTOR */ -#define SUPERVISION_CMD_SCALE (((float)(SUPERVISION_MAX_MOTOR - SUPERVISION_MIN_MOTOR) / MAX_PPRZ) /SUPERVISION_SCALE) +#define SUPERVISION_CMD_SCALE (SUPERVISION_MAX_MOTOR - SUPERVISION_MIN_MOTOR) / (MAX_PPRZ * SUPERVISION_SCALE) static const int32_t roll_coef[SUPERVISION_NB_MOTOR] = SUPERVISION_ROLL_COEF; static const int32_t pitch_coef[SUPERVISION_NB_MOTOR] = SUPERVISION_PITCH_COEF;