Skip to content

Commit 9a25d5c

Browse files
Found potential cause of "stuck green LED"
1 parent a17ec09 commit 9a25d5c

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

SENSORY_BRIDGE_FIRMWARE/led_utilities.h

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -616,10 +616,14 @@ void render_ui() {
616616

617617
void scale_to_strip() {
618618
if (CONFIG.LED_COUNT == NATIVE_RESOLUTION) {
619-
for (SQ15x16 i = 0; i < CONFIG.LED_COUNT; i++) {
620-
//memcpy(leds_scaled, leds_16, sizeof(CRGB16)*NATIVE_RESOLUTION);
621-
leds_scaled[i.getInteger()] = leds_16[i.getInteger()];
622-
}
619+
// TODO: Potential cause of "Stuck Green LED"
620+
//
621+
// Why did I do a for() loop instead of memcpy?
622+
// Is this causing the green LED bug in unmirrored mode?
623+
//for (SQ15x16 i = 0; i < CONFIG.LED_COUNT; i++) {
624+
memcpy(leds_scaled, leds_16, sizeof(CRGB16)*NATIVE_RESOLUTION);
625+
//leds_scaled[i.getInteger()] = leds_16[i.getInteger()];
626+
//}
623627
} else {
624628
for (SQ15x16 i = 0; i < CONFIG.LED_COUNT; i++) {
625629
SQ15x16 prog = i / SQ15x16(CONFIG.LED_COUNT);

0 commit comments

Comments
 (0)