From b2ae83e4f345fdf3cb8de3ab52d578d84b79d483 Mon Sep 17 00:00:00 2001 From: asanoaozora Date: Fri, 5 May 2017 16:00:04 +0200 Subject: refine the HMI and update the navigation version --- src/clone_and_build.sh | 6 +- .../gdp-theme/800x480/NavigationAppBrowseMap.xcf | Bin 1010727 -> 1011210 bytes .../800x480/NavigationAppBrowseMapBottom.xcf | Bin 84008 -> 47606 bytes .../800x480/NavigationAppBrowseMapCompass.xcf | Bin 0 -> 12285 bytes .../800x480/NavigationAppBrowseMapGuidance.xcf | Bin 9683 -> 7138 bytes .../800x480/NavigationAppBrowseMapSimulation.xcf | Bin 25563 -> 30715 bytes .../800x480/NavigationAppBrowseMapTop.xcf | Bin 37753 -> 30330 bytes .../800x480/NavigationAppBrowseMapZoom.xcf | Bin 0 -> 28625 bytes src/hmi/qml/Core/genivi-capi.js | 2 +- src/hmi/qml/Core/genivi-origin.js | 2 +- src/hmi/qml/NavigationAppBrowseMap.qml | 297 +++++++++++++-------- src/referenceHMI.tar.gz | Bin 1209524 -> 1208098 bytes src/run | 7 +- src/script/prepare.sh | 54 ++++ 14 files changed, 245 insertions(+), 123 deletions(-) create mode 100755 src/hmi/gimp/gdp-theme/800x480/NavigationAppBrowseMapCompass.xcf create mode 100755 src/hmi/gimp/gdp-theme/800x480/NavigationAppBrowseMapZoom.xcf create mode 100755 src/script/prepare.sh (limited to 'src') diff --git a/src/clone_and_build.sh b/src/clone_and_build.sh index dce740c..147aa03 100755 --- a/src/clone_and_build.sh +++ b/src/clone_and_build.sh @@ -1,9 +1,9 @@ #!/bin/bash build_option="" -navigation_version='70e44b6b5df23d8a8708885f1f4f7ce90cb12fae' +navigation_version='312fedf2360633e7d76f9a70a17c5d4961964e34' positioning_version='9725fe1f553197042d6445997690d452a73490c0' -navit_version='995cec54c8682fbabfb4f912b6156ce0b5b43436' +navit_version='566e5dfc2cafb2c184bd3cfeddf1b4138f0bc972' echo "version of navigation is: $navigation_version" echo "version of positioning is: $positioning_version" @@ -53,7 +53,7 @@ patch -p0 -i ../patches/search_list_get_unique.diff patch -p0 -i ../patches/fsa_issue_padding.diff cd ../../../../ -./build.sh -c -n $build_option +./build.sh -t -c -n $build_option diff --git a/src/hmi/gimp/gdp-theme/800x480/NavigationAppBrowseMap.xcf b/src/hmi/gimp/gdp-theme/800x480/NavigationAppBrowseMap.xcf index 550d56b..4ce6dd3 100644 Binary files a/src/hmi/gimp/gdp-theme/800x480/NavigationAppBrowseMap.xcf and b/src/hmi/gimp/gdp-theme/800x480/NavigationAppBrowseMap.xcf differ diff --git a/src/hmi/gimp/gdp-theme/800x480/NavigationAppBrowseMapBottom.xcf b/src/hmi/gimp/gdp-theme/800x480/NavigationAppBrowseMapBottom.xcf index ac7c57e..37775dd 100755 Binary files a/src/hmi/gimp/gdp-theme/800x480/NavigationAppBrowseMapBottom.xcf and b/src/hmi/gimp/gdp-theme/800x480/NavigationAppBrowseMapBottom.xcf differ diff --git a/src/hmi/gimp/gdp-theme/800x480/NavigationAppBrowseMapCompass.xcf b/src/hmi/gimp/gdp-theme/800x480/NavigationAppBrowseMapCompass.xcf new file mode 100755 index 0000000..7ba23af Binary files /dev/null and b/src/hmi/gimp/gdp-theme/800x480/NavigationAppBrowseMapCompass.xcf differ diff --git a/src/hmi/gimp/gdp-theme/800x480/NavigationAppBrowseMapGuidance.xcf b/src/hmi/gimp/gdp-theme/800x480/NavigationAppBrowseMapGuidance.xcf index b5178cd..0003411 100755 Binary files a/src/hmi/gimp/gdp-theme/800x480/NavigationAppBrowseMapGuidance.xcf and b/src/hmi/gimp/gdp-theme/800x480/NavigationAppBrowseMapGuidance.xcf differ diff --git a/src/hmi/gimp/gdp-theme/800x480/NavigationAppBrowseMapSimulation.xcf b/src/hmi/gimp/gdp-theme/800x480/NavigationAppBrowseMapSimulation.xcf index 5e3c8f1..1e5a6c8 100755 Binary files a/src/hmi/gimp/gdp-theme/800x480/NavigationAppBrowseMapSimulation.xcf and b/src/hmi/gimp/gdp-theme/800x480/NavigationAppBrowseMapSimulation.xcf differ diff --git a/src/hmi/gimp/gdp-theme/800x480/NavigationAppBrowseMapTop.xcf b/src/hmi/gimp/gdp-theme/800x480/NavigationAppBrowseMapTop.xcf index 631edab..2648748 100644 Binary files a/src/hmi/gimp/gdp-theme/800x480/NavigationAppBrowseMapTop.xcf and b/src/hmi/gimp/gdp-theme/800x480/NavigationAppBrowseMapTop.xcf differ diff --git a/src/hmi/gimp/gdp-theme/800x480/NavigationAppBrowseMapZoom.xcf b/src/hmi/gimp/gdp-theme/800x480/NavigationAppBrowseMapZoom.xcf new file mode 100755 index 0000000..129ba20 Binary files /dev/null and b/src/hmi/gimp/gdp-theme/800x480/NavigationAppBrowseMapZoom.xcf differ diff --git a/src/hmi/qml/Core/genivi-capi.js b/src/hmi/qml/Core/genivi-capi.js index a7b3e76..d0dc2d9 100644 --- a/src/hmi/qml/Core/genivi-capi.js +++ b/src/hmi/qml/Core/genivi-capi.js @@ -1052,7 +1052,7 @@ function mapviewer_SetCameraHeadingTrackUp(dbusIf) function mapviewer_SetMapViewPan(dbusIf,panningAction,x,y) { - mapviewercontrol_message(dbusIf, "setMapViewPan", ["int32",panningAction,"array",["structure",["uint16",x,"uint16",y]]]); + mapviewercontrol_message(dbusIf, "setMapViewPan", ["int32",panningAction,"structure",["uint16",x,"uint16",y]]); } function mapviewer_ConvertPixelCoordsToGeoCoords(dbusIf,x,y) diff --git a/src/hmi/qml/Core/genivi-origin.js b/src/hmi/qml/Core/genivi-origin.js index 75df494..94f0b96 100644 --- a/src/hmi/qml/Core/genivi-origin.js +++ b/src/hmi/qml/Core/genivi-origin.js @@ -1049,7 +1049,7 @@ function mapviewer_SetCameraHeadingTrackUp(dbusIf) function mapviewer_SetMapViewPan(dbusIf,panningAction,x,y) { - mapviewercontrol_message(dbusIf, "SetMapViewPan", ["int32",panningAction,"array",["structure",["uint16",x,"uint16",y]]]); + mapviewercontrol_message(dbusIf, "SetMapViewPan", ["int32",panningAction,"structure",["uint16",x,"uint16",y]]); } function mapviewer_ConvertPixelCoordsToGeoCoords(dbusIf,x,y) diff --git a/src/hmi/qml/NavigationAppBrowseMap.qml b/src/hmi/qml/NavigationAppBrowseMap.qml index dcd45e0..0687b06 100644 --- a/src/hmi/qml/NavigationAppBrowseMap.qml +++ b/src/hmi/qml/NavigationAppBrowseMap.qml @@ -38,6 +38,9 @@ import "../style-sheets/NavigationAppBrowseMapTop-css.js" as StyleSheetTop import "../style-sheets/NavigationAppBrowseMapManeuver-css.js" as StyleSheetManeuver import "../style-sheets/NavigationAppBrowseMapSettings-css.js" as StyleSheetSettings; import "../style-sheets/NavigationAppBrowseMapScale-css.js" as StyleSheetScale; +import "../style-sheets/NavigationAppBrowseMapZoom-css.js" as StyleSheetZoom; +import "../style-sheets/NavigationAppBrowseMapCompass-css.js" as StyleSheetCompass; + import lbs.plugin.dbusif 1.0 @@ -50,6 +53,7 @@ NavigationAppHMIMenu { property int speedValueSent: 0; property bool displayManeuvers:false; property int currentZoomId; + property string simulationSpeedRatio; //------------------------------------------// // Management of the DBus exchanges @@ -92,7 +96,6 @@ NavigationAppHMIMenu { Genivi.setGuidanceActivated(false); //Guidance inactive, so inform the trip computer Genivi.fuelstopadvisor_SetFuelAdvisorSettings(dbusIf,0,0); - maneuverAdvice.text=Genivi.gettext("NoGuidance"); maneuverIcon.source=StyleSheetGuidance.maneuverIcon[Constants.SOURCE]; //no icon by default distancetomaneuverValue.text="----"; distancetodestinationValue.text="----"; @@ -105,7 +108,25 @@ NavigationAppHMIMenu { function guidanceManeuverChanged(args) { Genivi.hookSignal("guidanceManeuverChanged"); - maneuverAdvice.text=Genivi.Maneuver[args[1]]; + var advice = Genivi.Maneuver[args[1]]; + maneuverBarCru.visible=false; + maneuverBarApp.visible=false; + maneuverBarPre.visible=false; + maneuverBarAdv.visible=false; + if (advice=="CRU") + maneuverBarCru.visible=true; + else { + if (advice=="APP") + maneuverBarApp.visible=true; + else { + if (advice=="PRE") + maneuverBarPre.visible=true; + else { + if (advice=="ADV") + maneuverBarAdv.visible=true; + } + } + } } property Item guidanceWaypointReachedSignal; @@ -113,9 +134,9 @@ NavigationAppHMIMenu { { Genivi.hookSignal("guidanceWaypointReached"); if (args[2]) { - maneuverAdvice.text="Destination reached"; + // "Destination reached" TBD } else { - maneuverAdvice.text="Waypoint reached"; + // "Waypoint reached" TBD } } @@ -159,35 +180,35 @@ NavigationAppHMIMenu { { Genivi.hookSignal("simulationSpeedChanged"); if (args[1] == 0) { - speedValue.text="0"; + simulationSpeedRatio="0"; speedValueSent=0; } if (args[1] == 1) { - speedValue.text="1/4"; + simulationSpeedRatio="1/4"; speedValueSent=1; } if (args[1] == 2) { - speedValue.text="1/2"; + simulationSpeedRatio="1/2"; speedValueSent=2; } if (args[1] == 4) { - speedValue.text="1"; + simulationSpeedRatio="1"; speedValueSent=3; } if (args[1] == 8) { - speedValue.text="2"; + simulationSpeedRatio="2"; speedValueSent=4; } if (args[1] == 16) { - speedValue.text="4"; + simulationSpeedRatio="4"; speedValueSent=5; } if (args[1] == 32) { - speedValue.text="8"; + simulationSpeedRatio="8"; speedValueSent=6; } if (args[1] == 64) { - speedValue.text="16"; + simulationSpeedRatio="16"; speedValueSent=7; } } @@ -222,14 +243,11 @@ NavigationAppHMIMenu { Genivi.hookSignal("fuelStopAdvisorWarning"); if (args[1] == 1) { - fsamessageText.visible=true; - fsamessageText.text=Genivi.gettext("FSAWarning"); select_search_for_refill_in_top.visible=true; select_search_for_refill_in_top.disabled=false; } else { - fsamessageText.visible=false; select_search_for_refill_in_top.visible=false; select_search_for_refill_in_top.disabled=true; } @@ -241,14 +259,21 @@ NavigationAppHMIMenu { Genivi.hookSignal("mapViewScaleChanged"); var text=args[3].toString(); currentZoomId=args[3]; + zoomin.disabled=false; + zoomin.visible=true; + zoomout.disabled=false; + zoomout.visible=true; if(currentZoomId===Genivi.maxZoomId){ + zoomout.disabled=true; + zoomout.visible=false; text+="*"; }else{ if(currentZoomId===Genivi.minZoomId){ + zoomin.disabled=true; + zoomin.visible=false; text="*"+text; } } - zoomlevel.text=text; setScale(currentZoomId); } @@ -579,35 +604,35 @@ NavigationAppHMIMenu { var res1=Genivi.mapmatchedposition_GetSimulationSpeed(dbusIf); if (res1[1] == 0) { - speedValue.text="0"; + simulationSpeedRatio="0"; speedValueSent=0; } if (res1[1] == 1) { - speedValue.text="1/4"; + simulationSpeedRatio="1/4"; speedValueSent=1; } if (res1[1] == 2) { - speedValue.text="1/2"; + simulationSpeedRatio="1/2"; speedValueSent=2; } if (res1[1] == 4) { - speedValue.text="1"; + simulationSpeedRatio="1"; speedValueSent=3; } if (res1[1] == 8) { - speedValue.text="2"; + simulationSpeedRatio="2"; speedValueSent=4; } if (res1[1] == 16) { - speedValue.text="4"; + simulationSpeedRatio="4"; speedValueSent=5; } if (res1[1] == 32) { - speedValue.text="8"; + simulationSpeedRatio="8"; speedValueSent=6; } if (res1[1] == 64) { - speedValue.text="16"; + simulationSpeedRatio="16"; speedValueSent=7; } } @@ -663,14 +688,21 @@ NavigationAppHMIMenu { var res=Genivi.mapviewer_GetMapViewScale(dbusIf); var text=res[1].toString(); currentZoomId=res[1]; + zoomin.disabled=false; + zoomin.visible=true; + zoomout.disabled=false; + zoomout.visible=true; if(currentZoomId===Genivi.maxZoomId){ + zoomout.disabled=true; + zoomout.visible=false; text+="*"; }else{ if(currentZoomId===Genivi.minZoomId){ + zoomin.disabled=true; + zoomin.visible=false; text="*"+text; } } - zoomlevel.text=text; setScale(currentZoomId); } @@ -828,7 +860,6 @@ NavigationAppHMIMenu { function showSimulation() { simulation.visible=true; - speedValue.visible=true; speed_down.visible=true; speed_down.disabled=false; speed_up.visible=true; @@ -842,7 +873,6 @@ NavigationAppHMIMenu { function hideSimulation() { simulation.visible=false; - speedValue.visible=false; speed_down.visible=false; speed_down.disabled=true; speed_up.visible=false; @@ -856,12 +886,13 @@ NavigationAppHMIMenu { function showGuidance() { guidance.visible=true; + roadaftermaneuverBlock.visible=true; } function hideGuidance() { guidance.visible=false; - fsamessageText.visible=false; + roadaftermaneuverBlock.visible=false; select_search_for_refill_in_top.visible=false; select_search_for_refill_in_top.disabled=true; } @@ -914,13 +945,6 @@ NavigationAppHMIMenu { } } - SmartText { - x:StyleSheetTop.fsamessageText[Constants.X]; y:StyleSheetTop.fsamessageText[Constants.Y]; width:StyleSheetTop.fsamessageText[Constants.WIDTH]; height:StyleSheetTop.fsamessageText[Constants.HEIGHT];color:StyleSheetTop.fsamessageText[Constants.TEXTCOLOR];styleColor:StyleSheetTop.fsamessageText[Constants.STYLECOLOR]; font.pixelSize:StyleSheetTop.fsamessageText[Constants.PIXELSIZE]; - id:fsamessageText - visible: true - text:"" - } - StdButton { source:StyleSheetTop.select_search_for_refill_in_top[Constants.SOURCE]; x:StyleSheetTop.select_search_for_refill_in_top[Constants.X]; y:StyleSheetTop.select_search_for_refill_in_top[Constants.Y]; width:StyleSheetTop.select_search_for_refill_in_top[Constants.WIDTH]; height:StyleSheetTop.select_search_for_refill_in_top[Constants.HEIGHT]; id:select_search_for_refill_in_top @@ -931,6 +955,14 @@ NavigationAppHMIMenu { } } + BorderImage { + id: roadaftermaneuverBlock + source:StyleSheetTop.roadaftermaneuverBlock[Constants.SOURCE]; x:StyleSheetTop.roadaftermaneuverBlock[Constants.X]; y:StyleSheetTop.roadaftermaneuverBlock[Constants.Y]; width:StyleSheetTop.roadaftermaneuverBlock[Constants.WIDTH]; height:StyleSheetTop.roadaftermaneuverBlock[Constants.HEIGHT]; + border.left: 0; border.top: 0 + border.right: 0; border.bottom: 0 + visible: false; + } + SmartText { x:StyleSheetTop.roadaftermaneuverValue[Constants.X]; y:StyleSheetTop.roadaftermaneuverValue[Constants.Y]; width:StyleSheetTop.roadaftermaneuverValue[Constants.WIDTH]; height:StyleSheetTop.roadaftermaneuverValue[Constants.HEIGHT];color:StyleSheetTop.roadaftermaneuverValue[Constants.TEXTCOLOR];styleColor:StyleSheetTop.roadaftermaneuverValue[Constants.STYLECOLOR]; font.pixelSize:StyleSheetTop.roadaftermaneuverValue[Constants.PIXELSIZE]; visible: true @@ -938,23 +970,6 @@ NavigationAppHMIMenu { text: " " } - Text { - x:StyleSheetTop.speedValue[Constants.X]; y:StyleSheetTop.speedValue[Constants.Y]; width:StyleSheetTop.speedValue[Constants.WIDTH]; height:StyleSheetTop.speedValue[Constants.HEIGHT];color:StyleSheetTop.speedValue[Constants.TEXTCOLOR];styleColor:StyleSheetTop.speedValue[Constants.STYLECOLOR]; font.pixelSize:StyleSheetTop.speedValue[Constants.PIXELSIZE]; - visible: true - style: Text.Sunken; - smooth: true - id:vehicleSpeedValue - text: "---" - } - - Text { - x:StyleSheetTop.speedUnit[Constants.X]; y:StyleSheetTop.speedUnit[Constants.Y]; width:StyleSheetTop.speedUnit[Constants.WIDTH]; height:StyleSheetTop.speedUnit[Constants.HEIGHT];color:StyleSheetTop.speedUnit[Constants.TEXTCOLOR];styleColor:StyleSheetTop.speedUnit[Constants.STYLECOLOR]; font.pixelSize:StyleSheetTop.speedUnit[Constants.PIXELSIZE]; - visible: true - style: Text.Sunken; - smooth: true - id:speedUnit - text: "km/h" - } } } @@ -980,30 +995,6 @@ NavigationAppHMIMenu { } } - StdButton { - x:StyleSheetBottom.directiondestination[Constants.X]; y:StyleSheetBottom.directiondestination[Constants.Y]; width:StyleSheetBottom.directiondestination[Constants.WIDTH]; height:StyleSheetBottom.directiondestination[Constants.HEIGHT]; - id:orientation; next:zoomin; prev:menub; disabled:false; - source:StyleSheetBottom.directiondestination[Constants.SOURCE]; //todo call get status - property int status: 0; - function setState(name) - { - if (name=="D") - { - status=1; - source=StyleSheetBottom.directionnorth[Constants.SOURCE]; - } - else - { - status=0; - source=StyleSheetBottom.directiondestination[Constants.SOURCE]; - } - } - onClicked: - { - toggleOrientation(); - } - } - SmartText { x:StyleSheetBottom.currentroad[Constants.X]; y:StyleSheetBottom.currentroad[Constants.Y]; width:StyleSheetBottom.currentroad[Constants.WIDTH]; height:StyleSheetBottom.currentroad[Constants.HEIGHT];color:StyleSheetBottom.currentroad[Constants.TEXTCOLOR];styleColor:StyleSheetBottom.currentroad[Constants.STYLECOLOR]; font.pixelSize:StyleSheetBottom.currentroad[Constants.PIXELSIZE]; visible: true @@ -1011,35 +1002,6 @@ NavigationAppHMIMenu { text: "-------" } - StdButton { - source:StyleSheetBottom.zoomin[Constants.SOURCE]; x:StyleSheetBottom.zoomin[Constants.X]; y:StyleSheetBottom.zoomin[Constants.Y]; width:StyleSheetBottom.zoomin[Constants.WIDTH]; height:StyleSheetBottom.zoomin[Constants.HEIGHT]; - id:zoomin; next:zoomout; prev:orientation; - onClicked: { - if(currentZoomId>Genivi.minZoomId){ - Genivi.mapviewer_SetMapViewScaleByDelta(dbusIf,-1); - } - } - } - - Text { - x:StyleSheetBottom.zoomlevel[Constants.X]; y:StyleSheetBottom.zoomlevel[Constants.Y]; width:StyleSheetBottom.zoomlevel[Constants.WIDTH]; height:StyleSheetBottom.zoomlevel[Constants.HEIGHT];color:StyleSheetBottom.zoomlevel[Constants.TEXTCOLOR];styleColor:StyleSheetBottom.zoomlevel[Constants.STYLECOLOR]; font.pixelSize:StyleSheetBottom.zoomlevel[Constants.PIXELSIZE]; - visible: true - style: Text.Sunken; - smooth: true - id:zoomlevel - text: " " - } - - StdButton { - source:StyleSheetBottom.zoomout[Constants.SOURCE]; x:StyleSheetBottom.zoomout[Constants.X]; y:StyleSheetBottom.zoomout[Constants.Y]; width:StyleSheetBottom.zoomout[Constants.WIDTH]; height:StyleSheetBottom.zoomout[Constants.HEIGHT]; - id:zoomout; next:settings; prev:zoomin; - onClicked: { - if(currentZoomIdGenivi.minZoomId){ + Genivi.mapviewer_SetMapViewScaleByDelta(dbusIf,-1); + } + } + } + + StdButton { + source:StyleSheetZoom.zoomout[Constants.SOURCE]; x:StyleSheetZoom.zoomout[Constants.X]; y:StyleSheetZoom.zoomout[Constants.Y]; width:StyleSheetZoom.zoomout[Constants.WIDTH]; height:StyleSheetZoom.zoomout[Constants.HEIGHT]; + id:zoomout; next:settings; prev:zoomin; + onClicked: { + if(currentZoomId +# +# Copyright (C) 2013-2014, PCA Peugeot Citroen +# +# License: +# This Source Code Form is subject to the terms of the +# Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with +# this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# @licence end@ +########################################################################### +BASH_DIR=$(dirname "${BASH_SOURCE[0]}") +TARGET_DIR=$BASH_DIR/../hmi +STYLE_SHEETS_GENERATED_INDICATOR=$TARGET_DIR/style-sheets/the-style-sheets-have-been-generated-css.js + +function usage +{ + echo "Usage: prepare -i input_directory" + echo 'Generate a new set of style sheet' + exit +} + +if [ $# -ge 1 ]; then + if [ $1 = -h ]; then + usage + elif [ $1 = -i ]; then + # Get input directory from the command line + shift + input_dir=$1 + else + usage + fi +else + usage +fi + +echo 'Delete the current style sheet' +rm -rf $TARGET_DIR/images/*.png +rm -rf $TARGET_DIR/style-sheets/*-css.js + +echo "Prepare the style sheet of fuel stop advisor" +$TARGET_DIR/style_sheet_generator.sh -i $input_dir -o $TARGET_DIR -v -nl + +echo "Create the empty file as an indicator" +touch $STYLE_SHEETS_GENERATED_INDICATOR + + -- cgit v1.2.1