Browse Source

LandDetector: save & initialize total flight time

sbg
Beat Küng 8 years ago committed by Lorenz Meier
parent
commit
c715228b8f
  1. 3
      src/modules/land_detector/LandDetector.cpp

3
src/modules/land_detector/LandDetector.cpp

@ -60,6 +60,8 @@ LandDetector::LandDetector() : @@ -60,6 +60,8 @@ LandDetector::LandDetector() :
_ground_contact_hysteresis(true),
_taskShouldExit(false),
_taskIsRunning(false),
_total_flight_time{0},
_takeoff_time{0},
_work{}
{
// Use Trigger time when transitioning from in-air (false) to landed (true) / ground contact (true).
@ -150,6 +152,7 @@ void LandDetector::_cycle() @@ -150,6 +152,7 @@ void LandDetector::_cycle()
param_set_no_notification(_p_total_flight_time_high, &flight_time);
flight_time = _total_flight_time & 0xffffffff;
param_set_no_notification(_p_total_flight_time_low, &flight_time);
param_save_default();
}
_landDetected.timestamp = hrt_absolute_time();

Loading…
Cancel
Save