Skip to main content

lightOverride()

Directly control 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 scanStop() is in effect (or scanStart() has never been called).

To clear the current override values, pass null.

AilaCordovaPlugin.lightOverride(levels)

Parameters

  • levels (Object or null) - Light level configuration:
    • area (Number) - Area light level (0.0 to 1.0)
    • spot (Number) - Spot light level (0.0 to 1.0)

Returns

Promise that resolves when light levels are set.

Example

// Set custom light levels
AilaCordovaPlugin.lightOverride({
area: 0.5,
spot: 0.8
});

// Clear override
AilaCordovaPlugin.lightOverride(null);