2022-05-30 06:26:55 -03:00
|
|
|
//
|
|
|
|
// functions to support precision landing
|
|
|
|
//
|
|
|
|
|
|
|
|
#include "Rover.h"
|
|
|
|
|
2023-03-22 05:45:41 -03:00
|
|
|
#if AC_PRECLAND_ENABLED
|
2022-05-30 06:26:55 -03:00
|
|
|
|
|
|
|
void Rover::init_precland()
|
|
|
|
{
|
2024-09-22 00:46:09 -03:00
|
|
|
// scheduler table specifies 400Hz, but we can call it no faster
|
|
|
|
// than the scheduler loop rate:
|
|
|
|
rover.precland.init(MIN(400, scheduler.get_loop_rate_hz()));
|
2022-05-30 06:26:55 -03:00
|
|
|
}
|
|
|
|
|
|
|
|
void Rover::update_precland()
|
|
|
|
{
|
|
|
|
// alt will be unused if we pass false through as the second parameter:
|
|
|
|
return precland.update(0, false);
|
|
|
|
}
|
|
|
|
#endif
|