forked from Archive/PX4-Autopilot
Land detector: Accumulate total flight time between flights
This commit is contained in:
parent
35efe651ac
commit
1c131f2523
|
@ -143,7 +143,7 @@ void LandDetector::_cycle()
|
||||||
_takeoff_time = now;
|
_takeoff_time = now;
|
||||||
|
|
||||||
} else if (_takeoff_time != 0 && !landDetected && _landDetected.landed) {
|
} else if (_takeoff_time != 0 && !landDetected && _landDetected.landed) {
|
||||||
_total_flight_time = now - _takeoff_time;
|
_total_flight_time += now - _takeoff_time;
|
||||||
_takeoff_time = 0;
|
_takeoff_time = 0;
|
||||||
param_set(_p_total_flight_time, &_total_flight_time);
|
param_set(_p_total_flight_time, &_total_flight_time);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue