We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2f93746 commit f366e47Copy full SHA for f366e47
G35StringGroup.cpp
@@ -35,9 +35,12 @@ uint16_t G35StringGroup::get_light_count() {
35
void G35StringGroup::set_color(uint8_t bulb, uint8_t intensity, color_t color) {
36
uint8_t string = 0;
37
while (bulb >= string_offsets_[string] && string < string_count_) {
38
- bulb -= string_offsets_[string++];
+ string++;
39
}
40
if (string < string_count_) {
41
+ if (string > 0) {
42
+ bulb -= string_offsets_[string - 1];
43
+ }
44
strings_[string]->set_color(bulb, intensity, color);
45
} else {
46
// A program is misbehaving.
0 commit comments