Closed Martin-HiPi closed 3 years ago
PR created: #35
Hi @linusg,
May I ask when you plan to release a new version of the library with the changes I submitted? I'm looking at my options at the moment as I'll ship the project possibly next week.
Thanks for your time and help! very useful!
Thanks for the ping, just released v2.4.0 here on GitHub and on PyPI. Glad you find it useful :)
Hi @linusg
Thanks, it is very appreciated! Hopefully, our customer will appreciate our work on his screensaver! Martin, HiPi Industries, Canada
In Raspberry Pi OS 32-bit (Pi3B+) Python 3.7.3, if I set backlight.brightness = 100, the value passed to the OS is 258 and should be limited to 255. https://github.com/linusg/rpi-backlight/blob/a7b4b619f5adf16502aa7b18571098814b0bbac0/rpi_backlight/__init__.py#L96
This causes an OSError: [Errno 22] Invalid argument error. Maybe it would be a good idea to sanitize the output of _denormalize_brightness? https://github.com/linusg/rpi-backlight/blob/a7b4b619f5adf16502aa7b18571098814b0bbac0/rpi_backlight/__init__.py#L105-L106
Thanks for your time writing this useful library! EDIT: Forgot to mention library is 2.3.0