Sync pattern shortnames with LED bar firmware
- Add 'on' and 'off' pattern mappings to match LED bar - Document that PATTERN_NAMES must match led-bar/src/patterns.py - Keep backend-specific patterns (sequential_pulse, alternating_phase) separate - Ensures frontend can use the same pattern names as LED bar expects
This commit is contained in:
@@ -31,7 +31,10 @@ SOUND_CONTROL_HOST = os.getenv("SOUND_CONTROL_HOST", "127.0.0.1")
|
||||
SOUND_CONTROL_PORT = int(os.getenv("SOUND_CONTROL_PORT", "65433"))
|
||||
|
||||
# Pattern name mapping for shorter JSON payloads
|
||||
# These must match the shortnames defined in led-bar/src/patterns.py
|
||||
PATTERN_NAMES = {
|
||||
"on": "on",
|
||||
"off": "o",
|
||||
"flicker": "f",
|
||||
"fill_range": "fr",
|
||||
"n_chase": "nc",
|
||||
@@ -40,9 +43,10 @@ PATTERN_NAMES = {
|
||||
"rainbow": "r",
|
||||
"specto": "s",
|
||||
"radiate": "rd",
|
||||
"segmented_movement": "sm",
|
||||
# Backend-specific patterns (not sent to LED bars)
|
||||
"sequential_pulse": "sp",
|
||||
"alternating_phase": "ap",
|
||||
"segmented_movement": "sm",
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user