diff --git a/libraries/AP_Motors/AP_MotorsHeli_Dual.cpp b/libraries/AP_Motors/AP_MotorsHeli_Dual.cpp index d5f8b72b0bff95..820d103e5746d0 100644 --- a/libraries/AP_Motors/AP_MotorsHeli_Dual.cpp +++ b/libraries/AP_Motors/AP_MotorsHeli_Dual.cpp @@ -427,11 +427,7 @@ void AP_MotorsHeli_Dual::move_actuators(float roll_out, float pitch_out, float c } // updates below land min collective flag - if (collective_out <= _collective_land_min_pct) { - _heliflags.below_land_min_coll = true; - } else { - _heliflags.below_land_min_coll = false; - } + _heliflags.below_land_min_coll = !is_positive(collective_out - _collective_land_min_pct); // updates takeoff collective flag based on 50% hover collective update_takeoff_collective_flag(collective_out); diff --git a/libraries/AP_Motors/AP_MotorsHeli_Quad.cpp b/libraries/AP_Motors/AP_MotorsHeli_Quad.cpp index 172697acf53dcb..4aca86654a34f2 100644 --- a/libraries/AP_Motors/AP_MotorsHeli_Quad.cpp +++ b/libraries/AP_Motors/AP_MotorsHeli_Quad.cpp @@ -189,11 +189,7 @@ void AP_MotorsHeli_Quad::move_actuators(float roll_out, float pitch_out, float c } // updates below land min collective flag - if (collective_out <= _collective_land_min_pct) { - _heliflags.below_land_min_coll = true; - } else { - _heliflags.below_land_min_coll = false; - } + _heliflags.below_land_min_coll = !is_positive(collective_out - _collective_land_min_pct); // updates takeoff collective flag based on 50% hover collective update_takeoff_collective_flag(collective_out); diff --git a/libraries/AP_Motors/AP_MotorsHeli_Single.cpp b/libraries/AP_Motors/AP_MotorsHeli_Single.cpp index 6372363e37a43b..201132f938f3e1 100644 --- a/libraries/AP_Motors/AP_MotorsHeli_Single.cpp +++ b/libraries/AP_Motors/AP_MotorsHeli_Single.cpp @@ -394,11 +394,7 @@ void AP_MotorsHeli_Single::move_actuators(float roll_out, float pitch_out, float } // updates below land min collective flag - if (collective_out <= _collective_land_min_pct) { - _heliflags.below_land_min_coll = true; - } else { - _heliflags.below_land_min_coll = false; - } + _heliflags.below_land_min_coll = !is_positive(collective_out - _collective_land_min_pct); // updates takeoff collective flag based on 50% hover collective update_takeoff_collective_flag(collective_out);