Pebble.Compass
Read compass heading from watches with a magnetometer.
Native Pebble C API
- CompassService on developer.repebble.com
Union Types
Error
type Error
= Unavailable
| InvalidReadingCompass errors returned at the app boundary.
Type Aliases
Heading
type alias Heading =
{ degrees : Float
, isValid : Bool
}A compass heading in degrees (0–360) when valid.
Commands
current
current : (Result Error Heading -> msg) -> Cmd msgRequest the current heading once.
Subscriptions
onChange
onChange : (Heading -> msg) -> Sub msgReceive heading updates when the compass service reports changes.