Closed bjonord closed 10 years ago
This is my take on a very rough fade
method (which the sleep light basically is). Not ready for prime time. I know you are working on the same, but the problem intrigued me so couldn't stop. Hope you don't mind.
https://github.com/danielthor/blink_stick/blob/color_fade/lib/blink_stick/action_handler.rb#L21
Not at all, will have a look at it tomorrow. :+1:
Went all out on writing this as a separate class. Might have been overkill as you could just as well have done it in the rows you linked to above. At least I managed to do it in less than 100 lines with a bit of ruby magic. Somehow writing a proper class felt more appropriate. :smile:
But I am envisioning this as a start for more actions that can be developed. Not exactly sure which yet.
pulse
method added in 398c8af0fe3b90e48e3926312418daaaf1a40b0b thanks to @bjoska!
I'm thinking this will be a good functionality to build on, in the long run.