The LightOffL()
method call switches OFF
the specified target light. Multiple light targets can be specified by using
bitwise-or.
The following code snippet demonstrates how to switch lights OFF for infinite duration for multiple targets. Lights are switched OFF with fade-out.
iLight->LightOffL( CHWRMLight::EPrimaryDisplay | CHWRMLight::EPrimaryKeyboard );
The following code snippet demonstrates how to switch OFF lights for the specified duration for one target (Lights are switched OFF with fade-out):
// aDuration = 5000 milliseconds light->LightOffL( CHWRMLight::ESecondaryDisplay, 5000 );
After the duration expires, if there has not been a previous infinite time duration call in this session, the light state for target is changed to whatever state was caused by the last infinite time duration call, or default state determined by inactivity timer.
The following code snippet demonstrates how to switch OFF lights for the specified duration for one target (fade-out is also controlled):
// aDuration = 5000 milliseconds // aFadeOut = EFalse means that lights turn off instantly and fade-out is not used, // ETrue means that lights smoothly fade-out. light->LightOnL( CHWRMLight::ESecondaryDisplay, 5000, EFalse );
Note: All devices do not support fade-out. In such scenario, the device behaves in its default state.