mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 09:03:34 +08:00
Refactor: Use new matrix::Vector2f constructor
This commit is contained in:
committed by
Daniel Agar
parent
ada0179cda
commit
bee6a6b8b0
@@ -101,7 +101,7 @@ void FlightTaskManualAltitude::_updateAltitudeLock()
|
||||
// when terrain hold behaviour has been selected.
|
||||
if (MPC_ALT_MODE.get() == 2) {
|
||||
// Use horizontal speed as a transition criteria
|
||||
float spd_xy = Vector2f(&_velocity(0)).length();
|
||||
float spd_xy = Vector2f(_velocity).length();
|
||||
|
||||
// Use presence of horizontal stick inputs as a transition criteria
|
||||
float stick_xy = Vector2f(&_sticks_expo(0)).length();
|
||||
@@ -260,7 +260,7 @@ void FlightTaskManualAltitude::_updateSetpoints()
|
||||
// thrust along xy is demanded. The maximum thrust along xy depends on the thrust
|
||||
// setpoint along z-direction, which is computed in PositionControl.cpp.
|
||||
|
||||
Vector2f sp{_sticks(0), _sticks(1)};
|
||||
Vector2f sp(&_sticks(0));
|
||||
_rotateIntoHeadingFrame(sp);
|
||||
|
||||
if (sp.length() > 1.0f) {
|
||||
|
||||
Reference in New Issue
Block a user