Skip to content

Rotary Encoder Breaking Patterns and Red Bias #90

@craetona

Description

@craetona

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions