mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-26 09:45:33 +03:00
Update navigation.c
This commit is contained in:
parent
2056a4220f
commit
b3f6e6c1e7
1 changed files with 11 additions and 1 deletions
|
@ -2643,7 +2643,12 @@ static bool rthAltControlStickOverrideCheck(unsigned axis)
|
|||
* --------------------------------------------------------------------------------- */
|
||||
static void updateRthTrackback(bool forceSaveTrackPoint)
|
||||
{
|
||||
if (navConfig()->general.flags.rth_trackback_mode == RTH_TRACKBACK_OFF || FLIGHT_MODE(NAV_RTH_MODE) || !ARMING_FLAG(ARMED)) {
|
||||
static bool suspendTracking = false;
|
||||
if (!(isNavHoldPositionActive() && STATE(AIRPLANE)) && suspendTracking) {
|
||||
suspendTracking = false;
|
||||
}
|
||||
|
||||
if (navConfig()->general.flags.rth_trackback_mode == RTH_TRACKBACK_OFF || FLIGHT_MODE(NAV_RTH_MODE) || !ARMING_FLAG(ARMED || suspendTracking)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2692,6 +2697,11 @@ static bool rthAltControlStickOverrideCheck(unsigned axis)
|
|||
saveTrackpoint = calculateDistanceToDestination(&posControl.rthTBPointsList[posControl.activeRthTBPointIndex]) > METERS_TO_CENTIMETERS(20);
|
||||
previousTBTripDist = posControl.totalTripDistance;
|
||||
}
|
||||
|
||||
// Suspend tracking during loiter on fixed wing saving trackpoint when loiter enabled
|
||||
if (distanceIncrement && isNavHoldPositionActive() && STATE(AIRPLANE)) {
|
||||
saveTrackpoint = suspendTracking = true;
|
||||
}
|
||||
}
|
||||
|
||||
// when trackpoint store full, overwrite from start of store using 'rthTBWrapAroundCounter' to track overwrite position
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue