Skip to content

Commit 2fb1db5

Browse files
committed
remove _configure - no longer needed
1 parent 7db0c9b commit 2fb1db5

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

neopixel.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,7 @@ class NeoPixel(_pixelbuf.PixelBuf):
100100
def __init__(self, pin, n, *, bpp=3, brightness=1.0, auto_write=True, pixel_order=None):
101101
self.bpp = bpp
102102
self.n = n
103-
self._configure(n, bpp, brightness, auto_write, pixel_order)
104-
self.pin = digitalio.DigitalInOut(pin)
105-
self.pin.direction = digitalio.Direction.OUTPUT
106103

107-
def _configure(self, n, bpp=3, brightness=1.0, auto_write=True, pixel_order=None): # pylint: disable=too-many-arguments
108104
if not pixel_order:
109105
pixel_order = GRB if bpp == 3 else GRBW
110106
else:
@@ -122,6 +118,9 @@ def _configure(self, n, bpp=3, brightness=1.0, auto_write=True, pixel_order=None
122118
byteorder=pixel_order,
123119
auto_write=auto_write)
124120

121+
self.pin = digitalio.DigitalInOut(pin)
122+
self.pin.direction = digitalio.Direction.OUTPUT
123+
125124
def deinit(self):
126125
"""Blank out the NeoPixels and release the pin."""
127126
self.fill(0)

0 commit comments

Comments
 (0)