summaryrefslogtreecommitdiffstats
path: root/recipes-demo-hmi/navigation/mapviewer
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-demo-hmi/navigation/mapviewer')
-rwxr-xr-xrecipes-demo-hmi/navigation/mapviewer/mapviewer-settings.sh23
-rw-r--r--recipes-demo-hmi/navigation/mapviewer/mapviewer.service7
2 files changed, 25 insertions, 5 deletions
diff --git a/recipes-demo-hmi/navigation/mapviewer/mapviewer-settings.sh b/recipes-demo-hmi/navigation/mapviewer/mapviewer-settings.sh
new file mode 100755
index 000000000..d1ebb20b8
--- /dev/null
+++ b/recipes-demo-hmi/navigation/mapviewer/mapviewer-settings.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+LMC=/usr/bin/LayerManagerControl
+IFS=$'\n'
+
+SURFACEID=16777216
+
+while :
+do
+ /bin/sleep 1
+ surfaces=()
+ for line in $($LMC get surfaces 2> /dev/null); do
+ if [ "X-" = "X$(echo $line | awk '{print $1}')" ]; then
+ surfaceid=$(echo $line | awk '{print $3}')
+ if [ "$surfaceid" = "$SURFACEID" ]; then
+ $LMC set surface $SURFACEID source region 0 0 384 368
+ $LMC set surface $SURFACEID destination region 0 0 384 368
+ $LMC set surface $SURFACEID visibility 1
+ $LMC set layer 1000 render order $SURFACEID
+ exit
+ fi
+ fi
+ done
+done
diff --git a/recipes-demo-hmi/navigation/mapviewer/mapviewer.service b/recipes-demo-hmi/navigation/mapviewer/mapviewer.service
index 5a78843c7..eba4a0dd0 100644
--- a/recipes-demo-hmi/navigation/mapviewer/mapviewer.service
+++ b/recipes-demo-hmi/navigation/mapviewer/mapviewer.service
@@ -11,12 +11,9 @@ Environment=NAVI_DATA_DIR=/var/mapdata/navi_data_UK/japan_TR9 XDG_RUNTIME_DIR=/r
ExecStartPre=/bin/sleep 5
ExecStart=/usr/bin/mapview
ExecStartPost=/usr/bin/LayerManagerControl create layer 1000 1920 1080
-ExecStartPost=/usr/bin/LayerManagerControl set layer 1000 render order 0x1000000
-ExecStartPost=/usr/bin/LayerManagerControl set surface 0x1000000 source region 0 0 384 368
-ExecStartPost=/usr/bin/LayerManagerControl set surface 0x000000 destination region 0 0 384 368
-ExecStartPost=/usr/bin/LayerManagerControl set screen 1 render order 1000
ExecStartPost=/usr/bin/LayerManagerControl set layer 1000 visibility 1
-ExecStartPost=/usr/bin/LayerManagerControl set surface 0x1000000 visibility 1
+ExecStartPost=/usr/bin/LayerManagerControl set screen 1 render order 1000
+ExecStartPost=/usr/AGL/mapviewer/mapviewer-settings.sh
ExecStop=/usr/bin/killall -s KILL mapview
Type=simple