Merge remote-tracking branch 'refs/remotes/tvdzwan/master'

Former-commit-id: 0087b8cee957f0b87f722d02ef7fccbc1a34b118
This commit is contained in:
tociek 2015-11-28 22:55:46 +01:00
commit e44db34969

View File

@ -25,9 +25,11 @@ PhilipsHueLight::PhilipsHueLight(unsigned int id, QString originalState, QString
// 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" };
// Hue Lightstrip plus, go ...
const std::set<QString> GAMUT_C_MODEL_IDS = { "LLC020", "LST002" };
// Find id in the sets and set the appropiate color space. // Find id in the sets and set the appropiate color space.
if (GAMUT_A_MODEL_IDS.find(modelId) != GAMUT_A_MODEL_IDS.end()) { if (GAMUT_A_MODEL_IDS.find(modelId) != GAMUT_A_MODEL_IDS.end()) {
colorSpace.red = {0.703f, 0.296f}; colorSpace.red = {0.703f, 0.296f};
@ -37,6 +39,10 @@ PhilipsHueLight::PhilipsHueLight(unsigned int id, QString originalState, QString
colorSpace.red = {0.675f, 0.322f}; colorSpace.red = {0.675f, 0.322f};
colorSpace.green = {0.4091f, 0.518f}; colorSpace.green = {0.4091f, 0.518f};
colorSpace.blue = {0.167f, 0.04f}; 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};