summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Bloch <matthias.bloch@mpsa.com>2017-03-08 06:21:21 -0800
committerMatthias Bloch <matthias.bloch@mpsa.com>2017-03-08 06:21:21 -0800
commitef97f1a0866832f84f3f1780a407d6a98e24c8f2 (patch)
tree6301eb11dd86203619eb8f3334ab454e12b56f07 /src
parentf7ab563cd23182dcedaa7509b1ae66774addf181 (diff)
downloadpoi-service-ef97f1a0866832f84f3f1780a407d6a98e24c8f2.tar.gz
Fix bugs: LayerManager & order startup for GDP
Diffstat (limited to 'src')
-rw-r--r--src/navigation/map-viewer/mapviewercontrol-plugin/genivi_mapviewer_mapviewercontrol.cxx17
-rw-r--r--src/navigation/map-viewer/mapviewercontrol-server-plugin/genivi_mapviewer_mapviewercontrol.cxx17
-rw-r--r--src/navigation/map-viewer/navit_genivi_mapviewer_fsa.service5
-rw-r--r--src/navigation/navigation-core/navit_genivi_navigationcore_fsa.service4
-rw-r--r--src/poi-service/poi-server/poi-server.service4
5 files changed, 32 insertions, 15 deletions
diff --git a/src/navigation/map-viewer/mapviewercontrol-plugin/genivi_mapviewer_mapviewercontrol.cxx b/src/navigation/map-viewer/mapviewercontrol-plugin/genivi_mapviewer_mapviewercontrol.cxx
index 726503a..1f64c8d 100644
--- a/src/navigation/map-viewer/mapviewercontrol-plugin/genivi_mapviewer_mapviewercontrol.cxx
+++ b/src/navigation/map-viewer/mapviewercontrol-plugin/genivi_mapviewer_mapviewercontrol.cxx
@@ -1440,7 +1440,7 @@ static void callbackFunction(ilmObjectType object, t_ilm_uint surfaceId, t_ilm_b
if (created) {
if (surfaceId == FSA_SURFACE) {
- //Timing issue for creation - Need to add tempo
+ //FIXIT: Need to add tempo
sleep(1);
//Grab all the layers - HMI will be pLength-2 and FSA pLength-1
@@ -1448,8 +1448,21 @@ static void callbackFunction(ilmObjectType object, t_ilm_uint surfaceId, t_ilm_b
fprintf(stderr, "error on ilm_getLayerIDs\n");
}
- renderOrder[1] = SURFACE_OFFSET + ppArray[pLength - 2];
+ //FIXIT: Since we don't know thep id of hmi_launcher and order of start.
+ //Guess it is teh last one or the one before navit mapviewer PID.
renderOrder[0] = FSA_SURFACE;
+ if (ppArray[pLength - 2] != FSA_SURFACE)
+ renderOrder[1] = SURFACE_OFFSET + ppArray[pLength - 2];
+ if (ilm_layerSetRenderOrder(ppArray[pLength - 2],renderOrder,2) != ILM_SUCCESS) {
+ fprintf(stderr,"error on ilm_layerSetRenderOrder\n");
+ }
+ else if (ppArray[pLength - 1] != FSA_SURFACE)
+ renderOrder[1] = SURFACE_OFFSET + ppArray[pLength - 1];
+ if (ilm_layerSetRenderOrder(ppArray[pLength - 1],renderOrder,2) != ILM_SUCCESS) {
+ fprintf(stderr,"error on ilm_layerSetRenderOrder\n");
+ }
+ else
+ fprintf(stderr,"error on render order guess\n");
if (ilm_layerSetRenderOrder(ppArray[pLength - 1],renderOrder,2) != ILM_SUCCESS) {
fprintf(stderr,"error on ilm_layerSetRenderOrder\n");
diff --git a/src/navigation/map-viewer/mapviewercontrol-server-plugin/genivi_mapviewer_mapviewercontrol.cxx b/src/navigation/map-viewer/mapviewercontrol-server-plugin/genivi_mapviewer_mapviewercontrol.cxx
index c5a3a00..c34df33 100644
--- a/src/navigation/map-viewer/mapviewercontrol-server-plugin/genivi_mapviewer_mapviewercontrol.cxx
+++ b/src/navigation/map-viewer/mapviewercontrol-server-plugin/genivi_mapviewer_mapviewercontrol.cxx
@@ -1590,7 +1590,7 @@ static void callbackFunction(ilmObjectType object, t_ilm_uint surfaceId, t_ilm_b
if (created) {
if (surfaceId == FSA_SURFACE) {
- //Timing issue for creation - Need to add tempo
+ //FIXIT: Need to add tempo
sleep(1);
//Grab all the layers - HMI will be pLength-2 and FSA pLength-1
@@ -1598,8 +1598,21 @@ static void callbackFunction(ilmObjectType object, t_ilm_uint surfaceId, t_ilm_b
fprintf(stderr, "error on ilm_getLayerIDs\n");
}
- renderOrder[1] = SURFACE_OFFSET + ppArray[pLength - 2];
+ //FIXIT: Since we don't know thep id of hmi_launcher and order of start.
+ //Guess it is teh last one or the one before navit mapviewer PID.
renderOrder[0] = FSA_SURFACE;
+ if (ppArray[pLength - 2] != FSA_SURFACE)
+ renderOrder[1] = SURFACE_OFFSET + ppArray[pLength - 2];
+ if (ilm_layerSetRenderOrder(ppArray[pLength - 2],renderOrder,2) != ILM_SUCCESS) {
+ fprintf(stderr,"error on ilm_layerSetRenderOrder\n");
+ }
+ else if (ppArray[pLength - 1] != FSA_SURFACE)
+ renderOrder[1] = SURFACE_OFFSET + ppArray[pLength - 1];
+ if (ilm_layerSetRenderOrder(ppArray[pLength - 1],renderOrder,2) != ILM_SUCCESS) {
+ fprintf(stderr,"error on ilm_layerSetRenderOrder\n");
+ }
+ else
+ fprintf(stderr,"error on render order guess\n");
if (ilm_layerSetRenderOrder(ppArray[pLength - 1],renderOrder,2) != ILM_SUCCESS) {
fprintf(stderr,"error on ilm_layerSetRenderOrder\n");
diff --git a/src/navigation/map-viewer/navit_genivi_mapviewer_fsa.service b/src/navigation/map-viewer/navit_genivi_mapviewer_fsa.service
index a961e33..1a6fae3 100644
--- a/src/navigation/map-viewer/navit_genivi_mapviewer_fsa.service
+++ b/src/navigation/map-viewer/navit_genivi_mapviewer_fsa.service
@@ -1,8 +1,7 @@
-
[Unit]
Description=Navit (Mapviewer part) Service for FSA configuration file
-Requires=dbus.service enhanced-position-service.service hmi-launcher_fsa.service
-After=enhanced-position-service_fsa.service hmi-launcher_fsa.service
+Requires=dbus.service enhanced-position-service.service
+After=enhanced-position-service_fsa.service
[Service]
Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/0/dbus/user_bus_socket
diff --git a/src/navigation/navigation-core/navit_genivi_navigationcore_fsa.service b/src/navigation/navigation-core/navit_genivi_navigationcore_fsa.service
index e65f54b..47bcf27 100644
--- a/src/navigation/navigation-core/navit_genivi_navigationcore_fsa.service
+++ b/src/navigation/navigation-core/navit_genivi_navigationcore_fsa.service
@@ -1,7 +1,3 @@
-#
-# navit_genivi_navigationcore fsa systemd service unit file
-#
-
[Unit]
Description=Navit (Navigationcore part) Service for FSA configuration file
Requires=dbus.service enhanced-position-service.service
diff --git a/src/poi-service/poi-server/poi-server.service b/src/poi-service/poi-server/poi-server.service
index b293925..bef210e 100644
--- a/src/poi-service/poi-server/poi-server.service
+++ b/src/poi-service/poi-server/poi-server.service
@@ -1,7 +1,3 @@
-#
-# poi-server fsa systemd service unit file
-#
-
[Unit]
Description=POI Server for FSA configuration file
Requires=dbus.service