mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-17 13:25:27 +03:00
first update
This commit is contained in:
parent
4f49dfb621
commit
a7cef4708e
11 changed files with 40 additions and 45 deletions
|
@ -685,12 +685,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