OpenRoadCode
Public API reference for OpenRoadCode
Loading...
Searching...
No Matches
hardware_io.environmental.barometric_sensor_if.BarometricSensorIf Class Reference

Interface for reading barometric sensor measurements. More...

Inheritance diagram for hardware_io.environmental.barometric_sensor_if.BarometricSensorIf:
hardware_io.environmental.bmp3xx.Bmp3xx hardware_io.environmental.bmp388.Bmp388 hardware_io.environmental.bmp390.Bmp390

Public Member Functions

None start (self)
 Initialize the sensor and prepare it for use.
 
None stop (self)
 Release resources owned by the sensor.
 
bool is_started (self)
 Return whether the sensor has been initialized.
 
float get_pressure_pa (self)
 Read atmospheric pressure.
 
float get_temperature_c (self)
 Read sensor temperature.
 

Detailed Description

Interface for reading barometric sensor measurements.

Implementations provide raw or device-compensated measurements directly from barometric sensor hardware. Higher-level calculations such as altitude, pressure trends, and weather interpretation belong outside the hardware layer.

Member Function Documentation

◆ get_pressure_pa()

float hardware_io.environmental.barometric_sensor_if.BarometricSensorIf.get_pressure_pa (   self)

Read atmospheric pressure.

Returns
Atmospheric pressure in pascals.

Reimplemented in hardware_io.environmental.bmp3xx.Bmp3xx.

◆ get_temperature_c()

float hardware_io.environmental.barometric_sensor_if.BarometricSensorIf.get_temperature_c (   self)

Read sensor temperature.

Returns
Temperature in degrees Celsius.

Reimplemented in hardware_io.environmental.bmp3xx.Bmp3xx.

◆ is_started()

bool hardware_io.environmental.barometric_sensor_if.BarometricSensorIf.is_started (   self)

Return whether the sensor has been initialized.

Return values
TrueThe sensor is initialized and readable.
FalseThe sensor has not been started.

Reimplemented in hardware_io.environmental.bmp3xx.Bmp3xx.


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