mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-21 01:12:11 +00:00
FlightTasks: fix reActivate not calling the parent overrided method
This commit is contained in:
@@ -72,6 +72,8 @@ bool FlightTaskAutoLineSmoothVel::activate(const vehicle_local_position_setpoint
|
||||
|
||||
void FlightTaskAutoLineSmoothVel::reActivate()
|
||||
{
|
||||
FlightTaskAutoMapper::reActivate();
|
||||
|
||||
// On ground, reset acceleration and velocity to zero
|
||||
for (int i = 0; i < 2; ++i) {
|
||||
_trajectory[i].reset(0.f, 0.f, _position(i));
|
||||
|
||||
@@ -63,6 +63,7 @@ bool FlightTaskManualAltitudeSmoothVel::activate(const vehicle_local_position_se
|
||||
|
||||
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));
|
||||
|
||||
@@ -66,6 +66,7 @@ bool FlightTaskManualPositionSmoothVel::activate(const vehicle_local_position_se
|
||||
|
||||
void FlightTaskManualPositionSmoothVel::reActivate()
|
||||
{
|
||||
FlightTaskManualPosition::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_xy.reset(Vector2f(), Vector2f(_velocity), Vector2f(_position));
|
||||
|
||||
Reference in New Issue
Block a user