PebbleOS
Loading...
Searching...
No Matches
Light level

Coarse ambient light level, classified against the backlight dark threshold. More...

Macros

#define AMBIENT_LIGHT_LEVEL_ENUM_COUNT   (AmbientLightLevelVeryLight + 1)
 Number of AmbientLightLevel values.
 

Enumerations

enum  AmbientLightLevel {
  AmbientLightLevelUnknown = 0 , AmbientLightLevelVeryDark , AmbientLightLevelDark , AmbientLightLevelLight ,
  AmbientLightLevelVeryLight
}
 Light level enum. More...
 

Functions

AmbientLightLevel light_level_to_enum (uint32_t lux)
 Classify a light level against the dark threshold.
 

Detailed Description

Coarse ambient light level, classified against the backlight dark threshold.

Macro Definition Documentation

◆ AMBIENT_LIGHT_LEVEL_ENUM_COUNT

#define AMBIENT_LIGHT_LEVEL_ENUM_COUNT   (AmbientLightLevelVeryLight + 1)

Number of AmbientLightLevel values.

Enumeration Type Documentation

◆ AmbientLightLevel

Light level enum.

Enumerator
AmbientLightLevelUnknown 

No reading available.

AmbientLightLevelVeryDark 

Well below the dark threshold.

AmbientLightLevelDark 

Below the dark threshold.

AmbientLightLevelLight 

At or slightly above the dark threshold.

AmbientLightLevelVeryLight 

Well above the dark threshold.

Function Documentation

◆ light_level_to_enum()

AmbientLightLevel light_level_to_enum ( uint32_t  lux)

Classify a light level against the dark threshold.

Parameters
luxLight level, in the units of the dark threshold.
Returns
Light level class.