2019-06-18 15:29:05 -03:00
|
|
|
//
|
|
|
|
// functions to support precision landing
|
|
|
|
//
|
|
|
|
|
|
|
|
#include "Copter.h"
|
|
|
|
|
2023-03-22 05:45:41 -03:00
|
|
|
#if AC_PRECLAND_ENABLED
|
2019-06-18 15:29:05 -03:00
|
|
|
|
|
|
|
void Copter::init_precland()
|
|
|
|
{
|
|
|
|
copter.precland.init(400);
|
|
|
|
}
|
|
|
|
|
|
|
|
void Copter::update_precland()
|
|
|
|
{
|
2021-04-14 01:02:18 -03:00
|
|
|
// alt will be unused if we pass false through as the second parameter:
|
|
|
|
return precland.update(rangefinder_state.alt_cm_glitch_protected,
|
|
|
|
rangefinder_alt_ok());
|
2019-06-18 15:29:05 -03:00
|
|
|
}
|
|
|
|
#endif
|