mixer: use an enum for airmode

This commit is contained in:
Beat Küng
2018-12-13 09:50:07 +01:00
parent 9406fa5246
commit 19ccab28bb
11 changed files with 33 additions and 26 deletions
@@ -569,14 +569,15 @@ PARAM_DEFINE_FLOAT(MC_DTERM_CUTOFF, 30.f);
*
* The air-mode enables the mixer to increase the total thrust of the multirotor
* in order to keep attitude and rate control even at low and high throttle.
*
* This function should be disabled during tuning as it will help the controller
* to diverge if the closed-loop is unstable.
* to diverge if the closed-loop is unstable (i.e. the vehicle is not tuned yet).
*
* 0 = Disabled, 1 = Roll/Pitch, 2 = Roll/Pitch/Yaw
* Enabling air-mode for yaw requires the use of an arming switch.
*
* @min 0
* @max 2
* @decimal 0
* @value 0 Disabled
* @value 1 Roll/Pitch
* @value 2 Roll/Pitch/Yaw
* @group Multicopter Attitude Control
*/
PARAM_DEFINE_INT32(MC_AIRMODE, 0);
+1 -1
View File
@@ -259,7 +259,7 @@ mixer_tick(void)
/*
* Update air-mode parameter
*/
mixer_group.set_airmode(REG_TO_BOOL(r_setup_airmode));
mixer_group.set_airmode((Mixer::Airmode)REG_TO_SIGNED(r_setup_airmode));
/*