Garmin Forums
Site
Search
User
Site
Search
User
Apps & Software
Outdoor Recreation
Sports & Fitness
Pilots
Developer
Beta Program
German Forum
More
Cancel
Developer
More
Connect IQ
Connect IQ App Development Discussion
Sys.getDeviceSettings().distanceUnits == Sys.UNITS_METRIC
News & Announcements
Forums
Bug Reports
Wiki
Tags
More
Cancel
New
Replies
5 replies
Subscribers
14 subscribers
Views
680 views
Users
0 members are here
weretech-490
responded
Options
Share
More
Cancel
Related
Sys.getDeviceSettings().distanceUnits == Sys.UNITS_METRIC
ruperthawkes
over 10 years ago
Why does this :
using Toybox.System as Sys;
if(Sys.getDeviceSettings().distanceUnits == Sys.UNITS_METRIC)
throw a compiler error :
Shell Version -21181Could not find symbol UNITS_METRIC.
ruperthawkes
over 10 years ago
Ah, because the
DOCS are INCORRECT!
It's UNIT_METRIC not UNITS_METRIC!!!!
Your documentation says
- (Object) distanceUnits
UNITS_METRIC if distance is shown in kilometers, UNITS_STATUTE if it is shown in miles.
Whereas the SDK supports
UNIT_METRIC and UNIT_STATUTE!
ARGH!
Please fix it!!!!
Cancel
Up
0
Down
Reply
Cancel
hawken
over 10 years ago
Thanks for catching this. We'll get this corrected.
Cancel
Up
0
Down
Reply
Cancel
Brandon.ConnectIQ
over 10 years ago
This has been fixed and will be available in the next release.
Cancel
Up
0
Down
Reply
Cancel
Former Member
over 10 years ago
I hope you mean documentation has been changed and not the name of the constant?
Cancel
Up
0
Down
Reply
Cancel
Brandon.ConnectIQ
over 10 years ago
Yes, the documentation has been corrected. We are planning to avoid breaking changes in the virtual machine moving forward, so cases like this will typically mean the documentation will be edited to match the implementation.
Cancel
Up
0
Down
Reply
Cancel