mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-23 16:25:26 +03:00
Better detection for THR control from the NAV system
As requested by @digitalentity. Previous code was returning a false positive on MC when only 2D position hold was active.
This commit is contained in:
parent
47fc453727
commit
deb3385616
1 changed files with 2 additions and 1 deletions
|
@ -2695,7 +2695,8 @@ rthState_e getStateOfForcedRTH(void)
|
||||||
|
|
||||||
bool navigationIsControllingThrottle(void)
|
bool navigationIsControllingThrottle(void)
|
||||||
{
|
{
|
||||||
return posControl.navState != NAV_STATE_IDLE;
|
navigationFSMStateFlags_t stateFlags = navGetCurrentStateFlags();
|
||||||
|
return (stateFlags & (NAV_CTL_ALT | NAV_CTL_EMERG | NAV_CTL_LAUNCH | NAV_CTL_LAND)) || (STATE(FIXED_WING) && (stateFlags & (NAV_CTL_POS)));
|
||||||
}
|
}
|
||||||
|
|
||||||
#else // NAV
|
#else // NAV
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue