Skip to content

Commit 393fffa

Browse files
committed
Reflect using dtor instead
1 parent c6f15b5 commit 393fffa

File tree

2 files changed

+3
-12
lines changed

2 files changed

+3
-12
lines changed

src/components/pixels/ws_pixels.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,6 @@ void ws_pixels::deallocateStrand(int16_t strandIdx) {
6969
// Fill with "off"
7070
strands[strandIdx].neoPixelPtr->clear();
7171
strands[strandIdx].neoPixelPtr->show();
72-
#ifdef ARDUINO_ARCH_ESP32
73-
// Clear the pin used for RMT
74-
strands[strandIdx].neoPixelPtr->updateLength(0);
75-
strands[strandIdx].neoPixelPtr->show();
76-
#endif
7772
// Delete the NeoPixel object
7873
delete strands[strandIdx].neoPixelPtr;
7974
} else if ((strands[strandIdx].dotStarPtr != nullptr)) {

src/components/statusLED/Wippersnapper_StatusLED.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -103,14 +103,10 @@ void initStatusLED() {
103103
void releaseStatusLED() {
104104
WS_DEBUG_PRINTLN("Releasing status LED");
105105
#ifdef USE_STATUS_NEOPIXEL
106-
#ifdef ARDUINO_ARCH_ESP32
107-
// Release the rmtPin for use by other peripherals
108-
statusPixel->updateLength(0);
109-
statusPixel->show();
110-
#endif
111-
// Dealloc. NeoPixel object
106+
// Deallocate Adafruit_NeoPixel object, set data pin back to INPUT,
107+
// and unlock pixel for use by pixels component
112108
delete statusPixel;
113-
WS.lockStatusNeoPixel = false; // unlock
109+
WS.lockStatusNeoPixel = false;
114110
#endif
115111

116112
#ifdef USE_STATUS_DOTSTAR

0 commit comments

Comments
 (0)