1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-30 15:52:12 +01:00

When moving waypoints on the map, keep the previous altitude

This commit is contained in:
James Cotton 2012-06-15 13:15:45 -05:00
parent 1ac807e1e0
commit 62436270e3

View File

@ -188,7 +188,8 @@ void PathCompiler::doUpdateWaypoints(PathCompiler::waypoint changedWaypoint, int
Waypoint::DataFields oldWaypointUAVO = waypointInst->getData();
oldWaypointUAVO.Position[0] = changedWaypointUAVO.Position[0];
oldWaypointUAVO.Position[1] = changedWaypointUAVO.Position[1];
oldWaypointUAVO.Position[2] = changedWaypointUAVO.Position[2];
// Don't take the altitude from the map for now
waypointInst->setData(oldWaypointUAVO);
waypointInst->updated();
}