aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-demo-hmi/navigation/mapviewer/mapviewer-settings.sh
blob: d1ebb20b8f3a5ac93da2340d042ffe7b8767cd2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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