1
0
Fork 0
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:
breadoven 2020-12-15 09:14:47 +00:00
parent ec693daeb6
commit b0d75aa6cd

View file

@ -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;
}