Conversation
| # for one channel default to a white channel | ||
| color_channels = "w" | ||
| elif len(channel_list) == 3: | ||
| # TODO this seems like a bug waiting to happen -- what if the channel list ISNT R G B ordered? |
There was a problem hiding this comment.
I think if the channel list isn't RGB ordered then the user should specify a type to clarify what the channels are. It's a fair assumption that if the user doesn't specify, we have some type of fallback.
Alternatively, we could make type required with a default value of "rgb"
There was a problem hiding this comment.
This case in particular only happens if you dont have a config[channels] or a config[type], so I guess really the user is letting the platform defaults do their thing. Since channel_list is always from a simple number to channel set generation via parse_light_number_to_channels, it's not really a userland bug that could happen here, it's a platform not defining a set of three channels as exactly r g then b.
So maybe the comment is too harsh, and all we need is documentation on the parse_light_number_to_channels interface that it must return an rgb-ordered channel list
649456c to
98efd4f
Compare
98efd4f to
1be2006
Compare
1be2006 to
c21e745
Compare
…h > 1 carry value though this should never happen in practice since we only call loop range(3) times, so +0, +1, and +2. Even a 4-channel light could only carry once, so really this should only matter in the 5+ channel case (or perhaps if you can start with an offset of +3, which really should be a carry+1 with 0 offset
for readability. The config params are generally pulled out inside the initialize in these, rather than from the self config reference within the function -- this is intentional to try and keep config reading inside initialize itself
…rought execution order for readability
to better orient the seams with the data structures and relevancy
c21e745 to
dd67090
Compare
|



Nonbreaking refactors and cleanup in the lighting code in prep for FAST EXP ER support