summaryrefslogtreecommitdiffstats
path: root/app/navigation.qml
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2019-12-30 19:29:01 -0500
committerScott Murray <scott.murray@konsulko.com>2020-01-01 01:16:42 +0000
commit992ab22d9eaa9e62138647bba833a1cb83185a32 (patch)
tree3adb54ac82486a951728f2eb56982d63f3bb884e /app/navigation.qml
parent6bfe7a6a75cf705d0369a60acf6cf131d42777a4 (diff)
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 <scott.murray@konsulko.com> Change-Id: I12d93a15d43591d8841ea6a312e7d017f136c86d
Diffstat (limited to 'app/navigation.qml')
-rwxr-xr-xapp/navigation.qml4
1 files changed, 4 insertions, 0 deletions
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") {