Added some more hue devices and Gamut-Profile

Added the new Lightstrip plus, hue go and Aura. The first two come with
a new Gamut profile and the Aura is from Living Colors.


Former-commit-id: 83b676bf136095f3069c219810ea361829d81558
This commit is contained in:
Matthias Grimm 2015-11-20 18:47:00 +01:00
parent 42a6f72f06
commit 8ffbc16090

View File

@ -20,23 +20,29 @@ bool operator !=(CiColor p1, CiColor p2) {
return !(p1 == p2); return !(p1 == p2);
} }
PhilipsHueLight::PhilipsHueLight(unsigned int id, QString originalState, QString modelId) : PPhilipsHueLight::PhilipsHueLight(unsigned int id, QString originalState, QString modelId) :
id(id), originalState(originalState) { id(id), originalState(originalState) {
// Hue system model ids (http://www.developers.meethue.com/documentation/supported-lights). // Hue system model ids (http://www.developers.meethue.com/documentation/supported-lights).
// Light strips, color iris, ... // Light strips, color iris, ...
const std::set<QString> GAMUT_A_MODEL_IDS = { "LLC001", "LLC005", "LLC006", "LLC007", "LLC010", "LLC011", "LLC012", const std::set<QString> GAMUT_A_MODEL_IDS = { "LLC001", "LLC005", "LLC006", "LLC007", "LLC010", "LLC011", "LLC012",
"LLC013", "LST001" }; "LLC013", "LLC014", "LST001" };
// Hue bulbs, spots, ... // Hue bulbs, spots, ...
const std::set<QString> GAMUT_B_MODEL_IDS = { "LCT001", "LCT002", "LCT003", "LLM001" }; const std::set<QString> GAMUT_B_MODEL_IDS = { "LCT001", "LCT002", "LCT003", "LCT007", "LLM001" };
// Find id in the sets and set the appropiate color space. // Hue Lightstrip plus, go ...
if (GAMUT_A_MODEL_IDS.find(modelId) != GAMUT_A_MODEL_IDS.end()) { const std::set<QString> GAMUT_C_MODEL_IDS = { "LLC020", "LST002" };
colorSpace.red = {0.703f, 0.296f}; // Find id in the sets and set the appropiate color space.
colorSpace.green = {0.2151f, 0.7106f}; if (GAMUT_A_MODEL_IDS.find(modelId) != GAMUT_A_MODEL_IDS.end()) {
colorSpace.blue = {0.138f, 0.08f}; colorSpace.red = {0.703f, 0.296f};
} else if (GAMUT_B_MODEL_IDS.find(modelId) != GAMUT_B_MODEL_IDS.end()) { colorSpace.green = {0.2151f, 0.7106f};
colorSpace.red = {0.675f, 0.322f}; colorSpace.blue = {0.138f, 0.08f};
colorSpace.green = {0.4091f, 0.518f}; } else if (GAMUT_B_MODEL_IDS.find(modelId) != GAMUT_B_MODEL_IDS.end()) {
colorSpace.blue = {0.167f, 0.04f}; colorSpace.red = {0.675f, 0.322f};
colorSpace.green = {0.4091f, 0.518f};
colorSpace.blue = {0.167f, 0.04f};
} else if (GAMUT_C_MODEL_IDS.find(modelId) != GAMUT_B_MODEL_IDS.end()) {
colorSpace.red = {0.675f, 0.322f};
colorSpace.green = {0.2151f, 0.7106f};
colorSpace.blue = {0.167f, 0.04f};
} else { } else {
colorSpace.red = {1.0f, 0.0f}; colorSpace.red = {1.0f, 0.0f};
colorSpace.green = {0.0f, 1.0f}; colorSpace.green = {0.0f, 1.0f};