Implement full parameter sending on pattern change and periodic updates
- Send all parameters when pattern changes (may require 2 packets if >200 bytes) - Send periodic parameter updates every 8 beats to keep bars synchronized - Beat packets remain minimal for performance - All packets stay under 230-byte limit
This commit is contained in:
38
src/bar_config.py
Normal file
38
src/bar_config.py
Normal file
@@ -0,0 +1,38 @@
|
||||
# LED Bar Configuration
|
||||
# Modify these names as needed for your setup
|
||||
|
||||
# LED Bar Names/IDs - 4 left bars + 4 right bars
|
||||
LED_BAR_NAMES = [
|
||||
"100", # Left Bar 1
|
||||
"101", # Left Bar 2
|
||||
"102", # Left Bar 3
|
||||
"103", # Left Bar 4
|
||||
"104", # Right Bar 1
|
||||
"105", # Right Bar 2
|
||||
"106", # Right Bar 3
|
||||
"107", # Right Bar 4
|
||||
]
|
||||
|
||||
# Left and right bar groups for spatial control
|
||||
LEFT_BARS = ["100", "101", "102", "103"]
|
||||
RIGHT_BARS = ["104", "105", "106", "107"]
|
||||
|
||||
# Number of LED bars
|
||||
NUM_BARS = len(LED_BAR_NAMES)
|
||||
|
||||
# Default settings for all bars
|
||||
DEFAULT_BAR_SETTINGS = {
|
||||
"pattern": "pulse",
|
||||
"delay": 100,
|
||||
"colors": [(0, 255, 0)], # Default green
|
||||
"brightness": 100,
|
||||
"num_leds": 200,
|
||||
"n1": 10,
|
||||
"n2": 10,
|
||||
"n3": 1,
|
||||
"n": 0,
|
||||
}
|
||||
|
||||
# ESP-NOW broadcast settings
|
||||
ESP_NOW_CHANNEL = 1
|
||||
ESP_NOW_ENCRYPTION = False
|
Reference in New Issue
Block a user