mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-15 16:53:33 +08:00
mixer: use an enum for airmode
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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));
|
||||
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user