-
Notifications
You must be signed in to change notification settings - Fork 11
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
Logarithmic ALS Scaling #71
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi! Thank you very much for the PR, much appreciated!
I just left a couple of questions; the PR looks fine anyway, it just needs some minor changes (i guess!).
Btw again thank you for your time!
Note, moreover, that i am really curious about different meanings for |
https://mjmwired.net/kernel/Documentation/ABI/testing/sysfs-bus-iio |
I was also confused by this. Perhaps then there should be a check to see if, after applying the scale, we have illuminance in lux or not. |
I don't really know how can that be achieved, any idea? |
I've taken all the suggestions and put them in; again, I don't normally code in C, so you might want to double check that I edited the parse_settings function correctly. My only concern with this is that it would throw an error at anyone who currently defines min and max. Perhaps it would be better to add a deprecation warning for now.
Probably a check for if in_illuminance_scale exists for the device. However, I don't know how best to handle things if it can only output in the unitless intensity scale. |
Everything's fine thanks!
I don't think lots of users are overriding it :) it is safe to drop i guess. Moreover, this is done for quite a good reason (better ambient brightness curve) so i am all for it!
Yup that is my greatest concern right now; i will dig into it before next release :) Anyway, really thank you for taking the time to help me! I really appreciated that! |
This is what I had in mind for logarithmic scaling; I changed the default MIN and MAX values based on this general guideline for interpreting lux.
Ensuring min and max >= 1 prevents negative log values.
I am unsure if this breaks any previous compatibilities or expected behaviors, so feel free to change it how you see fit. I also don't code in C so apologies if something is blatantly wrong.