Commit 3d500e3ca044f95dd049c7bba9ec234b321b693e
1 parent
74017451
Remove ct color support for Color Lights, which closes #11
- Hue Color Lights do not support ct mode so the support for it has been removed
Showing
2 changed files
with
5 additions
and
11 deletions
hueplusplus/Hue.cpp
| ... | ... | @@ -205,7 +205,7 @@ HueLight& Hue::getLight(int id) |
| 205 | 205 | else if (type == "LST001" || type == "LLC006" || type == "LLC007" || type == "LLC010" || type == "LLC011" || type == "LLC012" || type == "LLC013") |
| 206 | 206 | { |
| 207 | 207 | // HueColorLight Gamut A |
| 208 | - HueLight light = HueLight(ip, username, id, simpleBrightnessStrategy, simpleColorTemperatureStrategy, simpleColorHueStrategy, http_handler); | |
| 208 | + HueLight light = HueLight(ip, username, id, simpleBrightnessStrategy, nullptr, simpleColorHueStrategy, http_handler); | |
| 209 | 209 | light.colorType = ColorType::GAMUT_A; |
| 210 | 210 | lights.emplace(id, light); |
| 211 | 211 | return lights.find(id)->second; | ... | ... |
hueplusplus/test/test_HueLight.cpp
| ... | ... | @@ -438,10 +438,10 @@ TEST_F(HueLightTest, hasTemperatureControl) |
| 438 | 438 | HueLight test_light_3 = test_bridge.getLight(3); |
| 439 | 439 | |
| 440 | 440 | EXPECT_EQ(false, ctest_light_1.hasTemperatureControl()); |
| 441 | - EXPECT_EQ(true, ctest_light_2.hasTemperatureControl()); | |
| 441 | + EXPECT_EQ(false, ctest_light_2.hasTemperatureControl()); | |
| 442 | 442 | EXPECT_EQ(true, ctest_light_3.hasTemperatureControl()); |
| 443 | 443 | EXPECT_EQ(false, test_light_1.hasTemperatureControl()); |
| 444 | - EXPECT_EQ(true, test_light_2.hasTemperatureControl()); | |
| 444 | + EXPECT_EQ(false, test_light_2.hasTemperatureControl()); | |
| 445 | 445 | EXPECT_EQ(true, test_light_3.hasTemperatureControl()); |
| 446 | 446 | } |
| 447 | 447 | |
| ... | ... | @@ -512,9 +512,6 @@ TEST_F(HueLightTest, getBrightness) |
| 512 | 512 | TEST_F(HueLightTest, setColorTemperature) |
| 513 | 513 | { |
| 514 | 514 | using namespace ::testing; |
| 515 | - EXPECT_CALL(*handler, PUTJson("/api/" + bridge_username + "/lights/2/state", _, bridge_ip, 80)) | |
| 516 | - .Times(1) | |
| 517 | - .WillOnce(Return(Json::Value(Json::arrayValue))); | |
| 518 | 515 | Json::Value prep_ret; |
| 519 | 516 | prep_ret = Json::Value(Json::arrayValue); |
| 520 | 517 | prep_ret[2] = Json::Value(Json::objectValue); |
| ... | ... | @@ -549,10 +546,10 @@ TEST_F(HueLightTest, getColorTemperature) |
| 549 | 546 | HueLight test_light_3 = test_bridge.getLight(3); |
| 550 | 547 | |
| 551 | 548 | EXPECT_EQ(0, ctest_light_1.getColorTemperature()); |
| 552 | - EXPECT_EQ(366, ctest_light_2.getColorTemperature()); | |
| 549 | + EXPECT_EQ(0, ctest_light_2.getColorTemperature()); | |
| 553 | 550 | EXPECT_EQ(366, ctest_light_3.getColorTemperature()); |
| 554 | 551 | EXPECT_EQ(0, test_light_1.getColorTemperature()); |
| 555 | - EXPECT_EQ(366, test_light_2.getColorTemperature()); | |
| 552 | + EXPECT_EQ(0, test_light_2.getColorTemperature()); | |
| 556 | 553 | EXPECT_EQ(366, test_light_3.getColorTemperature()); |
| 557 | 554 | } |
| 558 | 555 | |
| ... | ... | @@ -775,9 +772,6 @@ TEST_F(HueLightTest, alert) |
| 775 | 772 | TEST_F(HueLightTest, alertTemperature) |
| 776 | 773 | { |
| 777 | 774 | using namespace ::testing; |
| 778 | - EXPECT_CALL(*handler, PUTJson("/api/" + bridge_username + "/lights/2/state", _, bridge_ip, 80)) | |
| 779 | - .Times(1) | |
| 780 | - .WillOnce(Return(Json::Value(Json::arrayValue))); | |
| 781 | 775 | EXPECT_CALL(*handler, PUTJson("/api/" + bridge_username + "/lights/3/state", _, bridge_ip, 80)) |
| 782 | 776 | .Times(1) |
| 783 | 777 | .WillOnce(Return(Json::Value(Json::arrayValue))); | ... | ... |