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

View File

@ -51,11 +51,10 @@ namespace landdetection
LandDetector::LandDetector() :
_landDetectedPub(0),
_landDetected( {0, false}),
_arming_time(0),
_taskShouldExit(false),
_taskIsRunning(false),
_work{}
{
_arming_time(0),
_taskShouldExit(false),
_taskIsRunning(false),
_work{} {
// ctor
}

View File

@ -165,6 +165,7 @@ bool MulticopterLandDetector::get_landed_state()
if (minimalThrust && _min_trust_start == 0) {
_min_trust_start = now;
} else if (!minimalThrust) {
_min_trust_start = 0;
}
@ -197,8 +198,9 @@ bool MulticopterLandDetector::get_landed_state()
// falling consider it to be landed. This should even sustain
// quite acrobatic flight.
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();
} else {
return false;
}