Closed tsteven4 closed 1 month ago
A dirty fix, which relies on a real waypoint following each "link", is to ignore the "links" in GPS_A200_Send.
diff --git a/jeeps/gpsapp.cc b/jeeps/gpsapp.cc
index 5a091e87..df72df08 100644
--- a/jeeps/gpsapp.cc
+++ b/jeeps/gpsapp.cc
@@ -3190,6 +3190,8 @@ int32_t GPS_A200_Send(const char* port, GPS_PWay* way, int32_t n)
GPS_Error("A200_Send: Unknown route protocol");
return PROTOCOL_ERROR;
}
+ } else if (way[i]->islink) {
+ continue; // links not supported. can cause "Route Waypoint was Deleted" and "Received an Invalid WPT" on device.
} else {
method = LINK_ID[gps_link_type].Pid_Rte_Wpt_Data;
This results in only the message
Transfer has been Completed and a complete transfer of the route.
The insertion of "links" goes back to the introduction of the capability to write routes in 2004 https://github.com/GPSBabel/gpsbabel/commit/0d5b7f0
With a GPS12 sending a route to the device can cause messages on the device. Capabilities for routes are A200: D201 D103.
This is due to the insertion of "links" by garmin::route_waypt_pr
Note that for the first waypoint is_rte is set in the "link" by garmin::route_hdr_pr and thus it is handled as a route header (D201_Send). However, since A200_Send doesn't know about links the remaining "links", and the real route waypoints, are send using D103_Send.
Here is a transcript with some extra debugging messages related to waypoint renaming.