mirror of https://github.com/hak5/openwrt.git
base-files: use max_brightness to set LED
LEDs which are controlled by a PWM need to use the supplied max_brightness instead. Otherwise they might appear to be very dim / broken. Signed-off-by: Chris R Blake <chrisrblake93@gmail.com> SVN-Revision: 47854lede-17.01
parent
354aa80ada
commit
ec6b85ca0e
|
@ -44,7 +44,7 @@ load_led() {
|
||||||
ret="$?"
|
ret="$?"
|
||||||
|
|
||||||
[ $default = 1 ] &&
|
[ $default = 1 ] &&
|
||||||
echo 1 >/sys/class/leds/${sysfs}/brightness
|
cat /sys/class/leds/${sysfs}/max_brightness > /sys/class/leds/${sysfs}/brightness
|
||||||
|
|
||||||
[ $ret = 0 ] || {
|
[ $ret = 0 ] || {
|
||||||
echo >&2 "Skipping trigger '$trigger' for led '$name' due to missing kernel module"
|
echo >&2 "Skipping trigger '$trigger' for led '$name' due to missing kernel module"
|
||||||
|
|
Loading…
Reference in New Issue