nmpLCDBrightness (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Device support:

MX2i pro, CX1 pro/flex/warp, SX1, MX2 turbo, NX-200, NX-400, NX-900, LX2

Firmware version:

2.84 / 1.00.00

Nav. API level:

2


This function will set the brightness of the LCD of the NMP device.

 

 

Screen saver functionality

Starting with NMP v3.00, brightness level 0 can be used as a screen saver, to reduce the risk of burned in images.

If the hardware buttons are enabled, setting the brightness level to 0 will both turn off the backlight and blank the entire screen. Any press on the touchscreen in this mode will be sent as a hardware button press, to allow the user to wake the NMP device manually. When the brightness is set above 0, the screen is restored.

To determine when to turn off the screen, the nmpGetIdleTime function can be used, in combination with additional logic, to avoid turning off the screen while navigating.

 

 

Input:

brightness : SINT (0..100)

The brightness of the LCD backlight.

The backlight is turned off at level 0 and the brightest at level 100.

All devices do not necessarily support all levels but will be mapped to the most correct levels.

 

Returns: INT

0

- Success.

-1

- Navigation interface is not open.

-2

- Error communicating with navigation device.

-4

- Failed to set brightness.

-8

- Brightness out of range.

-11

- This is not supported by the device (e.g. the device is not an NMP device).

-12

- Navigation interface is busy.

 

Declaration:

FUNCTION nmpLCDBrightness : INT;
VAR_INPUT
  brightness : SINT;
END_VAR;

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
BEGIN
  ...
  //Turn off LCD
  nmpLCDBrightness(brightness := 0);
  ...
END;
END_PROGRAM;