This function will make the button require confirmation before the "Button Pressed" event will be created.
Input:
id : INT
The ID of the button - between 1 and the button count defined in nmpButtonsDefine.
confirm : BOOL (Default: FALSE)
Determines if the button requires confirmation.
message : STRING
Determines the text in the confirmation dialog. Max. 199 characters.
Returns: INT
0
|
- Success.
|
-1
|
- Navigation interface is not open.
|
-2
|
- Error communicating with navigation device.
|
-4
|
- The navigation device rejected the command.
|
-8
|
- Invalid parameter.
|
-11
|
- This is not supported by the device (e.g. the device is not an NMP device).
|
-12
|
- Navigation interface is busy.
|
Declaration:
FUNCTION nmpButtonConfirm : INT;
VAR_INPUT
ID : INT;
confirm : BOOL;
message : STRING := "";
END_VAR;
Example:
INCLUDE rtcu.inc
PROGRAM test;
VAR
rc : INT;
END_VAR;
BEGIN
...
rc := nmpButtonConfirm(id := 1, confirm := TRUE, message := "Are you sure?");
IF rc <> 0 THEN
DebugFmt(message := "Error: nmpButtonConfirm=\1", v1 := rc);
END_IF;
...
END;
END_PROGRAM;
|