forked from Archive/PX4-Autopilot
guard against invalid yawmode values
This commit is contained in:
parent
ea1439c627
commit
2af066bc6a
|
@ -189,8 +189,9 @@ Mission::on_active()
|
|||
}
|
||||
|
||||
/* see if we need to update the current yaw heading for rotary wing types */
|
||||
if (_navigator->get_vstatus()->is_rotary_wing
|
||||
if (_navigator->get_vstatus()->is_rotary_wing
|
||||
&& _param_yawmode.get() != MISSION_YAWMODE_NONE
|
||||
&& _param_yawmode.get() < MISSION_YAWMODE_MAX
|
||||
&& _mission_type != MISSION_TYPE_NONE) {
|
||||
heading_sp_update();
|
||||
}
|
||||
|
|
|
@ -88,7 +88,8 @@ public:
|
|||
MISSION_YAWMODE_NONE = 0,
|
||||
MISSION_YAWMODE_FRONT_TO_WAYPOINT = 1,
|
||||
MISSION_YAWMODE_FRONT_TO_HOME = 2,
|
||||
MISSION_YAWMODE_BACK_TO_HOME = 3
|
||||
MISSION_YAWMODE_BACK_TO_HOME = 3,
|
||||
MISSION_YAWMODE_MAX = 4
|
||||
};
|
||||
|
||||
private:
|
||||
|
|
Loading…
Reference in New Issue