FlightTasks: move stick handling into library

This commit is contained in:
Matthias Grob
2020-07-14 18:07:09 +02:00
committed by Julian Kent
parent 49a543e1b2
commit 9daff24e79
11 changed files with 202 additions and 105 deletions
@@ -82,7 +82,7 @@ void FlightTaskManualPosition::_scaleSticks()
FlightTaskManualAltitude::_scaleSticks();
/* Constrain length of stick inputs to 1 for xy*/
Vector2f stick_xy = _sticks_expo.slice<2, 1>(0, 0);
Vector2f stick_xy = _sticks.getPositionExpo().slice<2, 1>(0, 0);
const float mag = math::constrain(stick_xy.length(), 0.0f, 1.0f);