GoodReadLed

Availability All terminals
Description This function controls the RBG LEDs of the device
Syntax void GoodReadLed( int color, int time );
Arguments
int color
The color specifies the RBG value of the LED. In 'lib.h' you'll find a list of predefined colors (i.e GREEN, ORANGE and RED)
For a flashing LED do a logical OR with the defines 'LED_FLASH' or 'LED_FLASH_SLOW'
int time
Defines the time the LED is on in steps of 20 milliseconds. After this time the LED will be switched off. For examples, time = 25 specifies half a second.

Two values have a special meaning:
OFF Good read LED will be switched off immediately (OFF = 0).
FOREVER Good read LED will be continuously on (FOREVER = -1).
Returns None
Remarks In case the application allows the user the change the good read led color, using menu commands or OptiConnect, use the define 'GOOD_READ_COLOR' as 'color' parameter to use the configured color in the Operating System
Tip: Use the Delay() function if you want to halt program execution until the good read LED is switched off again.
Example
#include <stdio.h>
#include "lib.h"

void main( void )
{
    int x;

    for(;;)
    {
        for( x=0; x < 10; x++)
        {
            GoodReadLed( RED, 25);
            Delay( 50 );
            GoodReadLed( GREEN, 25);
            Delay( 50 );
            GoodReadLed( BLUE, 25);
            Delay( 50 );
        }
        GoodReadLed( RED | LED_FLASH, FOREVER);
        Delay( 200 );
        GoodReadLed( RED, 0);
        GoodReadLed( GREEN | LED_FLASH, FOREVER);
        Delay( 200 );
        GoodReadLed( GREEN, 0);
        GoodReadLed( BLUE | LED_FLASH, FOREVER);
        Delay( 200 );
        GoodReadLed( BLUE, 0);
    }
}