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
@@ -178,10 +178,23 @@ PARAM_DEFINE_FLOAT(LNDFW_AIRSPD_MAX, 8.00f);
/**
* Total flight time in microseconds
*
* Total flight time of this autopilot.
* Total flight time of this autopilot. Higher 32 bits of the value.
* Flight time in microseconds = (LND_FLIGHT_T_HI << 32) | LND_FLIGHT_T_LO.
*
* @min 0
* @group Land Detector
*
*/
PARAM_DEFINE_INT32(LND_FLIGHT_TIME, 0);
PARAM_DEFINE_INT32(LND_FLIGHT_T_HI, 0);
/**
* Total flight time in microseconds
*
* Total flight time of this autopilot. Lower 32 bits of the value.
* Flight time in microseconds = (LND_FLIGHT_T_HI << 32) | LND_FLIGHT_T_LO.
*
* @min 0
* @group Land Detector
*
*/
PARAM_DEFINE_INT32(LND_FLIGHT_T_LO, 0);