jonni83 / smartgarage

1 stars 1 forks source link

Store currently on light #3

Closed riverajo closed 9 years ago

riverajo commented 10 years ago

I'm not entirely sure how the physical relay works, but I think storing the currently lit light in the Relay class would be a good idea. right now your turn_on_only method turns everthing off then turn the chosen color back on. doing it that will cause a delay as it changes the power on all the pins. Also if you are turning the same light on, it will cause it to flash instead of just remain on, which is what I think you would want.

jonni83 commented 10 years ago

i agree. within the current implementation, the code executes so quickly that nothing actually flashes. So, from a usability perspective there is no difference, but from a ComSci perspective, it's dirty. I'll think on this one for a while to try for a simplistic solution.