FlightTaskManualStabilzied: check for absolute yaw

This commit is contained in:
Dennis Mannhart 2018-04-30 11:58:47 +02:00 committed by Lorenz Meier
parent cfa412b55f
commit 742e9f7b15

View File

@ -75,7 +75,7 @@ void FlightTaskManualStabilized::_updateHeadingSetpoints()
/* Yaw-lock depends on stick input. If not locked,
* yaw_sp is set to NAN.
* TODO: add yawspeed to get threshold.*/
if (_yawspeed_setpoint > FLT_EPSILON) {
if (fabsf(_yawspeed_setpoint) > FLT_EPSILON) {
// no fixed heading when rotating around yaw by stick
_yaw_setpoint = NAN;