jacdac.compass

Submodules

Package Contents

Classes

CompassClient

A sensor that measures the heading.

class jacdac.compass.CompassClient(bus: jacdac.bus.Bus, role: str, *, missing_heading_value: float | None = None)

Bases: jacdac.bus.SensorClient

A sensor that measures the heading. Implements a client for the Compass service.

property heading: float | None

The heading with respect to the magnetic north., _: °

property enabled: bool | None

Turn on or off the sensor. Turning on the sensor may start a calibration sequence.,

property heading_error: float | None

(Optional) Error on the heading reading, _: °

calibrate() None

Starts a calibration sequence for the compass.