Ticket Created
over 4 years ago

WERETECH-8118

Sim issue with saveWaypoints

In the sim using 3.1.5, the following sometimes doesn't work.

Toybox.PersistedContent.saveWaypoint(location, {:name => name});

It works fine in the device (a real 1030).

  • That's about right.

    Though, the devices can store many more locations than 16.

    ======================

    When you download a course, you get a handle to the course object created.

    saveWaypoint should return a handle to the location object.

    And one should be able to get the name and the lat/lon coordinates from the object.

  • Looks like the sim has a limitation of 10 waypoints, whereas it's 16 on the device. I did also see what you were saying where the sim doesn't add the number on to the end of duplicate names (testing on an actual Forerunner 945 acted the same way as well).

    So to sum it up. here's what I've found:

    • Sim has a different limitation on the number of waypoints than devices
    • Sim and Device don't notify you when you have hit the limit, so it just seems like nothing happens
    • Sim doesn't change duplicate waypoint names like some devices do

    Does that sound about right? Let me know if there's anything I might be missing. Thanks!

  • It looks like the sim only lets you add a limited number of waypoints. After that limit, it seems to quietly not add them.

  • >It looks like you can't remove the waypoints from the device (you can remove waypoints stored by your app).<

    That' correct based on the API doc for remove()

    Remove a waypoint

    Raises:

    Since:

    • 3.0.0

  • 1- create an array of waypoints that have the to-be-added name as a prefix.

    2- add the way point.

    3- iterate through the locations to find the new getID() (that isn't in the array you created in step 1).

    This will get you the actual name and the actual added (new) waypoint. (The sim doesn't modify the name. The real device adds a number to the end of the name to make it unique).

    It looks like you can't remove the waypoints from the device (you can remove waypoints stored by your app).