mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-23 00:05:28 +03:00
update
This commit is contained in:
parent
dfabcbdd1d
commit
5a4f3190d5
2 changed files with 2 additions and 2 deletions
|
@ -2808,7 +2808,7 @@ void updateLandingStatus(timeMs_t currentTimeMs)
|
||||||
}
|
}
|
||||||
|
|
||||||
static timeMs_t lastUpdateTimeMs = 0;
|
static timeMs_t lastUpdateTimeMs = 0;
|
||||||
if (currentTimeMs < lastUpdateTimeMs + HZ2MS(100)) { // limit update to 100Hz
|
if ((currentTimeMs - lastUpdateTimeMs) <= HZ2MS(100)) { // limit update to 100Hz
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
lastUpdateTimeMs = currentTimeMs;
|
lastUpdateTimeMs = currentTimeMs;
|
||||||
|
|
|
@ -711,7 +711,7 @@ bool isFixedWingLandingDetected(void)
|
||||||
static int16_t fwLandSetPitchDatum;
|
static int16_t fwLandSetPitchDatum;
|
||||||
const float sensitivity = navConfig()->general.land_detect_sensitivity / 5.0f;
|
const float sensitivity = navConfig()->general.land_detect_sensitivity / 5.0f;
|
||||||
|
|
||||||
timeMs_t currentTimeMs = millis();
|
const timeMs_t currentTimeMs = millis();
|
||||||
|
|
||||||
// Check horizontal and vertical velocities are low (cm/s)
|
// Check horizontal and vertical velocities are low (cm/s)
|
||||||
bool velCondition = fabsf(navGetCurrentActualPositionAndVelocity()->vel.z) < (50.0f * sensitivity) &&
|
bool velCondition = fabsf(navGetCurrentActualPositionAndVelocity()->vel.z) < (50.0f * sensitivity) &&
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue