mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-07 01:04:19 +08:00
Land detector: Accumulate total flight time between flights
This commit is contained in:
@@ -143,7 +143,7 @@ void LandDetector::_cycle()
|
||||
_takeoff_time = now;
|
||||
|
||||
} else if (_takeoff_time != 0 && !landDetected && _landDetected.landed) {
|
||||
_total_flight_time = now - _takeoff_time;
|
||||
_total_flight_time += now - _takeoff_time;
|
||||
_takeoff_time = 0;
|
||||
param_set(_p_total_flight_time, &_total_flight_time);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user