Commit Graph

6 Commits

Author SHA1 Message Date
Wolfieee Wolf
a0dce7d471 Replace auto with explicit types in DDPController 2025-07-01 22:16:48 +10:00
Wolfieee Wolf
c0b041e18f Improve DDP settings UI: remove keepalive controls and add device query
- Remove keepalive UI controls - not needed, uses sensible 1000ms default
- Add Query button to auto-populate device name and LED count from device
- Supports WLED JSON responses and standard DDP status queries  
- Cleaner, more user-friendly interface with automatic device detection
- Manual entry still available as fallback for non-responsive devices
2025-07-01 18:01:28 +10:00
Wolfieee Wolf
5d9a5b3f60 Clean up code: remove excessive comments and debug bloat
- Remove verbose comments explaining obvious functionality
- Keep only essential minimal comments where needed
- Clean, production-ready code with no debug remnants
- Maintains all functionality while reducing code bloat
2025-07-01 17:37:13 +10:00
Wolfieee Wolf
1ec5cfe85f Revert data type to simple value for maximum compatibility
- Keep data_type = 1 instead of 0x0B to maintain compatibility with existing devices
- While 0x0B is spec-compliant, many devices may work with the simpler value
- Keep other specification compliance fixes (sequence number, data size)
- Add both constants for future reference

This ensures existing WLED and other DDP devices continue working while
maintaining the benefits of other specification compliance improvements.
2025-07-01 17:23:21 +10:00
Wolfieee Wolf
a00563f945 Fix DDP implementation to comply with official specification
- Fix sequence number to use 4-bit nibble (0-15) instead of full byte per DDP spec
- Fix data type encoding to use proper RGB 8-bit format (0x0B) per spec
- Reduce maximum data size to 1440 bytes as recommended in official spec
- Add DDP_TYPE_RGB8 constant for better code clarity
- Improve compliance with http://www.3waylabs.com/ddp/ specification

These changes should improve compatibility with strict DDP implementations
and devices that follow the official protocol specification exactly.
2025-07-01 17:17:15 +10:00
Wolfieee Wolf
2a9cce70e1 Add DDP controller with unified manual device support
- Added DDPController with Push flag fix (0x41 instead of 0x40) for WLED compatibility
- Implemented keepalive functionality with configurable timeout (default 1 second)
- Created DDPSettingsEntry that integrates with new unified ManualDevicesSettingsPage
- Supports RGB data type with proper DDP protocol implementation
- Thread-safe keepalive system prevents devices from timing out
- Compatible with WLED and other DDP protocol devices

Key fixes based on feedback:
* Push flag now correctly set to 0x41 (DDP_FLAG_VER_1 | DDP_FLAG_PUSH)
* Keepalive thread prevents devices from reverting to hardware effects
* Proper DDP packet structure with correct data types and addressing
2025-07-01 15:58:06 +10:00