mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-18 00:40:35 +08:00
Do not run transition flight task when not enable altitude control
This commit is contained in:
@@ -44,8 +44,6 @@ bool FlightTaskTransition::updateInitialize()
|
||||
|
||||
bool FlightTaskTransition::activate(const vehicle_local_position_setpoint_s &last_setpoint)
|
||||
{
|
||||
_transition_altitude = PX4_ISFINITE(last_setpoint.z) ? last_setpoint.z : _position(2);
|
||||
_transition_yaw = PX4_ISFINITE(last_setpoint.yaw) ? last_setpoint.yaw : _yaw;
|
||||
return FlightTask::activate(last_setpoint);
|
||||
}
|
||||
|
||||
|
||||
@@ -50,8 +50,4 @@ public:
|
||||
bool activate(const vehicle_local_position_setpoint_s &last_setpoint) override;
|
||||
bool updateInitialize() override;
|
||||
bool update() override;
|
||||
|
||||
private:
|
||||
float _transition_altitude = 0.0f;
|
||||
float _transition_yaw = 0.0f;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user