op_bright_down.sh & op_bright_up.sh: Changed brightness so that values
[pandora-libraries.git] / testdata / scripts / op_bright_up.sh
1 #!/bin/bash
2 cur=$(cat /sys/devices/platform/twl4030-pwm0-bl/backlight/twl4030-pwm0-bl/brightness);
3 if [ "$cur" -gt "35" ]; then
4    new=$(($cur+10))
5 elif [ "$cur" -gt "20" ]; then 
6    new=$(($cur+7))
7 elif [ "$cur" -gt "13" ]; then 
8    new=$(($cur+5))
9 elif [ "$cur" -gt "5" ]; then 
10    new=$(($cur+3))
11 elif [ "$cur" -gt "0" ]; then 
12    new=$(($cur+1))
13 elif [ "$cur" -eq "0" ]; then 
14    new=3
15 fi
16
17 if [ "$new" -gt "54" ]; then
18    new=54
19 fi
20
21
22
23 echo $new > /sys/devices/platform/twl4030-pwm0-bl/backlight/twl4030-pwm0-bl/brightness