mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-26 01:35:35 +03:00
Fix trackback error
This commit is contained in:
parent
75ea2ce417
commit
6f4ff6b4de
1 changed files with 2 additions and 5 deletions
|
@ -1448,10 +1448,7 @@ static navigationFSMEvent_t navOnEnteringState_NAV_STATE_RTH_INITIALIZE(navigati
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Switch to RTH trackback
|
// Switch to RTH trackback
|
||||||
bool trackbackActive = navConfig()->general.flags.rth_trackback_mode == RTH_TRACKBACK_ON ||
|
if (rthTrackBackIsActive() && rth_trackback.activePointIndex >= 0 && !isWaypointMissionRTHActive()) {
|
||||||
(navConfig()->general.flags.rth_trackback_mode == RTH_TRACKBACK_FS && posControl.flags.forcedRTHActivated);
|
|
||||||
|
|
||||||
if (trackbackActive && rth_trackback.activePointIndex >= 0 && !isWaypointMissionRTHActive()) {
|
|
||||||
rthTrackBackUpdate(true); // save final trackpoint for altitude and max trackback distance reference
|
rthTrackBackUpdate(true); // save final trackpoint for altitude and max trackback distance reference
|
||||||
posControl.flags.rthTrackbackActive = true;
|
posControl.flags.rthTrackbackActive = true;
|
||||||
calculateAndSetActiveWaypointToLocalPosition(getRthTrackBackPosition());
|
calculateAndSetActiveWaypointToLocalPosition(getRthTrackBackPosition());
|
||||||
|
@ -3200,7 +3197,7 @@ bool rthAltControlStickOverrideCheck(uint8_t axis)
|
||||||
(axis == ROLL && STATE(MULTIROTOR) && !posControl.flags.rthTrackbackActive)) {
|
(axis == ROLL && STATE(MULTIROTOR) && !posControl.flags.rthTrackbackActive)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static timeMs_t rthOverrideStickHoldStartTime[2];
|
static timeMs_t rthOverrideStickHoldStartTime[2];
|
||||||
|
|
||||||
if (rxGetChannelValue(axis) > rxConfig()->maxcheck) {
|
if (rxGetChannelValue(axis) > rxConfig()->maxcheck) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue