Skip to content

Commit

Permalink
Fixed bug: keyboard leds would turn white when pressing random button
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidMenting committed Feb 18, 2021
1 parent dfce970 commit cbcb298
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
Binary file modified duo-firmware.bin
Binary file not shown.
5 changes: 4 additions & 1 deletion src/Leds.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@

#include <FastLED.h>

#define COLOR_ORDER GRB

#define LED_TYPE SK6812
#define CORRECTION_SK6812 0xFFF1E0
#define CORRECTION_SK6805 0xFFD3AA
#define CORRECTION_SK6805 0xFFD3E0
#define LED_WHITE CRGB(230,255,150)

#define leds(A) physical_leds[led_order[A]]
Expand Down
3 changes: 1 addition & 2 deletions src/pins_duo_1.0.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,7 @@ const int ENV_LED = LED_3;

const int SYNC_OUT_PIN = SYNC_OUT;

#define COLOR_ORDER GRB
#define LED_TYPE SK6812


// One more LED than the physical number of leds for loopback testing
const int NUM_LEDS = 19+1;
Expand Down
2 changes: 1 addition & 1 deletion src/src.ino
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ void note_on(uint8_t midi_note, uint8_t velocity, bool enabled) {
envelope1.noteOn();
envelope2.noteOn();
} else {
leds(current_step+random_offset) = LED_WHITE;
leds((current_step+random_offset)%SEQUENCER_NUM_STEPS) = LED_WHITE;

}
}
Expand Down

0 comments on commit cbcb298

Please sign in to comment.