Fix rainbow pattern step range in lighting controller

- Change step calculation from beat_index % 2 to beat_index % 256
- Provides full 0-255 step range for rainbow pattern color cycling
- Fixes rainbow pattern that was limited to only 0 or 1 step values
- Alternating phase patterns still use % 2 for proper phase offset
This commit is contained in:
2025-09-19 01:29:08 +12:00
parent c40b5629bf
commit e5cf15d7b0

View File

@@ -152,7 +152,7 @@ class MidiHandler:
"n1": self.n1, "n1": self.n1,
"n2": self.n2, "n2": self.n2,
"n3": self.n3, "n3": self.n3,
"s": self.beat_index % 2, # Keep step small (0 or 1) for alternating patterns "s": self.beat_index % 256, # Use full range for rainbow patterns
} }
} }
@@ -233,7 +233,7 @@ class MidiHandler:
"n2": self.n2, "n2": self.n2,
"n3": self.n3, "n3": self.n3,
"dl": self.delay, "dl": self.delay,
"s": self.beat_index % 2, # Keep step small (0 or 1) for alternating patterns "s": self.beat_index % 256, # Use full range for rainbow patterns
}) })
# Add empty entries for each bar (they'll use defaults) # Add empty entries for each bar (they'll use defaults)