add offset
This commit is contained in:
parent
30cfb7ffe7
commit
c6b19b06e8
|
@ -19,6 +19,7 @@ build_flags =
|
||||||
lib_deps =
|
lib_deps =
|
||||||
fastled/FastLED
|
fastled/FastLED
|
||||||
|
|
||||||
|
|
||||||
[env:teensy31]
|
[env:teensy31]
|
||||||
platform = teensy
|
platform = teensy
|
||||||
board = teensy31
|
board = teensy31
|
||||||
|
@ -26,6 +27,7 @@ framework = arduino
|
||||||
build_flags =
|
build_flags =
|
||||||
-D USB_SERIAL_HID
|
-D USB_SERIAL_HID
|
||||||
-D PIN_DATA=0
|
-D PIN_DATA=0
|
||||||
|
-D LED_OFFSET=134
|
||||||
|
|
||||||
lib_deps =
|
lib_deps =
|
||||||
fastled/FastLED
|
fastled/FastLED
|
||||||
|
|
10
src/main.cpp
10
src/main.cpp
|
@ -34,9 +34,9 @@
|
||||||
|
|
||||||
// --- General Settings
|
// --- General Settings
|
||||||
const uint16_t
|
const uint16_t
|
||||||
Num_Leds = 264; // strip length
|
Num_Leds = 268; // strip length
|
||||||
const uint8_t
|
const uint8_t
|
||||||
Brightness = 127; // maximum brightness
|
Brightness = 255; // maximum brightness
|
||||||
|
|
||||||
// --- FastLED Setings
|
// --- FastLED Setings
|
||||||
#if defined(SK6812RGBW)
|
#if defined(SK6812RGBW)
|
||||||
|
@ -297,8 +297,12 @@ void dataMode(){
|
||||||
|
|
||||||
uint8_t w=calibW*whitecontent;
|
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
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue