Skip to content

Commit

Permalink
WPOverlay: treat VTOL_LAND like LAND
Browse files Browse the repository at this point in the history
Don't draw connecting lines from a VTOL_LAND to the next waypoint.
  • Loading branch information
robertlong13 committed Nov 17, 2023
1 parent c69793a commit 37e5418
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ExtLibs/Maps/WPOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public void CreateOverlay(PointLatLngAlt home, List<Locationwp> missionitems, do
|| command == (ushort) MAVLink.MAV_CMD.DO_SET_ROI || command == (ushort)MAVLink.MAV_CMD.DO_LAND_START)
{
// land can be 0,0 or a lat,lng
if (command == (ushort) MAVLink.MAV_CMD.LAND && item.lat == 0 && item.lng == 0)
if ((command == (ushort)MAVLink.MAV_CMD.LAND || command == (ushort)MAVLink.MAV_CMD.VTOL_LAND) && item.lat == 0 && item.lng == 0)
{
continue;
}
Expand All @@ -96,7 +96,7 @@ public void CreateOverlay(PointLatLngAlt home, List<Locationwp> missionitems, do
addpolygonmarker((a + 1).ToString(), item.lng, item.lat,
item.alt * altunitmultiplier, null, wpradius);
}
else if (command == (ushort) MAVLink.MAV_CMD.LAND && item.lat != 0 && item.lng != 0)
else if ((command == (ushort) MAVLink.MAV_CMD.LAND || command == (ushort) MAVLink.MAV_CMD.VTOL_LAND) && item.lat != 0 && item.lng != 0)
{
pointlist.Add(new PointLatLngAlt(item.lat, item.lng,
item.alt + gethomealt((MAVLink.MAV_FRAME) item.frame, item.lat, item.lng),
Expand Down

0 comments on commit 37e5418

Please sign in to comment.