diff options
-rw-r--r-- | app/BtnGuidance.qml | 2 | ||||
-rw-r--r-- | app/navigation.qml | 31 |
2 files changed, 19 insertions, 14 deletions
diff --git a/app/BtnGuidance.qml b/app/BtnGuidance.qml index e262704..2130857 100644 --- a/app/BtnGuidance.qml +++ b/app/BtnGuidance.qml @@ -40,7 +40,7 @@ Item { map.initDestination(startFromCurrentPosition) if(btn_guidance.sts_guide != 0){ - navigation.broadcastStatus("Stopped"); + navigation.broadcastStatus("STOPPED"); } if(map.center !== map.currentpostion){ diff --git a/app/navigation.qml b/app/navigation.qml index 1216249..5cb3634 100644 --- a/app/navigation.qml +++ b/app/navigation.qml @@ -78,18 +78,23 @@ ApplicationWindow { map.doSetWaypointsSlot(data.points[0].latitude, data.points[0].longitude, true) } - 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") { - btn_guidance.startGuidance() - } - } + // The status event no longer has start/stop, since that did not really + // match with "sensor" signal behavior in VSS. If such is required in + // the future, a new "actuator" signal should be used in the backend + // instead to reimplement this as a different event. + // + //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") { + // btn_guidance.startGuidance() + // } + //} } Map { @@ -566,7 +571,7 @@ ApplicationWindow { { // Arrive at your destination btn_guidance.sts_guide = 0 - navigation.broadcastStatus("Arrived") + navigation.broadcastStatus("ARRIVED") } }else{ setNextCoordinate(map.currentpostion.latitude, map.currentpostion.longitude,next_direction,root.car_moving_distance) |