This function will enable or disable a configurable button on the NMP.
Input:
id : INT
The ID of the button - between 1 and the button count defined in nmpButtonsDefine.
enable : BOOL
Determines if the button is enabled and can raise the "NMP Button Pressed" event.
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 ID.
|
-11
|
- This is not supported by the device (the device is not an NMP device).
|
-12
|
- Navigation interface is busy.
|
Declaration:
FUNCTION nmpButtonEnable : INT;
VAR_INPUT
id : INT;
enable : BOOL;
END_VAR;
Example:
INCLUDE rtcu.inc
PROGRAM test;
VAR
rc : INT;
END_VAR;
BEGIN
...
rc := nmpButtonEnable(id := 1, enable := TRUE);
IF rc <> 0 THEN
DebugFmt(message := "Error: nmpButtonEnable=\1", v1 := rc);
END_IF;
...
END;
END_PROGRAM;
|