From 992ab22d9eaa9e62138647bba833a1cb83185a32 Mon Sep 17 00:00:00 2001 From: Scott Murray Date: Mon, 30 Dec 2019 19:29:01 -0500 Subject: Avoid broadcasting a second stop event Tweak logic handling a stop event from the navigation API to avoid the accidental sending of another stop event. This avoids clearing a subsequent waypoint set that may be in flight, which was seen in practice when doing a stop and a waypoint set from the POI application. Bug-AGL: SPEC-3079 Signed-off-by: Scott Murray Change-Id: I12d93a15d43591d8841ea6a312e7d017f136c86d --- app/navigation.qml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/navigation.qml b/app/navigation.qml index 71763c2..8bf8a7b 100755 --- a/app/navigation.qml +++ b/app/navigation.qml @@ -79,6 +79,10 @@ ApplicationWindow { onStatusEvent: { if (data.state == "stop") { + // Slight hack here, if sts_guide != 0, btn_guidance.discardWaypoints + // will trigger another stop, which can cancel a queued waypoint set, + // so set it to 0 in advance. + btn_guidance.sts_guide = 0 map.doPauseSimulationSlot() } if (data.state == "start") { -- cgit