OpenRoadCode
Public API reference for OpenRoadCode
Loading...
Searching...
No Matches
environmental.barometric_source_if.BarometricSourceIf Class Reference

Provide normalized measurements to a barometric controller. More...

Inheritance diagram for environmental.barometric_source_if.BarometricSourceIf:
environmental.android_barometric_adapter.AndroidBarometricAdapter environmental.bmp3xx_barometric_adapter.Bmp3xxBarometricAdapter environmental.buffered_barometric_source.BufferedBarometricSource

Public Member Functions

bool is_connected (self)
 Return whether the sensor is connected and ready.
 
None connect (self)
 Connect to the barometric source.
 
None disconnect (self)
 Disconnect from the barometric source.
 
BarometricSample read_barometric (self)
 Read pressure and optional temperature.
 
BarometricSample read_environment (self)
 Compatibility alias for the original generic source API.
 

Detailed Description

Provide normalized measurements to a barometric controller.

Member Function Documentation

◆ is_connected()

bool environmental.barometric_source_if.BarometricSourceIf.is_connected (   self)

Return whether the sensor is connected and ready.

Return values
TrueThe sensor is connected and ready.
FalseThe sensor is disconnected or unavailable.

Reimplemented in environmental.android_barometric_adapter.AndroidBarometricAdapter, environmental.bmp3xx_barometric_adapter.Bmp3xxBarometricAdapter, and environmental.buffered_barometric_source.BufferedBarometricSource.

◆ read_barometric()

BarometricSample environmental.barometric_source_if.BarometricSourceIf.read_barometric (   self)

Read pressure and optional temperature.

Returns
Normalized barometric sample in SI units. temperature_c is None for pressure-only sources such as many phone barometers.

Reimplemented in environmental.android_barometric_adapter.AndroidBarometricAdapter, environmental.bmp3xx_barometric_adapter.Bmp3xxBarometricAdapter, and environmental.buffered_barometric_source.BufferedBarometricSource.

◆ read_environment()

BarometricSample environmental.barometric_source_if.BarometricSourceIf.read_environment (   self)

Compatibility alias for the original generic source API.

Returns
Normalized barometric sample in SI units.

The documentation for this class was generated from the following file: