mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-23 08:15:26 +03:00
update
This commit is contained in:
parent
bb79ad8f02
commit
4a7a2a75b6
2 changed files with 11 additions and 5 deletions
|
@ -736,9 +736,12 @@ bool isFixedWingLandingDetected(void)
|
|||
DEBUG_SET(DEBUG_LANDING, 6, isRollAxisStatic);
|
||||
DEBUG_SET(DEBUG_LANDING, 7, isPitchAxisStatic);
|
||||
if (isRollAxisStatic && isPitchAxisStatic) {
|
||||
// Probably landed, low horizontal and vertical velocities and no axis rotation in Roll and Pitch
|
||||
timeMs_t safetyTimeDelay = 1000 + navConfig()->general.auto_disarm_delay;
|
||||
return currentTimeMs - fwLandingTimerStartAt > safetyTimeDelay; // check conditions stable for 1s + optional extra delay
|
||||
/* Probably landed, low horizontal and vertical velocities and no axis rotation in Roll and Pitch
|
||||
* Conditions need to be held for fixed safety time + optional extra delay.
|
||||
* Fixed time increased if velocities invalid to provide extra safety margin against false triggers */
|
||||
const uint16_t safetyTime = posControl.flags.estAltStatus == EST_NONE || posControl.flags.estVelStatus == EST_NONE ? 5000 : 1000;
|
||||
timeMs_t safetyTimeDelay = safetyTime + navConfig()->general.auto_disarm_delay;
|
||||
return currentTimeMs - fwLandingTimerStartAt > safetyTimeDelay;
|
||||
} else {
|
||||
fixAxisCheck = false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue