Acknowledged
CIQQA-3063

bug: documentation typos in Toybox.Position.enableLocationEvents example

In https://developer.garmin.com/connect-iq/api-docs/Toybox/Position.html#enableLocationEvents-instance_function there are typos:

    if (Position has :CONFIGURATION_GPS_GLONASS_GALILEO_BEIDOU_L1_L5) &&
       (Position.hasConfigurationSupport(Position.CONFIGURATION_GPS_GLONASS_GALILEO_BEIDOU_L1_L5)) {
        options[:configuration] = Position.CONFIGURATION_GPS_GLONASS_GALILEO_BEIDOU_L1_L5;
    } else if (Position has :CONFIGURATION_GPS_GLONASS_GALILEO_BEIDOU_L1) &&
       (Position.hasConfigurationSupport(Position.CONFIGURATION_GPS_GLONASS_GALILEO_BEIDOU_L1)) {
        options[:configuration] = Position.CONFIGURATION_GPS_GLONASS_GALILEO_BEIDOU_L1;
    } else if (Position has :CONFIGURATION_GPS) &&
       (Position.hasConfigurationSupport(Position.CONFIGURATION_GPS)) {
        options[:configuration] = Position.CONFIGURATION_GPS;
    }

all 3 if have an "extra" zombie parentheses around the &&:

) &&

(

instead of just:

&&

update: and BTW the example code (with typecheck: 3, but I guess it doesn't matter in this case)  gives warnings:

options[:constellations] = [ Position.CONSTELLATION_GPS, Position.CONSTELLATION_GLONASS ];

enduro3: '$.Toybox.Position.CONSTELLATION_GPS' is deprecated.
enduro3: '$.Toybox.Position.CONSTELLATION_GLONASS' is deprecated.

Parents
  • > update: and BTW the example code (with typecheck: 3, but I guess it doesn't matter in this case)  gives warnings:

    > options[:constellations] = [ Position.CONSTELLATION_GPS, Position.CONSTELLATION_GLONASS ];

    > enduro3: '$.Toybox.Position.CONSTELLATION_GPS' is deprecated.
    >
    enduro3: '$.Toybox.Position.CONSTELLATION_GLONASS' is deprecated.

    This is annoying but nothing new. It's no different than how the compiler will warn about valid uses of AppBase.getProperty() if you build for fr235, a CIQ 1 device where getProperty is *not* deprecated, but is actually required to persist any kind of data.

    [1/x]

Comment
  • > update: and BTW the example code (with typecheck: 3, but I guess it doesn't matter in this case)  gives warnings:

    > options[:constellations] = [ Position.CONSTELLATION_GPS, Position.CONSTELLATION_GLONASS ];

    > enduro3: '$.Toybox.Position.CONSTELLATION_GPS' is deprecated.
    >
    enduro3: '$.Toybox.Position.CONSTELLATION_GLONASS' is deprecated.

    This is annoying but nothing new. It's no different than how the compiler will warn about valid uses of AppBase.getProperty() if you build for fr235, a CIQ 1 device where getProperty is *not* deprecated, but is actually required to persist any kind of data.

    [1/x]

Children
No Data