nmpButtonsDefine (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.64 / 1.00.00

Nav. API level:

2


This function will define a number of configurable buttons on the NMP with the IDs 1.. count. It is required to call this method before any other nmpButton calls.

Note that the buttons take up space that would otherwise be used for the navigation display.

 

Input:

count : INT (0..10)

The number of buttons to define. Using 0 will remove all the buttons and return the used space to the navigation display.

 

Returns: INT

0

- Success.

-1

- Navigation interface is not open.

-2

- Error communicating with navigation device.

-4

- The navigation device rejected the command.

-8

- Illegal value of count.

-11

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

-12

- Navigation interface is busy.

 

Declaration:

FUNCTION nmpButtonsDefine : INT;
VAR_INPUT
  count : SINT;
END_VAR;

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
VAR
  rc : INT;
END_VAR;
BEGIN
  ...
  // Define 3 buttons
  rc := nmpButtonsDefine(count := 3);
  IF rc <> 0 THEN
    DebugFmt(message := "Error: nmpButtonsDefine=\1", v1 := rc);
  END_IF;
  ...
END;
END_PROGRAM;