1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-25 01:05:21 +03:00

add flown loiter radius for fixed wing

This commit is contained in:
breadoven 2024-06-29 13:43:10 +01:00
parent 41c89a7784
commit 817981fa4b
4 changed files with 65 additions and 51 deletions

View file

@ -5074,5 +5074,12 @@ bool canFwLandingBeCancelled(void)
{
return FLIGHT_MODE(NAV_FW_AUTOLAND) && posControl.navState != NAV_STATE_FW_LANDING_FLARE;
}
#endif
uint16_t getFlownLoiterRadius(void)
{
if (STATE(AIRPLANE) && navGetCurrentStateFlags() & NAV_CTL_HOLD) {
return CENTIMETERS_TO_METERS(calculateDistanceToDestination(&posControl.desiredState.pos));
}
return 0;
}