Skip to content

Commit

Permalink
Found potential cause of "stuck green LED"
Browse files Browse the repository at this point in the history
  • Loading branch information
connornishijima authored Oct 2, 2023
1 parent a17ec09 commit 9a25d5c
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions SENSORY_BRIDGE_FIRMWARE/led_utilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -616,10 +616,14 @@ void render_ui() {

void scale_to_strip() {
if (CONFIG.LED_COUNT == NATIVE_RESOLUTION) {
for (SQ15x16 i = 0; i < CONFIG.LED_COUNT; i++) {
//memcpy(leds_scaled, leds_16, sizeof(CRGB16)*NATIVE_RESOLUTION);
leds_scaled[i.getInteger()] = leds_16[i.getInteger()];
}
// TODO: Potential cause of "Stuck Green LED"
//
// Why did I do a for() loop instead of memcpy?
// Is this causing the green LED bug in unmirrored mode?
//for (SQ15x16 i = 0; i < CONFIG.LED_COUNT; i++) {
memcpy(leds_scaled, leds_16, sizeof(CRGB16)*NATIVE_RESOLUTION);
//leds_scaled[i.getInteger()] = leds_16[i.getInteger()];
//}
} else {
for (SQ15x16 i = 0; i < CONFIG.LED_COUNT; i++) {
SQ15x16 prog = i / SQ15x16(CONFIG.LED_COUNT);
Expand Down

0 comments on commit 9a25d5c

Please sign in to comment.