Skip to main content

Aila_OverrideLightLevels

Override light levels to given values, or revert to normal levels.

Signature

void Aila_OverrideLightLevels(const AilaLightLevels *levels);

typedef struct {
float area;
float spot;
} AilaLightLevels;

Parameters

  • levels - Pointer to AilaLightLevels struct, or NULL/nil to clear override

Description

Directly controls the intensity of lighting on your Aila hardware. Using this function should be reserved for non-standard use cases, as the nominal lighting levels are optimized for scanning and imaging functions.

Both the illumination LED(s) (area) and aiming LED(s) (spot) may be independently controlled. Because barcode scanning and motion detection depend on tuned lighting intensity, LED override should only be used when Aila_Stop() is in effect (or Aila_Start() has never been called).

The override values cannot be used when Aila_EnableSpeaker() is in effect on Lightning-based Apple devices, as kiosk communications occur through the audio jack.

To clear the current override values, pass NULL/nil to Aila_OverrideLightLevels().

Usage

// Stop scanning first
Aila_Stop();

// Set custom light levels
AilaLightLevels levels;
levels.area = 0.5f; // 50% illumination
levels.spot = 0.8f; // 80% aiming
Aila_OverrideLightLevels(&levels);

// Do custom work with lights on...

// Clear override and return to normal
Aila_OverrideLightLevels(NULL);
Aila_Start();

See Also