diff options
author | asanoaozora <fifitaneki@hotmail.com> | 2017-08-24 18:03:44 +0200 |
---|---|---|
committer | asanoaozora <fifitaneki@hotmail.com> | 2017-08-24 18:03:44 +0200 |
commit | a3c0f5010673f9a1f6c24a2562358d1168870c50 (patch) | |
tree | d0650e38d1466f351b6a15637a731407cf6bb348 | |
parent | d1516f32a78f40e247d1dfc4a684a3f706ca9542 (diff) | |
download | navigation-a3c0f5010673f9a1f6c24a2562358d1168870c50.tar.gz |
visualize the maneuver, the time of arrival
-rw-r--r-- | src/hmi/config/fsa_switzerland.conf | 2 | ||||
-rw-r--r-- | src/hmi/gimp/gdp-theme/800x480/NavigationAppSearch.xcf | bin | 369045 -> 378432 bytes | |||
-rw-r--r-- | src/hmi/qml/Core/genivi-capi.js | 1 | ||||
-rw-r--r-- | src/hmi/qml/Core/genivi-origin.js | 1 | ||||
-rw-r--r-- | src/hmi/qml/NavigationAppBrowseMap.qml | 3 | ||||
-rw-r--r-- | src/hmi/qml/NavigationAppSearch.qml | 65 | ||||
-rw-r--r-- | src/hmi/translations/deu_DEU.js | 1 | ||||
-rw-r--r-- | src/hmi/translations/eng_USA.js | 1 | ||||
-rw-r--r-- | src/hmi/translations/fra_FRA.js | 1 | ||||
-rw-r--r-- | src/hmi/translations/jpn_JPN.js | 1 |
10 files changed, 55 insertions, 21 deletions
diff --git a/src/hmi/config/fsa_switzerland.conf b/src/hmi/config/fsa_switzerland.conf index ffcdc9f..aa53f83 100644 --- a/src/hmi/config/fsa_switzerland.conf +++ b/src/hmi/config/fsa_switzerland.conf @@ -15,7 +15,7 @@ number=8 simulationMode=true showroom=true autoguidance=false -radius=5000 +radius=10000 maxResultListSize=10 defaultCategoryName=fuel [Log] diff --git a/src/hmi/gimp/gdp-theme/800x480/NavigationAppSearch.xcf b/src/hmi/gimp/gdp-theme/800x480/NavigationAppSearch.xcf Binary files differindex ad9c936..cd9eb84 100644 --- a/src/hmi/gimp/gdp-theme/800x480/NavigationAppSearch.xcf +++ b/src/hmi/gimp/gdp-theme/800x480/NavigationAppSearch.xcf diff --git a/src/hmi/qml/Core/genivi-capi.js b/src/hmi/qml/Core/genivi-capi.js index c1a8d1a..fcc1355 100644 --- a/src/hmi/qml/Core/genivi-capi.js +++ b/src/hmi/qml/Core/genivi-capi.js @@ -30,7 +30,6 @@ Qt.include("resource.js") -var dbusInterface; var g_nav_session_handle=["uint32",0]; var g_locationinput_handle=["uint32",0]; var g_routing_handle=["uint32",0]; diff --git a/src/hmi/qml/Core/genivi-origin.js b/src/hmi/qml/Core/genivi-origin.js index 53e3216..11b89ee 100644 --- a/src/hmi/qml/Core/genivi-origin.js +++ b/src/hmi/qml/Core/genivi-origin.js @@ -30,7 +30,6 @@ Qt.include("resource.js") -var dbusInterface; var g_nav_session_handle=["uint32",0]; var g_locationinput_handle=["uint32",0]; var g_routing_handle=["uint32",0]; diff --git a/src/hmi/qml/NavigationAppBrowseMap.qml b/src/hmi/qml/NavigationAppBrowseMap.qml index 149e6ad..ac6d28f 100644 --- a/src/hmi/qml/NavigationAppBrowseMap.qml +++ b/src/hmi/qml/NavigationAppBrowseMap.qml @@ -305,7 +305,6 @@ NavigationAppHMIMenu { Genivi.hookSignal(dltIf,"mapViewPerspectiveChanged"); var perspective=args[3]; if(perspective===Genivi.MAPVIEWER_3D){ - console.log("toto") orientation.setState("B"); showThreeDSettingsPanel(); }else{ @@ -381,7 +380,7 @@ NavigationAppHMIMenu { if (active) { if(clockwize) { - if(angle>=350) angle=0; else angle+=increment; + if(angle>=360) angle=increment; else angle+=increment; }else{ if(angle<=0) angle=350; else angle-=increment; } diff --git a/src/hmi/qml/NavigationAppSearch.qml b/src/hmi/qml/NavigationAppSearch.qml index 7609a85..ee46eed 100644 --- a/src/hmi/qml/NavigationAppSearch.qml +++ b/src/hmi/qml/NavigationAppSearch.qml @@ -48,8 +48,8 @@ NavigationAppHMIMenu { property real routeListSegments: 1000 property bool vehicleLocated: false property real delayToGetManeuverList: 200 //in ms - property variant maneuverList: [] - + property int maneuverIndex: 0 + property var maneuverIconIDList: [] DLTIf { id:dltIf; name: pagefile; @@ -403,6 +403,7 @@ NavigationAppHMIMenu { //var error=res[1] var maneuversList=res[5]; var model=maneuverArea.model; + maneuverIndex=0; for (var i = 0 ; i < maneuversList.length ; i+=2) { var roadNameAfterManeuver=maneuversList[i+1][9]; var offsetOfNextManeuver=maneuversList[i+1][15]; @@ -416,15 +417,18 @@ NavigationAppHMIMenu { var maneuverData=items[j+1][9]; if (maneuverData[1] === Genivi.NAVIGATIONCORE_DIRECTION) { - var maneuverIcon=maneuverData[3][3][1]; var text=Genivi.distance(offsetOfManeuver)+" "+Genivi.ManeuverType[maneuver]+" "+roadNameAfterManeuver; - model.append({"name":text,"number":i}); + model.append({"name":text,"number":maneuverIndex}); + maneuverIconIDList[maneuverIndex]=maneuverData[3][3][1]; + maneuverIndex+=1; } } } //highlight first maneuver maneuverArea.highlightFollowsCurrentItem=true; maneuverArea.currentIndex=0; + maneuverIndex=0; + maneuverIconPreview.source=Genivi.ManeuverDirectionIcon[maneuverIconIDList[maneuverIndex]]; } function updateCurrentPosition() @@ -690,12 +694,12 @@ NavigationAppHMIMenu { var res=Genivi.routing_GetRouteOverviewTimeAndDistance(dbusIf,dltIf); - var i, time = 0, distance = 0; + var i, timetodestination = 0, distance = 0; for (i=0;i<res[1].length;i+=4) { if (res[1][i+1] == Genivi.NAVIGATIONCORE_TOTAL_TIME) { - time = res[1][i+3][3][1]; + timetodestination = res[1][i+3][3][1]; } else { @@ -707,7 +711,10 @@ NavigationAppHMIMenu { } distanceValue.text =Genivi.distance(distance); - timeValue.text= Genivi.duration(time); + timeValue.text= Genivi.duration(timetodestination); + //following stuff can be improved, it's a first attempt :-) + var dateTime = new Date(); + arrivalValue.text=Genivi.time(parseInt(Qt.formatTime(dateTime,"hh"),10)*3600+parseInt(Qt.formatTime(dateTime,"mm"),10)*60+parseInt(Qt.formatTime(dateTime,"ss"),10)+timetodestination); } function showRoutePanel() @@ -718,6 +725,8 @@ NavigationAppHMIMenu { distanceValue.visible=true; timeTitle.visible=true; timeValue.visible=true; + arrivalTitle.visible=true; + arrivalValue.visible=true; statusTitle.visible=true; statusValue.visible=true; show_route_on_map.visible=true; @@ -731,6 +740,8 @@ NavigationAppHMIMenu { distanceValue.visible=false; timeTitle.visible=false; timeValue.visible=false; + arrivalTitle.visible=false; + arrivalValue.visible=false; statusTitle.visible=false; statusValue.visible=false; show_route_on_map.visible=false; @@ -749,6 +760,7 @@ NavigationAppHMIMenu { maneuverArea.visible=true; maneuverArea.forceActiveFocus(); crossroadZoom.visible=false; + maneuverIconPreview.visible=true; prev_maneuver.visible=true; prev_maneuver.disabled=false; next_maneuver.visible=true; @@ -759,6 +771,7 @@ NavigationAppHMIMenu { { maneuverArea.visible=false; crossroadZoom.visible=true; + maneuverIconPreview.visible=false; prev_maneuver.visible=false; prev_maneuver.disabled=true; next_maneuver.visible=false; @@ -788,7 +801,6 @@ NavigationAppHMIMenu { image:StyleSheet.navigation_app_search_background[Constants.SOURCE]; anchors { fill: parent; topMargin: parent.headlineHeight} id: content - property int maneuverIndex: 0 // name display Text { @@ -963,6 +975,20 @@ NavigationAppHMIMenu { visible: false; } Text { + x:StyleSheet.arrivalTitle[Constants.X]; y:StyleSheet.arrivalTitle[Constants.Y]; width:StyleSheet.arrivalTitle[Constants.WIDTH]; height:StyleSheet.arrivalTitle[Constants.HEIGHT];color:StyleSheet.arrivalTitle[Constants.TEXTCOLOR];styleColor:StyleSheet.arrivalTitle[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.arrivalTitle[Constants.PIXELSIZE]; + id:arrivalTitle; + style: Text.Sunken; + smooth: true + text: Genivi.gettext("RouteArrival") + visible: false; + } + SmartText { + x:StyleSheet.arrivalValue[Constants.X]; y:StyleSheet.arrivalValue[Constants.Y]; width:StyleSheet.arrivalValue[Constants.WIDTH]; height:StyleSheet.arrivalValue[Constants.HEIGHT];color:StyleSheet.arrivalValue[Constants.TEXTCOLOR];styleColor:StyleSheet.arrivalValue[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.arrivalValue[Constants.PIXELSIZE]; + id:arrivalValue + text: "" + visible: false; + } + Text { x:StyleSheet.statusTitle[Constants.X]; y:StyleSheet.statusTitle[Constants.Y]; width:StyleSheet.statusTitle[Constants.WIDTH]; height:StyleSheet.statusTitle[Constants.HEIGHT];color:StyleSheet.statusTitle[Constants.TEXTCOLOR];styleColor:StyleSheet.statusTitle[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.statusTitle[Constants.PIXELSIZE]; id:statusTitle; style: Text.Sunken; @@ -1019,6 +1045,13 @@ NavigationAppHMIMenu { border.right: 0; border.bottom: 0 visible: true; } + BorderImage { + id: maneuverIconPreview + source:StyleSheet.maneuverIconPreview[Constants.SOURCE]; x:StyleSheet.maneuverIconPreview[Constants.X]; y:StyleSheet.maneuverIconPreview[Constants.Y]; width:StyleSheet.maneuverIconPreview[Constants.WIDTH]; height:StyleSheet.maneuverIconPreview[Constants.HEIGHT]; + border.left: 0; border.top: 0 + border.right: 0; border.bottom: 0 + visible: false; + } StdButton { source:StyleSheet.prev_maneuver[Constants.SOURCE]; x:StyleSheet.prev_maneuver[Constants.X]; y:StyleSheet.prev_maneuver[Constants.Y]; width:StyleSheet.prev_maneuver[Constants.WIDTH]; height:StyleSheet.prev_maneuver[Constants.HEIGHT]; id:prev_maneuver; @@ -1026,11 +1059,11 @@ NavigationAppHMIMenu { visible: false; onClicked: { var model=maneuverArea.model; - if(content.maneuverIndex > 0){ - content.maneuverIndex--; - console.log(model.get(content.maneuverIndex).name) + if(maneuverIndex > 0){ + maneuverIndex--; maneuverArea.highlightFollowsCurrentItem=true; - maneuverArea.currentIndex=content.maneuverIndex; + maneuverArea.currentIndex=maneuverIndex; + maneuverIconPreview.source=Genivi.ManeuverDirectionIcon[maneuverIconIDList[maneuverIndex]]; } } } @@ -1041,11 +1074,11 @@ NavigationAppHMIMenu { visible: false; onClicked: { var model=maneuverArea.model; - if(content.maneuverIndex < (model.count-1)){ - content.maneuverIndex++; - console.log(model.get(content.maneuverIndex).name) + if(maneuverIndex < (model.count-1)){ + maneuverIndex++; maneuverArea.highlightFollowsCurrentItem=true; - maneuverArea.currentIndex=content.maneuverIndex; + maneuverArea.currentIndex=maneuverIndex; + maneuverIconPreview.source=Genivi.ManeuverDirectionIcon[maneuverIconIDList[maneuverIndex]]; } } } diff --git a/src/hmi/translations/deu_DEU.js b/src/hmi/translations/deu_DEU.js index 91f4c1f..a6ed099 100644 --- a/src/hmi/translations/deu_DEU.js +++ b/src/hmi/translations/deu_DEU.js @@ -52,6 +52,7 @@ translations["Simulation"]="SIMULATION"; translations["RouteDistance"]="DISTANCE"; translations["RouteTime"]="TIME"; +translations["RouteArrival"]="ARRIVAL"; translations["Guidance"]="GUIDANCE"; translations["DisplayRoute"]="DISPLAY"; translations["StatusTitle"]="STATUS"; diff --git a/src/hmi/translations/eng_USA.js b/src/hmi/translations/eng_USA.js index b91f74b..960c25f 100644 --- a/src/hmi/translations/eng_USA.js +++ b/src/hmi/translations/eng_USA.js @@ -52,6 +52,7 @@ translations["Simulation"]="SIMULATION"; translations["RouteDistance"]="DISTANCE"; translations["RouteTime"]="TIME"; +translations["RouteArrival"]="ARRIVAL"; translations["Guidance"]="GUIDANCE"; translations["DisplayRoute"]="DISPLAY"; translations["StatusTitle"]="STATUS"; diff --git a/src/hmi/translations/fra_FRA.js b/src/hmi/translations/fra_FRA.js index a92faa9..286df0e 100644 --- a/src/hmi/translations/fra_FRA.js +++ b/src/hmi/translations/fra_FRA.js @@ -52,6 +52,7 @@ translations["Simulation"]="SIMULATION"; translations["RouteDistance"]="DISTANCE"; translations["RouteTime"]="DUREE"; +translations["RouteArrival"]="ARRIVEE"; translations["Guidance"]="GUIDAGE"; translations["DisplayRoute"]="AFFICHER"; translations["StatusTitle"]="STATUS"; diff --git a/src/hmi/translations/jpn_JPN.js b/src/hmi/translations/jpn_JPN.js index e4ca23d..1f119c3 100644 --- a/src/hmi/translations/jpn_JPN.js +++ b/src/hmi/translations/jpn_JPN.js @@ -52,6 +52,7 @@ translations["Simulation"]="シミュレーション"; translations["RouteDistance"]="距離"; translations["RouteTime"]="時間"; +translations["RouteArrival"]="到着"; translations["Guidance"]="ガイダンス"; translations["DisplayRoute"]="ルート"; translations["StatusTitle"]="ステータス"; |