docs: Update lessons_learned.md with recent refactoring and GRB color order details

This commit is contained in:
Tobias J. Endres 2025-08-16 06:10:14 +02:00
parent 32b32adbe0
commit e321272c95

View File

@ -67,4 +67,12 @@ This document captures key insights, challenges, and solutions encountered durin
[Commit: e31f154] - feat: Implement and verify HyperionProcessor with live visualization
[Commit: 478828b] - docs: Add lesson learned about KWin script interference
[Commit: 60bcfb0] - feat: Integrate WledClient into grabberconfigurator for direct WLED communication
[Commit: <CURRENT_COMMIT_HASH>] - feat: Refactor main application for environment variable configuration
[Commit: c46fade6b0bf71c89c03cbb65d724e98d3db06b4] - feat: Refactor main application for environment variable configuration
## 11. Implementing Configurable Color Order (GRB)
* **Challenge:** Different LED strips and systems (like WLED) may expect LED color data in various orders (e.g., RGB, GRB, BGR). The initial implementation assumed a fixed RGB order, which led to incorrect color display when connected to devices expecting GRB.
* **Solution:** Implemented a configurable color order mechanism within the `WledClient` to allow specifying the desired output order (e.g., GRB). This involved remapping the color components (Red, Green, Blue) based on the selected order before sending the data to the WLED device.
* **Lesson:** When dealing with external hardware or protocols, it's crucial to account for variations in data formats, such as color order. Providing configurable options for such parameters enhances compatibility and flexibility.
[Commit: d81fe64cc10be17f371b43de992be383c8cd7e7f] - feat: Implement GRB color order for WledClient