1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-24 08:45:31 +03:00

Disable user-activated motor-stop if navigation system is in autonomous mode (RTH or WP)

This commit is contained in:
Konstantin Sharlaimov (DigitalEntity) 2017-10-05 22:37:47 +10:00
parent 0dfef47cea
commit 0778619547
3 changed files with 10 additions and 1 deletions

View file

@ -2699,6 +2699,12 @@ bool navigationIsControllingThrottle(void)
return (stateFlags & (NAV_CTL_ALT | NAV_CTL_EMERG | NAV_CTL_LAUNCH | NAV_CTL_LAND)) || (STATE(FIXED_WING) && (stateFlags & (NAV_CTL_POS)));
}
bool navigationIsFlyingAutonomousMode(void)
{
navigationFSMStateFlags_t stateFlags = navGetCurrentStateFlags();
return (stateFlags & (NAV_AUTO_RTH | NAV_AUTO_WP));
}
#else // NAV
#ifdef GPS