Age | Commit message (Collapse) | Author |
|
Previously, bad wait values default to 0 (like `sdf`) because atoi
returns 0 when it doesn't understand the input. This caused very rapid
color changing.
Now we check if wait is set to less than 1, assuming an error, and
defaults to 1000. This accounts for when users pass negative values and
strings.
Also removed unused `highest` variable.
|
|
Was using atoi to load a hex string, which doesn't work (atoi only reads
decimal strings). Switched over to strtol specifying base 16 for hex.
|
|
|
|
Added macros for colormax and step size. Updated load_current_state.
Added comments. Wrote channel_fade function which fades between two
color channels. Also wrote rgb_fade which is the loop function around
all the channels.
|
|
This fades through the rainbow spectrum. The sleep time between next
color change is confurable along with step (color hex distance).
|