1
0
mirror of https://github.com/EliasKotlyar/Xiaomi-Dafang-Hacks.git synced 2025-09-09 07:30:57 +02:00

Fixed OSD display (#1015)

This commit is contained in:
dagrider
2019-05-01 01:17:42 -05:00
committed by jmtatsch
parent 1904a3e4c0
commit 483d7a4c63
6 changed files with 33 additions and 27 deletions

View File

@@ -2,17 +2,17 @@
## Get OSD-Information
if [ -f /system/sdcard/config/osd.conf ]; then
source /system/sdcard/config/osd.conf 2>/dev/null
. /system/sdcard/config/osd.conf > /dev/null 2>/dev/null
AXIS=""
# Call setconf only if we have something to set, to avoid outputing error messages
[ ${DISPLAY_AXIS} ] && AXIS=`/system/sdcard/bin/motor -d u -s 0 | tail +5 | awk '{printf ("%s ",$0)}' | awk '{print "X="$2,"Y="$4}'` && OSD=$(echo ${OSD} | sed -r "s/X=.*$/${AXIS}/")
[ ! -z "${OSD}" ] && /system/sdcard/bin/setconf -k o -v "${OSD}" 2>/dev/null
[ "${DISPLAY_AXIS}" = true ] && AXIS=$(/system/sdcard/bin/motor -d s | sed '3d' | awk '{printf ("%s ",$0)}' | awk '{print " X="$2,"Y="$4}')
[ "${ENABLE_OSD}" = true ] && /system/sdcard/bin/setconf -k o -v "${OSD}${AXIS}" 2>/dev/null
[ ! -z "${COLOR}" ] && /system/sdcard/bin/setconf -k c -v ${COLOR} 2>/dev/null
[ ! -z "${SIZE}" ] && /system/sdcard/bin/setconf -k s -v ${SIZE} 2>/dev/null
[ ! -z "${POSY}" ] && /system/sdcard/bin/setconf -k x -v ${POSY} 2>/dev/null
[ ! -z "${FIXEDW}" ] && /system/sdcard/bin/setconf -k w -v ${FIXEDW} 2>/dev/null
[ ! -z "${SPACE}" ] && /system/sdcard/bin/setconf -k p -v ${SPACE} 2>/dev/null
[ ! -z "${FONTNAME}" ] && /system/sdcard/bin/setconf -k e -v ${FONTNAME} 2>/dev/null
else
/system/sdcard/bin/setconf -k o -v ""
fi