Pebble App Framework: Phone API
    Preparing search index...

    Function readingUnits

    • The units a plugin's reading shows in on the watch.

      They are the units the plugin serves the reading in, read off each value's own unit, so the watch shows what the plugin's own settings picked. A plugin the directory marks with fixedUnits sends fixed units whatever the wearer picked, as the Pebble app's built-in weather does with °C and mph, so the units the wearer picked in the Pebble app are used in their place. Either way, a unit one side leaves out is taken from the other, and °C stands in when neither names a temperature scale. A temperature in kelvin or degrees Rankine shows in °C.

      Parameters

      • envelope: SourceEnvelope | null | undefined

        The update, which may be missing or carry anything.

      • app: AppUnits

        The units the wearer picked in the Pebble app, as far as it has said.

      Returns ReadingUnits

      The units the reading goes out in.