summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2019-12-30 19:29:01 -0500
committerScott Murray <scott.murray@konsulko.com>2019-12-31 15:10:49 +0000
commitc285683b960ccfadd35f62c74c14871c61e4d24c (patch)
tree8fbedae3adca3513b42252d983dfa94b35551c54
parent3b16f4c6066d8f262ee7fc204f3cceb533ad7811 (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: Ic738e83fae1d312377f05aec4888d84572a44f4b
-rw-r--r--app/navigation.qml4
1 files changed, 4 insertions, 0 deletions
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") {