mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-19 06:15:14 +03:00
Update navigation.c
This commit is contained in:
parent
ec693daeb6
commit
b0d75aa6cd
1 changed files with 4 additions and 2 deletions
|
@ -2839,10 +2839,12 @@ void setWaypoint(uint8_t wpNumber, const navWaypoint_t * wpData)
|
|||
posControl.waypointList[wpNumber - 1] = *wpData;
|
||||
|
||||
if(wpData->action == NAV_WP_ACTION_SET_POI || wpData->action == NAV_WP_ACTION_SET_HEAD || wpData->action == NAV_WP_ACTION_JUMP) {
|
||||
nonGeoWaypointCount += 1;
|
||||
if(wpData->action == NAV_WP_ACTION_JUMP) {
|
||||
posControl.waypointList[wpNumber - 1].p1 -= 1; // make index (vice WP #)
|
||||
}
|
||||
nonGeoWaypointCount += 1;
|
||||
} else {
|
||||
posControl.waypointList[wpNumber - 1].p3 = wpNumber - nonGeoWaypointCount;
|
||||
}
|
||||
} else {
|
||||
posControl.waypointList[wpNumber - 1].p3 = wpNumber - nonGeoWaypointCount;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue