mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-08 08:53:56 -04:00
Copter: support height based landing gear
This commit is contained in:
parent
432d786f82
commit
144e1945c6
@ -28,4 +28,14 @@ void Copter::landinggear_update()
|
|||||||
}
|
}
|
||||||
|
|
||||||
last_deploy_status = landinggear.deployed();
|
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);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user