Sub: Change from labs to abs for floats

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
This commit is contained in:
Patrick José Pereira 2018-06-11 10:59:47 -03:00 committed by Francisco Ferreira
parent cbef5db174
commit d14b37e89c

View File

@ -789,7 +789,7 @@ bool Sub::verify_yaw()
}
// check if we are within 2 degrees of the target heading
return (labsf(wrap_180_cd(ahrs.yaw_sensor-yaw_look_at_heading)) <= 200);
return (fabsf(wrap_180_cd(ahrs.yaw_sensor-yaw_look_at_heading)) <= 200);
}
/********************************************************************************/