Fix program 4 affecting more LEDs than it should in program mode

This commit is contained in:
true 2024-08-08 04:44:22 -07:00
parent 218819f75f
commit 56fed44f7a
1 changed files with 14 additions and 14 deletions

View File

@ -520,23 +520,23 @@ void led_rgb_4_typing(uint8_t preview, uint8_t tick)
if (typing_fadeout >= 3) typing_fadeout--; if (typing_fadeout >= 3) typing_fadeout--;
else typing_fadeout = 0; else typing_fadeout = 0;
if (!preview || (i == 4) || (((preview & 0xf) == 4) && i >= 5)) { // always do O character
for (j = 0; j < 3; j++) { for (j = 0; j < 3; j++) {
s = rgb[8][j]; s = rgb[4][j];
s *= typing_fadeout; s *= typing_fadeout;
rgb[8][j] = s >> 8; rgb[8][j] = s >> 8;
}
}
w = ((preview & 0xf) == 4) ? 5 : 0;
for (i = w; i < 8; i++) {
rgb[i][0] = rgb[8][0];
rgb[i][1] = rgb[8][1];
rgb[i][2] = rgb[8][2];
} }
if (!preview) { if (!preview) {
w = ((preview & 0xf) == 4) ? 5 : 0;
for (i = w; i < 9; i++) {
rgb[i][0] = rgb[4][0];
rgb[i][1] = rgb[4][1];
rgb[i][2] = rgb[4][2];
}
// cursor
s = cursor[color]; s = cursor[color];
s *= typing_fadeout; s *= typing_fadeout;
cursor[color] = s >> 8; cursor[color] = s >> 8;