Fix brightness restore on RG351x devices.
This commit is contained in:
parent
ec89e3b701
commit
ce8d417e0c
1 changed files with 5 additions and 1 deletions
|
@ -17,5 +17,9 @@ then
|
|||
BRIGHTNESS=3
|
||||
fi
|
||||
BRIGHTNESS=$(printf "%.0f" ${BRIGHTNESS})
|
||||
printf "%.0f" $(echo "${BRIGHTNESS} * 2.56" | bc) > /sys/class/backlight/backlight/brightness
|
||||
if [ "$(cat /sys/class/backlight/backlight/max_brightness)" = 255 ]
|
||||
then
|
||||
FACTOR="* 2.56"
|
||||
fi
|
||||
printf "%.0f" $(echo "${BRIGHTNESS} ${FACTOR}" | bc) > /sys/class/backlight/backlight/brightness
|
||||
set_setting system.brightness ${BRIGHTNESS}
|
||||
|
|
Loading…
Reference in a new issue