1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-19 22:35:19 +03:00

landing tweaks

This commit is contained in:
breadoven 2023-01-24 14:21:13 +00:00
parent aa8fcc2991
commit 3560bb57ea
5 changed files with 6 additions and 5 deletions

View file

@ -2688,7 +2688,7 @@ Delay before craft disarms when `nav_disarm_on_landing` is set (ms)
| Default | Min | Max |
| --- | --- | --- |
| 2000 | 100 | 10000 |
| 1000 | 100 | 10000 |
---

View file

@ -50,6 +50,7 @@ static const OSD_Entry cmsx_menuNavSettingsEntries[] =
OSD_SETTING_ENTRY("MC MAX BANK ANGLE", SETTING_NAV_MC_BANK_ANGLE),
OSD_SETTING_ENTRY("MID THR FOR AH", SETTING_NAV_USE_MIDTHR_FOR_ALTHOLD),
OSD_SETTING_ENTRY("MC HOVER THR", SETTING_NAV_MC_HOVER_THR),
OSD_SETTING_ENTRY("LANDING DISARM", SETTING_NAV_DISARM_ON_LANDING),
OSD_BACK_AND_END_ENTRY,
};

View file

@ -2563,7 +2563,7 @@ groups:
max: 45
- name: nav_auto_disarm_delay
description: "Delay before craft disarms when `nav_disarm_on_landing` is set (ms)"
default_value: 2000
default_value: 1000
field: general.auto_disarm_delay
min: 100
max: 10000

View file

@ -737,8 +737,8 @@ bool isFixedWingLandingDetected(void)
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 = 2000 + navConfig()->general.auto_disarm_delay;
return currentTimeMs - fwLandingTimerStartAt > safetyTimeDelay; // check conditions stable for 2s + optional extra delay
timeMs_t safetyTimeDelay = 1000 + navConfig()->general.auto_disarm_delay;
return currentTimeMs - fwLandingTimerStartAt > safetyTimeDelay; // check conditions stable for 1s + optional extra delay
} else {
fixAxisCheck = false;
}

View file

@ -798,7 +798,7 @@ bool isMulticopterLandingDetected(void)
DEBUG_SET(DEBUG_LANDING, 5, possibleLandingDetected);
if (possibleLandingDetected) {
timeUs_t safetyTimeDelay = MS2US(2000 + navConfig()->general.auto_disarm_delay); // check conditions stable for 2s + optional extra delay
timeUs_t safetyTimeDelay = MS2US(1000 + navConfig()->general.auto_disarm_delay); // check conditions stable for 1s + optional extra delay
return (currentTimeUs - landingDetectorStartedAt > safetyTimeDelay);
} else {
landingDetectorStartedAt = currentTimeUs;