summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rw-r--r--src/.gitignore1
-rw-r--r--src/CMakeLists.txt2
-rw-r--r--src/hmi/qml/Core/genivi.js30
-rw-r--r--src/hmi/qml/NavigationSettingsLanguageAndUnits.qml18
-rw-r--r--src/hmi/qml/POI.qml14
6 files changed, 38 insertions, 30 deletions
diff --git a/.gitignore b/.gitignore
index 5c86de6..771ec71 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,5 +10,6 @@ bin/
#files
*~
*.pro.user
-*.user
+*.user*
+*.txt.user*
/.project
diff --git a/src/.gitignore b/src/.gitignore
index b22c539..c27a2f9 100644
--- a/src/.gitignore
+++ b/src/.gitignore
@@ -1,4 +1,5 @@
automotive-message-broker
navigation
positioning
+ilm
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 2a43885..844b084 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -27,7 +27,7 @@ set (create_file cmake -E touch)
# Check if navigation-service stuff with the right version has been cloned and do it if necessary
set(navigation-service_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/navigation)
set(navigation-service_URL http://git.projects.genivi.org/lbs/navigation.git)
-set(navigation-service_VERSION 90a066a53f841a336079a50a03f42a36b4a9ccbd)
+set(navigation-service_VERSION d44f863bc925bf1973fe3f1c56dd1af5699a2a60)
if (EXISTS ${navigation-service_SRC_DIR})
execute_process(
diff --git a/src/hmi/qml/Core/genivi.js b/src/hmi/qml/Core/genivi.js
index a13b67a..23caeb9 100644
--- a/src/hmi/qml/Core/genivi.js
+++ b/src/hmi/qml/Core/genivi.js
@@ -104,6 +104,10 @@ var historyOfLastEnteredLat = new Array; //dirty but need to know how to do it i
var historyOfLastEnteredLon = new Array; //dirty but need to know how to do it in qml
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 fuelCategoryId; //unique id of fuel category
//the default data below will be managed by the persistency component in the future
address[NAVIGATIONCORE_COUNTRY]="Switzerland";
@@ -359,12 +363,26 @@ function mapviewercontrol_message2(par, func, args)
return map_message(par, "MapViewerControl", func, map_session(par).concat(g_map_handle2,args));
}
+// -------------------- POISearch dbus messages --------------------
+
// Send a message to poiservice (basic)
function poi_message(par, iface, func, args)
{
return par.message("org.genivi.poiservice."+iface,"/org/genivi/poiservice/"+iface,"org.genivi.poiservice."+iface, func, args);
}
+// Send a message to poisearch with session handle
+function poisearch_message(par, func, args)
+{ //session handle sent
+ return poi_message(par, "POISearch", func, poisearch_handle(par).concat(args));
+}
+
+// Send a message to poisearch without session handle
+function poisearch_message_get(par, func, args)
+{
+ return poi_message(par, "POISearch", func, args);
+}
+
// Create a new poisearch handle or get the current handle
function poisearch_handle(par) {
if (g_poisearch_handle)
@@ -382,18 +400,6 @@ function poisearch_handle_clear(par)
}
}
-// Send a message to poisearch with session handle
-function poisearch_message(par, func, args)
-{ //session handle sent
- return poi_message(par, "POISearch", func, poisearch_handle(par).concat(args));
-}
-
-// Send a message to poisearch without session handle
-function poisearch_message_get(par, func, args)
-{
- return poi_message(par, "POISearch", func, args);
-}
-
// Send a message to demonstrator (basic)
function demonstrator_message(par, iface, func, args)
{
diff --git a/src/hmi/qml/NavigationSettingsLanguageAndUnits.qml b/src/hmi/qml/NavigationSettingsLanguageAndUnits.qml
index 125d8c7..f5664e7 100644
--- a/src/hmi/qml/NavigationSettingsLanguageAndUnits.qml
+++ b/src/hmi/qml/NavigationSettingsLanguageAndUnits.qml
@@ -50,13 +50,13 @@ HMIMenu {
var current_lang_map;
var lang_nav=[];
var lang_map=[];
- if (current_nav[0] == "string" && current_nav[2] == "string") {
+ if (current_nav[0] == "string" && current_nav[2] == "string" && current_nav[4] == "string") {
current_lang_nav=current_nav[1] + "_" + current_nav[3];
} else {
console.log("Unexpected result from GetLocale:");
Genivi.dump("",current_nav);
}
- if (current_map[0] == "string" && current_map[2] == "string") {
+ if (current_map[0] == "string" && current_map[2] == "string" && current_nav[4] == "string") {
current_lang_map=current_map[1] + "_" + current_map[3];
} else {
console.log("Unexpected result from GetLocale:");
@@ -115,10 +115,10 @@ HMIMenu {
if (units1==Genivi.NAVIGATIONCORE_KM && units2==Genivi.MAPVIEWER_KM) unit_km.disabled=true;
if (units1==Genivi.NAVIGATIONCORE_MILE && units2==Genivi.MAPVIEWER_MILE) unit_mile.disabled=true;
}
- function setLocale(language, country)
+ function setLocale(language, country, script)
{
- Genivi.nav_message(dbusIf,"Configuration","SetLocale",["string",language,"string",country]);
- Genivi.map_message(dbusIf,"Configuration","SetLocale",["string",language,"string",country]);
+ Genivi.nav_message(dbusIf,"Configuration","SetLocale",["string",language,"string",country,"string",script]);
+ Genivi.map_message(dbusIf,"Configuration","SetLocale",["string",language,"string",country,"string",script]);
Genivi.setlang(language + "_" + country);
pageOpen("NavigationSettingsLanguageAndUnits"); //reload page because of texts...
}
@@ -143,16 +143,16 @@ HMIMenu {
}
StdButton { objectName:"fra_FRA";
source:StyleSheet.french_flag[Constants.SOURCE]; x:StyleSheet.french_flag[Constants.X]; y:StyleSheet.french_flag[Constants.Y]; width:StyleSheet.french_flag[Constants.WIDTH]; height:StyleSheet.french_flag[Constants.HEIGHT];
- id:fra_FRA; disabled:false; next:deu_DEU; prev:back; explode:false; onClicked: {setLocale("fra","FRA");}}
+ id:fra_FRA; disabled:false; next:deu_DEU; prev:back; explode:false; onClicked: {setLocale("fra","FRA","Latn");}}
StdButton { objectName:"deu_DEU";
source:StyleSheet.german_flag[Constants.SOURCE]; x:StyleSheet.german_flag[Constants.X]; y:StyleSheet.german_flag[Constants.Y]; width:StyleSheet.german_flag[Constants.WIDTH]; height:StyleSheet.german_flag[Constants.HEIGHT];
- id:deu_DEU; disabled:false; next:eng_USA; prev:fra_FRA; explode:false; onClicked: {setLocale("deu","DEU");}}
+ id:deu_DEU; disabled:false; next:eng_USA; prev:fra_FRA; explode:false; onClicked: {setLocale("deu","DEU","Latn");}}
StdButton { objectName:"eng_USA";
source:StyleSheet.usa_flag[Constants.SOURCE]; x:StyleSheet.usa_flag[Constants.X]; y:StyleSheet.usa_flag[Constants.Y]; width:StyleSheet.usa_flag[Constants.WIDTH]; height:StyleSheet.usa_flag[Constants.HEIGHT];
- id:eng_USA; disabled:false; next:jpn_JPN; prev:deu_DEU; explode:false; onClicked: {setLocale("eng","USA");}}
+ id:eng_USA; disabled:false; next:jpn_JPN; prev:deu_DEU; explode:false; onClicked: {setLocale("eng","USA","Latn");}}
StdButton { objectName:"jpn_JPN";
source:StyleSheet.japanese_flag[Constants.SOURCE]; x:StyleSheet.japanese_flag[Constants.X]; y:StyleSheet.japanese_flag[Constants.Y]; width:StyleSheet.japanese_flag[Constants.WIDTH]; height:StyleSheet.japanese_flag[Constants.HEIGHT];
- id:jpn_JPN; disabled:false; next:back; prev:eng_USA; explode:false; onClicked: {setLocale("jpn","JPN");}}
+ id:jpn_JPN; disabled:false; next:back; prev:eng_USA; explode:false; onClicked: {setLocale("jpn","JPN","Hrkt");}}
Text {
x:StyleSheet.unitsTitle[Constants.X]; y:StyleSheet.unitsTitle[Constants.Y]; width:StyleSheet.unitsTitle[Constants.WIDTH]; height:StyleSheet.unitsTitle[Constants.HEIGHT];color:StyleSheet.unitsTitle[Constants.TEXTCOLOR];styleColor:StyleSheet.unitsTitle[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.unitsTitle[Constants.PIXELSIZE];
diff --git a/src/hmi/qml/POI.qml b/src/hmi/qml/POI.qml
index 8580130..711e71d 100644
--- a/src/hmi/qml/POI.qml
+++ b/src/hmi/qml/POI.qml
@@ -110,7 +110,6 @@ HMIMenu {
var model=view.model;
var ids=[];
var position=Genivi.nav_message(dbusIf,"MapMatchedPosition","GetPosition",["array",["uint16",Genivi.NAVIGATIONCORE_LATITUDE,"uint16",Genivi.NAVIGATIONCORE_LONGITUDE]]);
- var category;
if (!position[1][3][1] && !position[1][7][1]) {
model.clear();
model.append({"name":"No position available"});
@@ -122,14 +121,15 @@ HMIMenu {
for (var i = 0 ; i < categories.length ; i+=2) {
if (categories[i+1][1][3] == 'fuel') {
// Genivi.dump("",categories[i+1][1]);
- category=categories[i+1][1][1];
+ Genivi.fuelCategoryId=categories[i+1][1][1];
}
}
- // Genivi.dump("",Genivi.poisearch_message_get(dbusIf,"GetRootCategory",[]));
+
+ // Genivi.dump("",Genivi.poisearch_message_get(dbusIf,"GetRootCategory",[]));
Genivi.poisearch_message(dbusIf,"SetCenter",["structure",["double",position[1][3][1],"double",position[1][7][1],"int32",0]]);
- Genivi.poisearch_message(dbusIf,"SetCategories",["array",["structure",["uint16",category,"uint32",1000]]]);
+ Genivi.poisearch_message(dbusIf,"SetCategories",["array",["structure",["uint32",Genivi.fuelCategoryId,"uint32",Genivi.radius]]]);
Genivi.poisearch_message(dbusIf,"StartPoiSearch",["string","","uint16",Genivi.POISERVICE_SORT_BY_DISTANCE]);
- var res=Genivi.poisearch_message(dbusIf,"RequestResultList",["uint16",0,"uint16",10000,"array",["string","name"]]);
+ var res=Genivi.poisearch_message(dbusIf,"RequestResultList",["uint16",Genivi.offset,"uint16",Genivi.maxWindowSize,"array",["uint32",0]]);
var res_win=res[5];
for (var i = 0 ; i < res_win.length ; i+=2) {
ids.push(res_win[i+1][0]);
@@ -144,8 +144,8 @@ HMIMenu {
var poi_details=details[1][i+1];
var id=poi_details[1][1];
Genivi.poi_data[id].name=poi_details[1][3];
- Genivi.poi_data[id].lat=poi_details[1][5];
- Genivi.poi_data[id].lon=poi_details[1][7];
+ Genivi.poi_data[id].lat=poi_details[1][5][1];
+ Genivi.poi_data[id].lon=poi_details[1][5][3];
}
// Genivi.dump("",details);
model.clear();