land detector move hysteresis constants into FW and MC

This commit is contained in:
Daniel Agar
2017-08-15 10:58:29 -04:00
parent fd8a5644e8
commit 90819b2852
6 changed files with 25 additions and 18 deletions
@@ -108,6 +108,11 @@ MulticopterLandDetector::MulticopterLandDetector() :
_paramHandle.altitude_max = param_find("LNDMC_ALT_MAX");
_paramHandle.manual_stick_up_position_takeoff_threshold = param_find("LNDMC_POS_UPTHR");
_paramHandle.landSpeed = param_find("MPC_LAND_SPEED");
// Use Trigger time when transitioning from in-air (false) to landed (true) / ground contact (true).
_landed_hysteresis.set_hysteresis_time_from(false, LAND_DETECTOR_TRIGGER_TIME_US);
_maybe_landed_hysteresis.set_hysteresis_time_from(false, MAYBE_LAND_DETECTOR_TRIGGER_TIME_US);
_ground_contact_hysteresis.set_hysteresis_time_from(false, GROUND_CONTACT_TRIGGER_TIME_US);
}
void MulticopterLandDetector::_initialize_topics()