mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
Land detector: fix code style
This commit is contained in:
parent
a741257293
commit
1b11049e42
@ -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
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user