Add support for power-on and system failure level snapshots in DaliDT8
This commit is contained in:
@@ -66,6 +66,17 @@ struct SceneColorReport {
|
||||
bool hasColorTemperature() const { return colorTemperature.has_value(); }
|
||||
};
|
||||
|
||||
struct Dt8LevelColorReport {
|
||||
int level = 0;
|
||||
int colorTypeValue = 0;
|
||||
std::vector<double> xy;
|
||||
std::optional<int> colorTemperature;
|
||||
|
||||
ColorType colorType() const { return ColorType(colorTypeValue); }
|
||||
bool hasXy() const { return xy.size() == 2; }
|
||||
bool hasColorTemperature() const { return colorTemperature.has_value(); }
|
||||
};
|
||||
|
||||
enum class Dt8SceneStoreColorMode {
|
||||
disabled,
|
||||
colorTemperature,
|
||||
@@ -176,6 +187,10 @@ class DaliDT8 {
|
||||
bool storeSceneSnapshot(int address, int scene, int brightness,
|
||||
Dt8SceneStoreColorMode colorMode = Dt8SceneStoreColorMode::disabled,
|
||||
int colorTemperature = 0, int red = 0, int green = 0, int blue = 0);
|
||||
bool storePowerOnLevelSnapshot(int address, int level);
|
||||
bool storeSystemFailureLevelSnapshot(int address, int level);
|
||||
std::optional<Dt8LevelColorReport> getPowerOnLevelColorReport(int a);
|
||||
std::optional<Dt8LevelColorReport> getSystemFailureLevelColorReport(int a);
|
||||
bool storeColourTempLimitRaw(int a, int limitType, int mirek);
|
||||
bool storeColourTempLimit(int a, int limitType, int kelvin);
|
||||
bool setGearAutoActivate(int a, bool enable);
|
||||
@@ -189,5 +204,7 @@ class DaliDT8 {
|
||||
std::optional<int> getExtendedVersion(int a);
|
||||
|
||||
private:
|
||||
std::optional<Dt8LevelColorReport> buildLevelColorReport(int a, std::optional<int> level);
|
||||
|
||||
DaliBase& base_;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user