land detector clang-tidy trivial changes

This commit is contained in:
Daniel Agar
2017-08-15 12:58:11 -04:00
parent 6e402bd6f4
commit f67ac8ba00
7 changed files with 18 additions and 34 deletions
@@ -291,14 +291,7 @@ bool MulticopterLandDetector::_get_maybe_landed_state()
// if this persists for 8 seconds AND the drone is not
// falling consider it to be landed. This should even sustain
// quite acrobatic flight.
if ((_min_trust_start > 0) &&
(hrt_elapsed_time(&_min_trust_start) > 8000000)) {
return true;
} else {
return false;
}
return (_min_trust_start > 0) && (hrt_elapsed_time(&_min_trust_start) > 8000000);
}
if (_ground_contact_hysteresis.get_state() && _has_minimal_thrust() && !rotating) {
@@ -416,4 +409,4 @@ bool MulticopterLandDetector::_has_minimal_thrust()
return _actuators.control[3] <= sys_min_throttle;
}
}
} // namespace land_detector