FlightTaskManualAltitudeSmoothVel: remove separate reactivate handling

It was added before the activation was able to work with the previous
setpoint.
This commit is contained in:
Matthias Grob 2021-08-04 18:28:36 +02:00 committed by Daniel Agar
parent 9b92862980
commit c20e5e3a00
2 changed files with 0 additions and 9 deletions

View File

@ -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));

View File

@ -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;