Land detector: Fix code style

This commit is contained in:
Lorenz Meier
2017-01-17 21:48:01 +01:00
parent 3fe45697bb
commit 58983e4c52
+3 -3
View File
@@ -121,13 +121,13 @@ void LandDetector::_cycle()
bool landDetected = (_state == LandDetectionState::LANDED);
bool freefallDetected = (_state == LandDetectionState::FREEFALL);
bool groundContactDetected = ( _state == LandDetectionState::GROUND_CONTACT);
bool groundContactDetected = (_state == LandDetectionState::GROUND_CONTACT);
// Only publish very first time or when the result has changed.
if ((_landDetectedPub == nullptr) ||
(_landDetected.landed != landDetected) ||
(_landDetected.freefall != freefallDetected) ||
(_landDetected.ground_contact != groundContactDetected)) {
(_landDetected.ground_contact != groundContactDetected)) {
_landDetected.timestamp = hrt_absolute_time();
_landDetected.landed = (_state == LandDetectionState::LANDED);
@@ -186,7 +186,7 @@ void LandDetector::_update_state()
/* need to set ground_contact_state to false */
_ground_contact_hysteresis.set_state_and_update(false);
} else if (_ground_contact_hysteresis.get_state()){
} else if (_ground_contact_hysteresis.get_state()) {
_state = LandDetectionState::GROUND_CONTACT;
} else {