diff options
author | asanoaozora <fifitaneki@hotmail.com> | 2017-03-03 11:35:16 +0100 |
---|---|---|
committer | asanoaozora <fifitaneki@hotmail.com> | 2017-03-03 11:35:16 +0100 |
commit | 92ddc33a64a70b3f8a4c29f4b23e1edd8a97fac5 (patch) | |
tree | e3b4a134f7caedca3029bbfbb8e46a374032e3a0 | |
parent | 32ceb558930c9cd432c41adcabc83e48342c9bd2 (diff) | |
download | navigation-92ddc33a64a70b3f8a4c29f4b23e1edd8a97fac5.tar.gz |
fix a bug for GDP version
-rwxr-xr-x | src/clone_and_build.sh | 2 | ||||
-rw-r--r-- | src/hmi/qml/Core/genivi-capi.js | 30 | ||||
-rw-r--r-- | src/hmi/qml/Core/genivi-origin.js | 30 | ||||
-rw-r--r-- | src/hmi/qml/NavigationApp.qml | 6 | ||||
-rw-r--r-- | src/hmi/qml/NavigationAppBrowseMap.qml | 1 | ||||
-rw-r--r-- | src/hmi/qml/NavigationAppPOI.qml | 14 | ||||
-rw-r--r-- | src/hmi/qml/hmi-launcher/main.cpp | 2 |
7 files changed, 49 insertions, 36 deletions
diff --git a/src/clone_and_build.sh b/src/clone_and_build.sh index 8592441..8158b46 100755 --- a/src/clone_and_build.sh +++ b/src/clone_and_build.sh @@ -1,7 +1,7 @@ #!/bin/bash build_option="" -navigation_version='a10f7330d9806b96a6c9a7e1b19c04cd8a3a187c' +navigation_version='07095c495f1c088522e103846448651249d4c324' positioning_version='57345f36fa6095ecb6d7f7998a06abafbcd90a87' navit_version='5607f355e77250cebd5326a7c7959eb07c12adc2' diff --git a/src/hmi/qml/Core/genivi-capi.js b/src/hmi/qml/Core/genivi-capi.js index c2788a1..bec5e0d 100644 --- a/src/hmi/qml/Core/genivi-capi.js +++ b/src/hmi/qml/Core/genivi-capi.js @@ -125,22 +125,11 @@ var historyOfLastEnteredLocationIn=0; //next input var historyOfLastEnteredLocationOut=0; //first ouput var radius=5000; //radius in m around the vehicle to search for the refill stations var offset=0; //offset of the start record to get on the list of pois -var maxWindowSize=20; //max size of elements to return as a result +var maxResultListSize=50; //max size of elements to return as a result var fuelCategoryId; //unique id of fuel category var zoom_guidance=2; //zoom level when a guidance starts -//the default data below will be managed by the persistency component in the future -address[NAVIGATIONCORE_COUNTRY]="Switzerland"; -address[NAVIGATIONCORE_CITY]="Zürich"; -address[NAVIGATIONCORE_STREET]="In Lampitzäckern"; -address[NAVIGATIONCORE_HOUSENUMBER]="11"; -data['position']['lat']=46.202410; -data['position']['lon']=6.146265; -data['position']['alt']=19; data['display_on_map']='show_current_position'; //display current position of the vehicle on the map -data['default_position']['lat']=46.202038; //default position (rue Jean Calvin Genève) -data['default_position']['lon']=6.146845; -data['default_position']['alt']=19; historyOfLastEnteredLocationDepth=10; //max number of items into the history is set to historyOfLastEnteredLocationDepth-1 tripMode="TRIP_NUMBER1"; @@ -228,6 +217,23 @@ function setlang(lang) Qt.include("translations/"+lang+".js"); } +// Default position (for showroom mode) +function setDefaultPosition(lat,lon,alt) +{ + data['default_position']['lat']= lat; + data['default_position']['lon']= lon; + data['default_position']['alt']= alt; +} + +// Default address +function setDefaultAddress(country,city,street,number) +{ + address[NAVIGATIONCORE_COUNTRY]=country; + address[NAVIGATIONCORE_CITY]=city; + address[NAVIGATIONCORE_STREET]=street; + address[NAVIGATIONCORE_HOUSENUMBER]=number; +} + function gettext(arg) { if (!translations[arg]) { diff --git a/src/hmi/qml/Core/genivi-origin.js b/src/hmi/qml/Core/genivi-origin.js index 63dce3b..29d7cff 100644 --- a/src/hmi/qml/Core/genivi-origin.js +++ b/src/hmi/qml/Core/genivi-origin.js @@ -125,22 +125,11 @@ var historyOfLastEnteredLocationIn=0; //next input var historyOfLastEnteredLocationOut=0; //first ouput var radius=5000; //radius in m around the vehicle to search for the refill stations var offset=0; //offset of the start record to get on the list of pois -var maxWindowSize=20; //max size of elements to return as a result +var maxResultListSize=50; //max size of elements to return as a result var fuelCategoryId; //unique id of fuel category var zoom_guidance=2; //zoom level when a guidance starts -//the default data below will be managed by the persistency component in the future -address[NAVIGATIONCORE_COUNTRY]="Switzerland"; -address[NAVIGATIONCORE_CITY]="Zürich"; -address[NAVIGATIONCORE_STREET]="In Lampitzäckern"; -address[NAVIGATIONCORE_HOUSENUMBER]="11"; -data['position']['lat']=47.415740; -data['position']['lon']=8.614862; -data['position']['alt']=19; data['display_on_map']='show_current_position'; //display current position of the vehicle on the map -data['default_position']['lat']=46.202038; //default position (rue Jean Calvin Genève) -data['default_position']['lon']=6.146845; -data['default_position']['alt']=19; historyOfLastEnteredLocationDepth=10; //max number of items into the history is set to historyOfLastEnteredLocationDepth-1 tripMode="TRIP_NUMBER1"; @@ -228,6 +217,23 @@ function setlang(lang) Qt.include("translations/"+lang+".js"); } +// Default position (for showroom mode) +function setDefaultPosition(lat,lon,alt) +{ + data['default_position']['lat']= lat; + data['default_position']['lon']= lon; + data['default_position']['alt']= alt; +} + +// Default address +function setDefaultAddress(country,city,street,number) +{ + address[NAVIGATIONCORE_COUNTRY]=country; + address[NAVIGATIONCORE_CITY]=city; + address[NAVIGATIONCORE_STREET]=street; + address[NAVIGATIONCORE_HOUSENUMBER]=number; +} + function gettext(arg) { if (!translations[arg]) { diff --git a/src/hmi/qml/NavigationApp.qml b/src/hmi/qml/NavigationApp.qml index 70fe362..cdc986d 100644 --- a/src/hmi/qml/NavigationApp.qml +++ b/src/hmi/qml/NavigationApp.qml @@ -34,7 +34,7 @@ import "Core/genivi.js" as Genivi; ApplicationWindow { id: container - flags: Qt.CustomizeWindowHint + flags: Qt.FramelessWindowHint color: "transparent" visible: true width: StyleSheetMap.menu[Constants.WIDTH]; @@ -49,7 +49,9 @@ ApplicationWindow { } Component.onCompleted: { - Genivi.setlang("eng_USA"); //by default set to english US + Genivi.setlang("eng_USA"); //set to english US + Genivi.setDefaultPosition(46.202038,6.146845,19); // (rue Jean Calvin Genève) + Genivi.setDefaultAddress("Switzerland","Lausanne","Rue de Midi","8"); // preferred address load("NavigationAppMain"); } } diff --git a/src/hmi/qml/NavigationAppBrowseMap.qml b/src/hmi/qml/NavigationAppBrowseMap.qml index 5fcfb44..6b5fee9 100644 --- a/src/hmi/qml/NavigationAppBrowseMap.qml +++ b/src/hmi/qml/NavigationAppBrowseMap.qml @@ -1513,6 +1513,7 @@ NavigationAppHMIMenu { if (Genivi.data['display_on_map']==='show_position') { //show a given position on the map, used to explore the map Genivi.mapviewer_SetFollowCarMode(dbusIf,false); + Genivi.mapviewer_SetMapViewScale(dbusIf,Genivi.zoom_guidance); Genivi.mapviewer_SetTargetPoint(dbusIf,Genivi.data['position']['lat'],Genivi.data['position']['lon'],Genivi.data['position']['alt']); Genivi.fuelstopadvisor_SetFuelAdvisorSettings(dbusIf,0,50); //no advisor mode hideGuidance(); diff --git a/src/hmi/qml/NavigationAppPOI.qml b/src/hmi/qml/NavigationAppPOI.qml index fe2fd3b..1caaea7 100644 --- a/src/hmi/qml/NavigationAppPOI.qml +++ b/src/hmi/qml/NavigationAppPOI.qml @@ -37,11 +37,7 @@ NavigationAppHMIMenu { id: menu property string pagefile:"NavigationAppPOI" property string extraspell; - property int type_poi_car_parking: 65842 - property int type_poi_hotel: 65835 - property int type_poi_restaurant: 65923 - property int type_poi_bar: 65848 - property int type_poi_fuel: 65834 + property string all_categories: "all categories" property string poiCategoryName property bool vehicleLocated: false @@ -98,7 +94,7 @@ NavigationAppHMIMenu { function update() { - selectedValue.text="See details of \nthe POI \nhere" + selectedValue.text="Name:\nID:\nLat:\nLon:\n" } function spell(input) @@ -111,7 +107,8 @@ NavigationAppHMIMenu { var model=view.model; for(var i=0;i<Genivi.categoriesIdNameList.length;i+=2) { - model.append({"name":Genivi.categoriesIdNameList[i+1][3],"number":i/2}); + if(Genivi.categoriesIdNameList[i+1][3]!==all_categories) + model.append({"name":Genivi.categoriesIdNameList[i+1][3],"number":i/2}); } } @@ -303,7 +300,7 @@ NavigationAppHMIMenu { Genivi.poisearch_StartPoiSearch(dbusIf,"",Genivi.POISERVICE_SORT_BY_DISTANCE); var attributeList=[]; attributeList[0]=0; - var res=Genivi.poisearch_RequestResultList(dbusIf,Genivi.offset,Genivi.maxWindowSize,attributeList); + var res=Genivi.poisearch_RequestResultList(dbusIf,Genivi.offset,Genivi.maxResultListSize,attributeList); var res_win=res[5]; var i; for (i = 0 ; i < res_win.length ; i+=2) { @@ -351,6 +348,7 @@ NavigationAppHMIMenu { var poi_data=Genivi.poi_data[Genivi.poi_id]; Genivi.data['position']['lat']=poi_data.lat; Genivi.data['position']['lon']=poi_data.lon; + Genivi.data['display_on_map']='show_position'; entryMenu("NavigationAppBrowseMap",menu); } } diff --git a/src/hmi/qml/hmi-launcher/main.cpp b/src/hmi/qml/hmi-launcher/main.cpp index 1887104..7e6b662 100644 --- a/src/hmi/qml/hmi-launcher/main.cpp +++ b/src/hmi/qml/hmi-launcher/main.cpp @@ -72,7 +72,7 @@ int main(int argc, char ** argv) QQuickWindow *window = qobject_cast<QQuickWindow *>(topLevel); - window->setFlags(Qt::CustomizeWindowHint); + window->setFlags(Qt::FramelessWindowHint); window->setColor(Qt::transparent); QSurfaceFormat surfaceFormat = window->requestedFormat(); |