Enhance DaliDT8: add support for color temperature handling and RGBWAF control adjustments

Signed-off-by: Tony <tonylu@tony-cloud.com>
This commit is contained in:
Tony
2026-06-15 21:36:49 +08:00
parent 34d77aa9fe
commit 82e9c18b26
2 changed files with 73 additions and 15 deletions
+10 -2
View File
@@ -96,6 +96,11 @@ enum class Dt8PreferredColorType {
rgbwaf,
};
enum class Dt8ColorTemperatureWriteType {
colorTemperature,
rgbwaf,
};
enum class Dt8RgbwafControlMode {
channelControl = 0,
colorControl = 1,
@@ -162,9 +167,11 @@ class DaliDT8 {
bool setColourRGBPreferred(int addr, int r, int g, int b,
Dt8PreferredColorType preferredColorType = Dt8PreferredColorType::xy);
bool setTemporaryColourRGBWAPreferred(int addr, int r, int g, int b, int w, int amber,
Dt8PreferredColorType preferredColorType = Dt8PreferredColorType::rgbwaf);
Dt8PreferredColorType preferredColorType = Dt8PreferredColorType::rgbwaf,
int freecolour = 254);
bool setColourRGBWAPreferred(int addr, int r, int g, int b, int w, int amber,
Dt8PreferredColorType preferredColorType = Dt8PreferredColorType::rgbwaf);
Dt8PreferredColorType preferredColorType = Dt8PreferredColorType::rgbwaf,
int freecolour = 254);
bool setColourRGBW(int addr, int r, int g, int b, int w);
bool setColourRGBCW(int addr, int r, int g, int b, int coolWhite, int warmWhite);
bool setColourRGBWAF(int addr, int r, int g, int b, int w, int amber, int freecolour,
@@ -255,6 +262,7 @@ class DaliDT8 {
private:
Dt8PreferredColorType resolvePreferredColorType(int address, Dt8PreferredColorType preferredColorType);
Dt8ColorTemperatureWriteType resolveColorTemperatureWriteType(int address);
std::optional<Dt8LevelColorReport> buildLevelColorReport(int a, std::optional<int> level);
std::vector<int> getReportRGBWAF(int a);