OpenRoadCode
Public API reference for OpenRoadCode
Loading...
Searching...
No Matches
hardware_io.environmental.ambient_light_sensor_if.AmbientLightSensorIf Class Reference

Interface for reading illuminance from ambient light hardware. More...

Inheritance diagram for hardware_io.environmental.ambient_light_sensor_if.AmbientLightSensorIf:
environmental.buffered_ambient_light_sensor.BufferedAmbientLightSensor hardware_io.android.ambient_light.AndroidAmbientLight

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_illuminance_lux (self)
 Read ambient illuminance.
 

Detailed Description

Interface for reading illuminance from ambient light hardware.

Member Function Documentation

◆ get_illuminance_lux()

float hardware_io.environmental.ambient_light_sensor_if.AmbientLightSensorIf.get_illuminance_lux (   self)

Read ambient illuminance.

Returns
Ambient illuminance in lux.

Reimplemented in environmental.buffered_ambient_light_sensor.BufferedAmbientLightSensor, and hardware_io.android.ambient_light.AndroidAmbientLight.

◆ is_started()

bool hardware_io.environmental.ambient_light_sensor_if.AmbientLightSensorIf.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 environmental.buffered_ambient_light_sensor.BufferedAmbientLightSensor, and hardware_io.android.ambient_light.AndroidAmbientLight.


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