nmpGetIdleTime (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:

4.50 / 1.00.00

Nav. API level:

2


This function will return the number of minutes it has been since the last user interaction with the NMP device (Press on the touchscreen or on the hardware buttons).

This can be used e.g. to implement screen saver functionality using nmpLcdBrightness.

 

 

Input:

None.

 

Returns: INT

0..32767

- The number of minutes since the last interaction.

-1

- Navigation interface is not open.

-2

- Error communicating with navigation device.

-4

- The navigation device rejected the command.

-11

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

-12

- Navigation interface is busy.

 

Declaration:

FUNCTION nmpGetIdleTime : INT;

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
BEGIN
  ...
  //Turn off LCD if it has been unused for 10 minutes
  IF nmpGetIdleTime() >= 10 THEN
    nmpLCDBrightness(brightness := 0);
  END_IF;
 
  ...
END;
END_PROGRAM;