mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-26 01:33:56 -04:00
Sub: Simplify return logic
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
This commit is contained in:
parent
87c09f98cc
commit
cbef5db174
@ -789,11 +789,7 @@ bool Sub::verify_yaw()
|
||||
}
|
||||
|
||||
// check if we are within 2 degrees of the target heading
|
||||
if (labs(wrap_180_cd(ahrs.yaw_sensor-yaw_look_at_heading)) <= 200) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
return (labsf(wrap_180_cd(ahrs.yaw_sensor-yaw_look_at_heading)) <= 200);
|
||||
}
|
||||
|
||||
/********************************************************************************/
|
||||
|
Loading…
Reference in New Issue
Block a user