Skip to content

Commit 4040308

Browse files
committed
some fixes
1 parent 8375614 commit 4040308

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

faux_write.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
def neopixel_write():
2+
"""This is a stub function to satisfy the base NeoPixel library.
3+
It should never be called.
4+
"""
5+
raise RuntimeError("Function should never be called.")

neopixel_spi.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@
4343
* Adafruit's Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
4444
"""
4545

46+
import sys
47+
sys.modules['neopixel_write'] = __import__('faux_write')
4648
from neopixel import NeoPixel
4749

4850
__version__ = "0.0.0-auto.0"
@@ -96,7 +98,7 @@ def __init__(self, spi, n, *, bpp=3, brightness=1.0, auto_write=True, pixel_orde
9698
except AttributeError:
9799
# use nominal
98100
freq = self.FREQ
99-
self.RESET = bytes([0]*round(freq*self.TRST))
101+
self.RESET = bytes([0]*round(freq * self.TRST / 8))
100102
self.n = n
101103
if pixel_order is None:
102104
self.order = GRBW

0 commit comments

Comments
 (0)