1
0
mirror of https://github.com/EliasKotlyar/Xiaomi-Dafang-Hacks.git synced 2025-09-08 23:20:48 +02:00

fix recovery of motion sensitivity after switching on/off

This commit is contained in:
Julian Tatsch
2019-02-18 21:17:35 +01:00
parent 179c52280b
commit e656f06138
5 changed files with 30 additions and 17 deletions

View File

@@ -6,9 +6,13 @@ if [ ! -f /system/sdcard/config/motion.conf ]; then
fi
if [ -f /system/sdcard/config/motion.conf ] ; then
source /system/sdcard/config/motion.conf 2>/dev/null
. /system/sdcard/config/motion.conf 2>/dev/null
/system/sdcard/bin/setconf -k r -v ${region_of_interest} 2>/dev/null
/system/sdcard/bin/setconf -k m -v ${motion_sensitivity} 2>/dev/null
if [ "$motion_detection" = false ]; then
/system/sdcard/bin/setconf -k m -v -1 2>/dev/null
else
/system/sdcard/bin/setconf -k m -v ${motion_sensitivity} 2>/dev/null
fi
/system/sdcard/bin/setconf -k z -v ${motion_indicator_color} 2>/dev/null
/system/sdcard/bin/setconf -k t -v ${motion_tracking} 2>/dev/null
fi;