From 1c131f252338dfa385f549d5efed136fe5826b5b Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Sun, 29 Jan 2017 11:40:52 +0100 Subject: [PATCH] Land detector: Accumulate total flight time between flights --- src/modules/land_detector/LandDetector.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/land_detector/LandDetector.cpp b/src/modules/land_detector/LandDetector.cpp index 389ad4344f..2007218016 100644 --- a/src/modules/land_detector/LandDetector.cpp +++ b/src/modules/land_detector/LandDetector.cpp @@ -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); }