Quote:
Originally Posted by baskerville
@tshering: Is the script packaged in plato-launcher-ksm-0.3.1.zip ok?
|
I was thinking of something like:
so that you have to distribute only one version. KSM would call it with a wrapper script like this
Spoiler:
Code:
#! /bin/sh
# todo: set rotation value for the different device models
# currently I know only for sure that trilogy|kraken|alyssum|daylight need 3
case $PRODUCT in
trilogy|kraken|alyssum|daylight ) platoRotation="3";;
* ) platoRotation="3";;
esac
currentRotation=$(cat /sys/class/graphics/fb0/rotate)
echo "${platoRotation}" > /sys/class/graphics/fb0/rotate
cat /sys/class/graphics/fb0/rotate > /sys/class/graphics/fb0/rotate
# todo: maybe warn when wifi is on?
${platobasedir}/plato.sh
# alternatively
#cd "${platobasedir}" || exit 1
#export LD_LIBRARY_PATH="libs:${LD_LIBRARY_PATH}"
#./plato > info.log 2>&1 || mv info.log crash.log
echo "${currentRotation}" > /sys/class/graphics/fb0/rotate
cat /sys/class/graphics/fb0/rotate > /sys/class/graphics/fb0/rotate
# todo: maybe warn when wifi is on?
note: the line
Code:
cat /sys/class/graphics/fb0/rotate > /sys/class/graphics/fb0/rotate
is needed for some models (Aura HD, H2O, H2O2, if I remember correctly).
Are you certain that 3 is the correct rotate value for all models?