-
Notifications
You must be signed in to change notification settings - Fork 12
Description
There is an issue where LED patterns have a strong bias towards red hues, causing certain patterns to display colors incorrectly or not at all. This problem is especially prominent when using the rotary encoder.
This issue focuses solely on the rotary encoder.
When cycling through patterns with the rotary encoder, pattern data, specifically min_hue and max_hue, is being corrupted when the pattern index is set to 1. The min_hue and max_hue values quickly swap from their correct initial values (0 and 255, respectively) to either 0 and 5 or 255 and 255 and do not get reset when swapping to a new pattern, causing patterns to only display red hues or no color at all. The exact cause of this has not be found as encoder values and pattern index values have been validated. Additionally, after modifying the logic to adjust the manual pattern index value that is read directly from the rotary encoder (using a delta for the encoder's position), the pattern data was causing the ESP32 core to dump and reset when the index value was set to 1. It's likely that there is some memory issue in the pattern data being stored in manual_pattern.
The rotary encoder should be refactored to work directly with loaded_patterns, the main set of pattern data that is used with the web application.