Skip to content
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

fading fails with float brightness values #59

Open
fonebone42 opened this issue Jan 25, 2024 · 0 comments
Open

fading fails with float brightness values #59

fonebone42 opened this issue Jan 25, 2024 · 0 comments

Comments

@fonebone42
Copy link

fonebone42 commented Jan 25, 2024

try the following

from rpi_backlight import Backlight

backlight = Backlight()<br/>
backlight.fade_duration = 0.5  
backlight.brightness = 0     -- works as expected  
backlight.brightness = 10    -- works as expected
backlight.brightness = 4.2   -- works as expected
backlight.brightness = 4.3   -- DOES NOT WORK AS EXPECTED, takes much more than 0.5sec and brightness goes to max

I guess the problem lies here (rpi_backlight/init.py(194)brightness())

192               while (
193                     0.0 <= current_value
**194                   and current_value != value    
195                     and current_value <= 100.0
196                 ):

my environment: rpi-backlight 2.6.0 on Rabpberry Pi 3B running Linux raspi1 6.1.21-v7+ with Raspberry Original 7inch display v1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant