-
Notifications
You must be signed in to change notification settings - Fork 9
/
jivelite-sp
50 lines (38 loc) · 1.23 KB
/
jivelite-sp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/sh
export LOG=/var/log/pcp_jivelite.log
if [ -f /usr/local/etc/pcp/pcp.cfg ]; then
source /usr/local/etc/pcp/pcp.cfg
if [ ! -z ${SCREENROTATE} ]; then
MODEL=$(busybox awk '/^Model/ { print $5 }' /proc/cpuinfo)
if [ "${MODEL}" == "5" ]; then
# Rotation CCW=270, UD=180, CW=90 degrees
if [ "${SCREENROTATE}" == "180" ]; then
export SDL_VIDEO_FBCON_ROTATION=UD
export TSLIB_CALIBFILE=/usr/local/etc/pointercal-r2
echo "Pi5 detected sdl screen rotation enabled." >> $LOG
fi
fi
fi
fi
if [ ! -z ${JL_FRAME_BUFFER} ]; then
export SDL_FBDEV=$JL_FRAME_BUFFER
echo "Using $SDL_FBDEV as frame buffer device." >> $LOG
fi
if [ -z ${JL_FRAME_RATE} ]; then
JL_FRAME_RATE=22
fi
export JIVE_FRAMERATE=$JL_FRAME_RATE
echo "Frame rate set to $JIVE_FRAMERATE frames per second." >> $LOG
if [ -z ${JL_FRAME_DEPTH} ]; then
JL_FRAME_DEPTH=32
fi
/usr/sbin/fbset -depth $JL_FRAME_DEPTH >> $LOG
echo "Frame buffer color bit depth set to $JL_FRAME_DEPTH." >> $LOG
if [ ! -z ${SDL_TOUCHSCREEN} ]; then
export JIVE_NOCURSOR=1
fi
export HOME=/home/tc
while true; do
sleep 3
/opt/jivelite/bin/jivelite >> $LOG 2>&1
done