dclaar / purple_air

Code for displaying Air Quality from a Purple Air device
MIT License
6 stars 4 forks source link

Auto-exit brightness set mode after x seconds. #7

Closed csadams closed 4 years ago

csadams commented 4 years ago

When I'm in the brightness adjustment mode, if I don't manually exit out, it will stay in that mode indefinitely, and not update the numbers (I think). I adjusted the brightness earlier today, and started noticing after ~2 hours that wow, the AQI has been super steady all day... and then noticed the brightness bar, turned it off, and the numbers updated. :-)

Suggest adding a timer that auto-exits the brightness set mode after some number of seconds (10, 30, 60?) without any any button presses.

dclaar commented 4 years ago

Would it exit saving the current value? I'm thinking that's the best. This can also happen during setting the correction, but I guess it is blinking at you in that case.

dclaar commented 4 years ago

Well, I picked 2 minutes, because I hate things that go away while I am looking something up. And 2 minutes seems like an eternity! But after 2 minutes, we are pretty sure somebody forgot.

csadams commented 4 years ago

That all sounds good... saving current value, and 2min. Thanks for the quick fix!