feat: DDP frame sync over UDP broadcast, DDP acks, DDP enable setting

- Driver acks each completed DDP frame; the test waits for the acks before broadcasting the sync.
- Sync listener on UDP 4049: a frame is held until the next sync, then shown.
- DDP pixels are shown at full brightness, ignoring the device brightness settings.
- "DDP and sync receive on" setting (NVS, network API, web UI); off ignores DDP and sync packets.
- ddp_test.py: finds devices on the subnet, drives them in lockstep at a fixed rate, runs animations.
- /api/ddp reports sync counters for diagnosis.
- Includes in-progress WebSocket, multi-driver web UI and Wi-Fi work from the same tree.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
jimmyandClaude Haiku 5.5 committed 2026-11-11 14:10:55 +13:00
1 parent 47f4eba0d6
commit 4cd3bc7973
294 files changed
+48954 -301

No files matched your search

@@ -0,0 +1,54 @@
# SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: Apache-2.0
import re
import sys
# Configurable prefix for memory functions
MDNS_MEM_PREFIX = 'mdns_mem_' # Change this to modify the prefix
def add_prefix_to_mem_funcs(content):
# List of memory functions to prefix
mem_funcs = [
'malloc',
'calloc',
'free',
'strdup',
'strndup'
]
# Create regex pattern matching the memory functions but not already prefixed ones
pattern = fr'(?<!{MDNS_MEM_PREFIX})(?<![\w])(' + '|'.join(mem_funcs) + r')(?=\s*\()'
# Replace all occurrences with configured prefix
modified = re.sub(pattern, fr'{MDNS_MEM_PREFIX}\1', content)
return modified
def process_file(filename):
try:
# Read the file
with open(filename, 'r') as f:
content = f.read()
# Add prefixes
modified = add_prefix_to_mem_funcs(content)
# Write back to file
with open(filename, 'w') as f:
f.write(modified)
print(f'Successfully processed {filename}')
except Exception as e:
print(f'Error processing {filename}: {str(e)}')
sys.exit(1)
if __name__ == '__main__':
if len(sys.argv) != 2:
print('Usage: python script.py <filename>')
sys.exit(1)
process_file(sys.argv[1])