Land detector: fix code style

This commit is contained in:
Lorenz Meier
2016-04-29 15:01:39 +02:00
parent a741257293
commit 1b11049e42
2 changed files with 7 additions and 6 deletions
+4 -5
View File
@@ -51,11 +51,10 @@ namespace landdetection
LandDetector::LandDetector() : LandDetector::LandDetector() :
_landDetectedPub(0), _landDetectedPub(0),
_landDetected( {0, false}), _landDetected( {0, false}),
_arming_time(0), _arming_time(0),
_taskShouldExit(false), _taskShouldExit(false),
_taskIsRunning(false), _taskIsRunning(false),
_work{} _work{} {
{
// ctor // ctor
} }
@@ -165,6 +165,7 @@ bool MulticopterLandDetector::get_landed_state()
if (minimalThrust && _min_trust_start == 0) { if (minimalThrust && _min_trust_start == 0) {
_min_trust_start = now; _min_trust_start = now;
} else if (!minimalThrust) { } else if (!minimalThrust) {
_min_trust_start = 0; _min_trust_start = 0;
} }
@@ -197,8 +198,9 @@ bool MulticopterLandDetector::get_landed_state()
// falling consider it to be landed. This should even sustain // falling consider it to be landed. This should even sustain
// quite acrobatic flight. // quite acrobatic flight.
if ((_min_trust_start > 0) && if ((_min_trust_start > 0) &&
(hrt_elapsed_time(&_min_trust_start) > 8 * 1000 * 1000)) { (hrt_elapsed_time(&_min_trust_start) > 8 * 1000 * 1000)) {
return !get_freefall_state(); return !get_freefall_state();
} else { } else {
return false; return false;
} }