-
Notifications
You must be signed in to change notification settings - Fork 54
Fix Issues: Pixel and Status Pixel #708
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,6 +51,7 @@ void initStatusLED() { | |
statusPixel = new Adafruit_NeoPixel( | ||
STATUS_NEOPIXEL_NUM, STATUS_NEOPIXEL_PIN, NEO_GRB + NEO_KHZ800); | ||
statusPixel->begin(); | ||
statusPixel->clear(); | ||
statusPixel->show(); // turn OFF all pixels | ||
WS.lockStatusNeoPixel = true; | ||
} | ||
|
@@ -69,6 +70,7 @@ void initStatusLED() { | |
STATUS_DOTSTAR_PIN_CLK, STATUS_DOTSTAR_COLOR_ORDER) | ||
#endif | ||
statusPixelDotStar->begin(); | ||
statusPixelDotStar->clear(); | ||
statusPixelDotStar->show(); // turn OFF all pixels | ||
WS.lockStatusDotStar = true; | ||
} | ||
|
@@ -99,9 +101,15 @@ void initStatusLED() { | |
*/ | ||
/****************************************************************************/ | ||
void releaseStatusLED() { | ||
WS_DEBUG_PRINTLN("Releasing status LED"); | ||
#ifdef USE_STATUS_NEOPIXEL | ||
delete statusPixel; // Deallocate Adafruit_NeoPixel object, set data pin back | ||
// to INPUT. | ||
#ifdef ARDUINO_ARCH_ESP32 | ||
// Release the rmtPin for use by other peripherals | ||
statusPixel->updateLength(0); | ||
|
||
statusPixel->show(); | ||
#endif | ||
// Dealloc. NeoPixel object | ||
delete statusPixel; | ||
WS.lockStatusNeoPixel = false; // unlock | ||
#endif | ||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.