Created
March 26, 2019 17:02
-
-
Save rroohhh/029a86204c1789ebfbd7a9e6f4c1d525 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/modules/ws2812.py b/src/modules/ws2812.py | |
index d369f16..d716201 100644 | |
--- a/src/modules/ws2812.py | |
+++ b/src/modules/ws2812.py | |
@@ -64,12 +64,16 @@ class Ws2812Phy: | |
max_pattern_length = max([sum(pattern) for pattern in self.patterns]) | |
counter = Signal(max=max_pattern_length) | |
+ | |
+ dummy = Signal(max = len(self.patterns)) | |
+ m.d.comb += buffered_pattern.eq(dummy) | |
+ | |
with m.If(counter == self.patterns[buffered_pattern][1]): | |
m.d.sync += [ | |
counter.eq(0), | |
self.done.eq(1), | |
- buffered_pattern.eq(self.pattern), | |
+ dummy.eq(self.pattern), | |
] | |
with m.Else(): | |
m.d.sync += [ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment