nmpStopClose (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 causes a stop that is shown to be closed. If called after nmpStopPopup, but before calling navStopSet, the timeout will start when the stop is shown, otherwise it will start immediately.

Can close both stops that are opened with nmpStopPopup and stops that are manually opened.

 

Input:

ID : INT

Unique ID that identifies the destination to close.

 

timeout : INT (default: 0)

Time until the stop should be closed in seconds. 0 will close the stop immediately.

 

 

Returns: INT

0

- Success.

-1

- Navigation interface is not opened.

-2

- Error communicating with navigation device.

-4

- The navigation device rejected the command.

-8

- Illegal timeout value

-11

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

-12

- Navigation interface is busy.

 

 

Declaration:

FUNCTION nmpStopClose : INT;
VAR_INPUT
  id     : INT;
  timeout : INT := 0;
END_VAR;

 

Example:

INCLUDE rtcu.inc
 
PROGRAM NavigationExample;
 
BEGIN
  ...
  nmpStopPopup(id := 61, popup := TRUE);
  // Set stop to close after a minute
  nmpStopClose(id := 61, timeout := 60);
  // Add a destination to the route
  navStopSet(id := 61, latitude := 666377598, longitude := 117525954, text := "Logic IO - main office");
  ...
END;
END_PROGRAM;