Skip to content

Commit aefd2a0

Browse files
authored
Merge pull request #843 from adafruit/funhouse-dotstar-colour-order
Fix DotStar color format for FunHouse status pixels
2 parents ed8c32c + 2a42519 commit aefd2a0

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

src/Wippersnapper_Boards.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
#define STATUS_DOTSTAR_PIN_DATA PIN_DOTSTAR_DATA ///< DotStar Data Pin
4242
#define STATUS_DOTSTAR_PIN_CLK PIN_DOTSTAR_CLOCK ///< DotStar Clock Pin
4343
#define STATUS_DOTSTAR_NUM 5 ///< Number of DotStar LEDs
44-
#define STATUS_DOTSTAR_COLOR_ORDER DOTSTAR_GBR ///< DotStar Color Order
44+
#define STATUS_DOTSTAR_COLOR_ORDER DOTSTAR_BGR ///< DotStar Color Order
4545
#define USE_PSRAM ///< Board has PSRAM, use it for dynamic memory allocation
4646
#elif defined(ARDUINO_METRO_ESP32S2)
4747
#define BOARD_ID "metroesp32s2"

src/components/statusLED/Wippersnapper_StatusLED.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Adafruit_NeoPixel *statusPixel = new Adafruit_NeoPixel(
2525
#ifdef USE_STATUS_DOTSTAR
2626
Adafruit_DotStar *statusPixelDotStar =
2727
new Adafruit_DotStar(STATUS_DOTSTAR_NUM, STATUS_DOTSTAR_PIN_DATA,
28-
STATUS_DOTSTAR_PIN_CLK, DOTSTAR_BRG);
28+
STATUS_DOTSTAR_PIN_CLK, DOTSTAR_BGR);
2929
#endif
3030

3131
/****************************************************************************/
@@ -67,7 +67,8 @@ void initStatusLED() {
6767
#else
6868
statusPixelDotStar =
6969
new Adafruit_DotStar(STATUS_DOTSTAR_NUM, STATUS_DOTSTAR_PIN_DATA,
70-
STATUS_DOTSTAR_PIN_CLK, STATUS_DOTSTAR_COLOR_ORDER)
70+
STATUS_DOTSTAR_PIN_CLK,
71+
STATUS_DOTSTAR_DEFAULT_COLOR_ORDER)
7172
#endif
7273
statusPixelDotStar->begin();
7374
statusPixelDotStar->clear();
@@ -412,4 +413,4 @@ void statusLEDBlink(ws_led_status_t statusState) {
412413
delay(100);
413414
blinkNum--;
414415
}
415-
}
416+
}

src/components/statusLED/Wippersnapper_StatusLED.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ typedef enum ws_led_status_t {
5757
#define LED_ERROR RED ///< Error state
5858

5959
#define STATUS_PIXEL_BRIGHTNESS_DEFAULT 0.5 ///< Default status pixel brightness
60+
#define STATUS_DOTSTAR_DEFAULT_COLOR_ORDER DOTSTAR_BGR ///< FunHouse default
6061

6162
// Status LED
6263
void initStatusLED();

0 commit comments

Comments
 (0)