mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-17 05:15:23 +03:00
Merge pull request #8601 from breadoven/abo_throttle_low_cleanup
Throttle low clean up
This commit is contained in:
commit
7b53373921
11 changed files with 46 additions and 55 deletions
|
@ -686,12 +686,11 @@ bool isFixedWingLandingDetected(void)
|
|||
{
|
||||
DEBUG_SET(DEBUG_LANDING, 4, 0);
|
||||
static bool fixAxisCheck = false;
|
||||
const bool throttleIsLow = calculateThrottleStatus(THROTTLE_STATUS_TYPE_RC) == THROTTLE_LOW;
|
||||
|
||||
// Basic condition to start looking for landing
|
||||
bool startCondition = (navGetCurrentStateFlags() & (NAV_CTL_LAND | NAV_CTL_EMERG))
|
||||
|| FLIGHT_MODE(FAILSAFE_MODE)
|
||||
|| (!navigationIsControllingThrottle() && throttleIsLow);
|
||||
|| (!navigationIsControllingThrottle() && throttleStickIsLow());
|
||||
|
||||
if (!startCondition || posControl.flags.resetLandingDetector) {
|
||||
return fixAxisCheck = posControl.flags.resetLandingDetector = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue