From 1ec5cfe85f594b9fd6faccd8a94d7eb101b9fb95 Mon Sep 17 00:00:00 2001 From: Wolfieee Wolf Date: Tue, 1 Jul 2025 17:23:21 +1000 Subject: [PATCH] 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. --- Controllers/DDPController/DDPController.cpp | 2 +- Controllers/DDPController/DDPController.h | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Controllers/DDPController/DDPController.cpp b/Controllers/DDPController/DDPController.cpp index 9db04caa..430e61f6 100644 --- a/Controllers/DDPController/DDPController.cpp +++ b/Controllers/DDPController/DDPController.cpp @@ -226,7 +226,7 @@ bool DDPController::SendDDPPacket(const DDPDevice& device, const unsigned char* // CRITICAL FIX: Use 0x41 instead of 0x40 - WLED requires the Push bit to be set header->flags = DDP_FLAG_VER_1 | DDP_FLAG_PUSH; header->sequence = sequence_number & 0x0F; // Only use 4-bit nibble (0-15) per DDP spec - header->data_type = DDP_TYPE_RGB8; // RGB 8-bit per DDP spec + header->data_type = 1; // RGB data type (keeping simple value for compatibility) header->dest_id = 1; // Default output device header->data_offset = htonl(offset); header->data_length = htons(length); diff --git a/Controllers/DDPController/DDPController.h b/Controllers/DDPController/DDPController.h index 1518d2a1..a0bb5e93 100644 --- a/Controllers/DDPController/DDPController.h +++ b/Controllers/DDPController/DDPController.h @@ -35,7 +35,9 @@ // DDP Data Type definitions (bits: C R TTT SSS) // C: 0=standard, 1=custom; R: reserved; TTT: data type; SSS: size -#define DDP_TYPE_RGB8 0x0B // TTT=001 (RGB), SSS=011 (8-bit) +// For maximum compatibility, we use simple value 1 instead of proper encoding +#define DDP_TYPE_RGB8 0x0B // TTT=001 (RGB), SSS=011 (8-bit) - spec compliant +#define DDP_TYPE_RGB_SIMPLE 1 // Simple RGB value for compatibility #pragma pack(push, 1) struct ddp_header