LandDetector: use a 64bit counter for total system flight time

The previous 32bit counter wrapped in ~1.19h, this switches to 2 32bit
counters, wrapping in 584942 years.
This commit is contained in:
Beat Küng
2017-02-02 09:22:25 +01:00
committed by Lorenz Meier
parent 05b649cc86
commit 3dc6e7b574
3 changed files with 29 additions and 7 deletions
+3 -2
View File
@@ -166,8 +166,9 @@ private:
bool _taskShouldExit;
bool _taskIsRunning;
param_t _p_total_flight_time;
int32_t _total_flight_time;
param_t _p_total_flight_time_high;
param_t _p_total_flight_time_low;
uint64_t _total_flight_time; ///< in microseconds
hrt_abstime _takeoff_time;
struct work_s _work;