forked from Archive/PX4-Autopilot
FlightTaskManualAltitudeSmoothVel: remove separate reactivate handling
It was added before the activation was able to work with the previous setpoint.
This commit is contained in:
parent
9b92862980
commit
c20e5e3a00
|
@ -61,14 +61,6 @@ bool FlightTaskManualAltitudeSmoothVel::activate(const vehicle_local_position_se
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FlightTaskManualAltitudeSmoothVel::reActivate()
|
|
||||||
{
|
|
||||||
FlightTaskManualAltitude::reActivate();
|
|
||||||
// The task is reacivated while the vehicle is on the ground. To detect takeoff in mc_pos_control_main properly
|
|
||||||
// using the generated jerk, reset the z derivatives to zero
|
|
||||||
_smoothing.reset(0.f, 0.f, _position(2));
|
|
||||||
}
|
|
||||||
|
|
||||||
void FlightTaskManualAltitudeSmoothVel::_ekfResetHandlerPositionZ(float delta_z)
|
void FlightTaskManualAltitudeSmoothVel::_ekfResetHandlerPositionZ(float delta_z)
|
||||||
{
|
{
|
||||||
_smoothing.setCurrentPosition(_position(2));
|
_smoothing.setCurrentPosition(_position(2));
|
||||||
|
|
|
@ -49,7 +49,6 @@ public:
|
||||||
virtual ~FlightTaskManualAltitudeSmoothVel() = default;
|
virtual ~FlightTaskManualAltitudeSmoothVel() = default;
|
||||||
|
|
||||||
bool activate(const vehicle_local_position_setpoint_s &last_setpoint) override;
|
bool activate(const vehicle_local_position_setpoint_s &last_setpoint) override;
|
||||||
void reActivate() override;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void _updateSetpoints() override;
|
virtual void _updateSetpoints() override;
|
||||||
|
|
Loading…
Reference in New Issue