mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-24 14:23:34 +08:00
flight_mode_manager: call direct parent instead of grandparent
FlightTaskManualAcceleration and FlightTaskOrbit both inherit from FlightTaskManualAltitudeSmoothVel but were calling FlightTask and FlightTaskManualAltitude respectively, skipping the intermediate parent's overrides (smoothing velocity init, parameter chain). Fix the DEFINE_PARAMETERS_CUSTOM_PARENT macro argument and the activate() call to use FlightTaskManualAltitudeSmoothVel. Fixes bugprone-parent-virtual-call clang-tidy diagnostic. Signed-off-by: Ramon Roche <mrpollo@gmail.com>
This commit is contained in:
@@ -173,7 +173,7 @@ void FlightTaskOrbit::_sanitizeParams(float &radius, float &velocity) const
|
||||
|
||||
bool FlightTaskOrbit::activate(const trajectory_setpoint_s &last_setpoint)
|
||||
{
|
||||
bool ret = FlightTaskManualAltitude::activate(last_setpoint);
|
||||
bool ret = FlightTaskManualAltitudeSmoothVel::activate(last_setpoint);
|
||||
_currently_orbiting = false;
|
||||
_orbit_radius = _radius_min;
|
||||
_orbit_velocity = 1.f;
|
||||
|
||||
Reference in New Issue
Block a user