diff --git a/ArduCopter/landing_gear.cpp b/ArduCopter/landing_gear.cpp index ca19cc1fca..a8158ca8ee 100644 --- a/ArduCopter/landing_gear.cpp +++ b/ArduCopter/landing_gear.cpp @@ -28,4 +28,14 @@ void Copter::landinggear_update() } last_deploy_status = landinggear.deployed(); + + // support height based triggering + float height; + if (rangefinder_alt_ok()) { + height = rangefinder_state.alt_cm_filt.get() * 0.01; + } else { + height = current_loc.alt * 0.01; + } + + landinggear.update(height); }