Thread: Jolla C
View Single Post
Feathers McGraw's Avatar
Posts: 654 | Thanked: 2,368 times | Joined on Jul 2014 @ UK
#413
Originally Posted by szopin View Post
there are these, not sure which is the correct one:
Code:
[nemo@Sailfish ~]$ cd /sys/class/leds/
button-backlight/ flashlight/       lcd-backlight/    torch-light0/
[nemo@Sailfish ~]$ cd /sys/class/leds/torch-light0/
[nemo@Sailfish torch-light0]$ ls
brightness  device  max_brightness  power  subsystem  trigger  uevent
[nemo@Sailfish torch-light0]$ cd ../flashlight
[nemo@Sailfish flashlight]$ ls
brightness  device  max_brightness  power  subsystem  trigger  uevent
[nemo@Sailfish flashlight]$
Thank you for this. Interesting too, I can't imagine what the difference between "torch-light0" and "flashlight" is.

Can you do a ls- l on both of those directories please? On the other devices, the control file is world readable and writable. If it's obvious which one is which, you could try turning the torch on and off manually, e.g. to turn it on

Code:
echo 1 > /sys/class/leds/torch-light0/brightness
And to turn it off:

Code:
echo 0 > /sys/class/leds/torch-light0/brightness
I have some other changes to package, so if we can figure this out tonight I should be able to provide a working flashlight app pretty much straight away.
 

The Following User Says Thank You to Feathers McGraw For This Useful Post: