From c285683b960ccfadd35f62c74c14871c61e4d24c 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: Ic738e83fae1d312377f05aec4888d84572a44f4b --- app/navigation.qml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/navigation.qml b/app/navigation.qml index c1cac99..f35cf38 100644 --- 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 1.2.3-korg