FlightTasks: use .xy() where possible

to take the first two elements of a Vector3f.
This commit is contained in:
Matthias Grob
2021-02-10 15:56:58 +01:00
parent 7686533abb
commit 82d6cc3dba
5 changed files with 10 additions and 11 deletions
@@ -112,8 +112,7 @@ void FlightTaskManualPosition::_scaleSticks()
// collision prevention
if (_collision_prevention.is_active()) {
_collision_prevention.modifySetpoint(vel_sp_xy, _velocity_scale, Vector2f(_position),
Vector2f(_velocity));
_collision_prevention.modifySetpoint(vel_sp_xy, _velocity_scale, _position.xy(), _velocity.xy());
}
_velocity_setpoint.xy() = vel_sp_xy;