ambient_dim_permille

Function ambient_dim_permille 

Source
pub fn ambient_dim_permille(millilux: Option<u32>) -> u16
Expand description

Ambient dimming scale, in permille of normal brightness: 1000 at or above DIM_FULL_MLUX, falling linearly to DIM_MIN_PERMILLE at zero. None — no reading yet — is full brightness, so a board whose sensor never answers keeps its ordinary indicator.

A free function rather than an engine method so writers that bypass the engine (the firmware’s BLE status blink) and future consumers of ambient light apply the same curve.