-
-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature request]: Support applesmc
ALS sensor type
#74
Comments
Hello! Exciting to get it it working on MacBook! To clarify, you changed this config line, and you get the crash, is that right? Line 2 in 191e984
Could you show me the contents of the folder? ls -al /sys/devices/platform/applesmc.768/light Thanks |
Hi, only just realised there was a config.toml, I pulled it from the AUR and didn't manually build it. |
Lovely! Allow me to give you some general pointers, and feel free to ask for clarification 🙂 In this project, the architecture is already prepared to be plug-and-play for different hardware. First, create a file next to At the very minimum, your file must contain the implementation for this trait: Lines 11 to 13 in 191e984
In Lines 72 to 80 in 191e984
and in Lines 15 to 23 in 191e984
Most likely, you can have exactly the same function, with substituted "raw" value read from your sensor. What are those "thresholds": your sensor will give some integer values, and we need to convert them to some logical groups. I recommend trying to have the same groups as here ("night", "dark", "dim", etc) - and the numbers are the values from your Line 3 in 191e984
Don't worry too much about getting the perfect values, it's just a default config. But it would be nice for them to be reasonable for most people 😉 How you find them is an art... Go in a dark room, see what value your sensor shows, go in a sunny day outside and see the values, etc... Once you do this, just fill out the rest of the glue code, like defining config like so: Lines 10 to 14 in 191e984
Extending And good luck, enjoy this exploration! |
applesmc
ALS sensor type
Have kind of the same issue as well.
I have
under I tried to set |
Judging by what you shared, your laptop might not have This thread is about a different kind of sensor that wluma currently doesn't support, called |
Please describe your feature request
Trying to use wluma on a MacBook Pro 11,x on Arch. The ALS output is at
/sys/devices/platform/applesmc.768/light
Error shown is
thread 'als' panicked at 'Unable to initialize ALS IIO sensor: "No iio device found"', src/main.rs:112:26
wluma will not launch.
The text was updated successfully, but these errors were encountered: