Make alternating pattern timing independent of n1
- Changed alternating pattern to return delay/2 instead of delay - Each phase now lasts delay/2, making full cycle equal to delay - n1 now only controls ON/OFF segment width, not timing
This commit is contained in:
@@ -109,7 +109,7 @@ class Patterns(PatternBase): # Inherit from PatternBase
|
|||||||
|
|
||||||
self.n.write()
|
self.n.write()
|
||||||
self.step = (self.step + 1) % 2
|
self.step = (self.step + 1) % 2
|
||||||
return self.delay
|
return max(1, int(self.delay // 2))
|
||||||
|
|
||||||
|
|
||||||
def pulse(self):
|
def pulse(self):
|
||||||
|
Reference in New Issue
Block a user