add offset
This commit is contained in:
parent
30cfb7ffe7
commit
c6b19b06e8
|
@ -19,6 +19,7 @@ build_flags =
|
|||
lib_deps =
|
||||
fastled/FastLED
|
||||
|
||||
|
||||
[env:teensy31]
|
||||
platform = teensy
|
||||
board = teensy31
|
||||
|
@ -26,6 +27,7 @@ framework = arduino
|
|||
build_flags =
|
||||
-D USB_SERIAL_HID
|
||||
-D PIN_DATA=0
|
||||
-D LED_OFFSET=134
|
||||
|
||||
lib_deps =
|
||||
fastled/FastLED
|
||||
|
|
10
src/main.cpp
10
src/main.cpp
|
@ -34,9 +34,9 @@
|
|||
|
||||
// --- General Settings
|
||||
const uint16_t
|
||||
Num_Leds = 264; // strip length
|
||||
Num_Leds = 268; // strip length
|
||||
const uint8_t
|
||||
Brightness = 127; // maximum brightness
|
||||
Brightness = 255; // maximum brightness
|
||||
|
||||
// --- FastLED Setings
|
||||
#if defined(SK6812RGBW)
|
||||
|
@ -297,8 +297,12 @@ void dataMode(){
|
|||
|
||||
uint8_t w=calibW*whitecontent;
|
||||
|
||||
int inew = i;
|
||||
#ifdef LED_OFFSET
|
||||
inew = (i+LED_OFFSET)%Num_Leds; //if offset defined, move led 1 around and wrap around at the end
|
||||
#endif
|
||||
|
||||
send_leds[i] = CRGBW(r, g, b, w); //transfer to rgbw struct
|
||||
send_leds[inew] = CRGBW(r, g, b, w); //transfer to rgbw struct
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue