Clean it up
This commit is contained in:
parent
0ea01d6d25
commit
a31115d4ff
@ -55,24 +55,32 @@ bool updateColor(LEDSelect selection, CRGB color, CRGB* leds) {
|
|||||||
if (selection.side == 255) {
|
if (selection.side == 255) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (selection.column == 255 && selection.row == 255) {
|
if (selection.column == 255 && selection.row == 255) {
|
||||||
for (int n = 0; n < 9; n++) {
|
for (int n = 0; n < 9; n++) {
|
||||||
CRGB* led = &leds[selection.side * 9 + n];
|
CRGB* led = &leds[selection.side * 9 + n];
|
||||||
if (*led != (CRGB)0x000000)*led = color;
|
if (*led != (CRGB) 0x000000) {
|
||||||
|
*led = color;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (selection.column == 255 && selection.row != 255) {
|
else if (selection.column == 255 && selection.row != 255) {
|
||||||
for (int n = 0; n < 3; n++) {
|
for (int n = 0; n < 3; n++) {
|
||||||
CRGB* led = &leds[decodeLED({ selection.side, n, selection.row })];
|
CRGB* led = &leds[decodeLED({ selection.side, n, selection.row })];
|
||||||
if (*led != (CRGB)0x000000)*led = color;
|
if (*led != (CRGB)0x000000) {
|
||||||
|
*led = color;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (selection.column != 255 && selection.row == 255) {
|
else if (selection.column != 255 && selection.row == 255) {
|
||||||
for (int n = 0; n < 3; n++) {
|
for (int n = 0; n < 3; n++) {
|
||||||
CRGB* led = &leds[decodeLED({ selection.side, selection.column, n })];
|
CRGB* led = &leds[decodeLED({ selection.side, selection.column, n })];
|
||||||
if (*led != (CRGB)0x000000)*led = color;
|
if (*led != (CRGB) 0x000000) {
|
||||||
|
*led = color;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user