Commit 6efe9b2196f4a84aef99ae6df6d821270144661d

Authored by Nodeduino
Committed by Moritz Wirger
1 parent bc2e2d62

Fix error in SimpleColorHueStrategy

- error was that transitiontime was misspelled
hueplusplus/SimpleColorHueStrategy.cpp 100755 → 100644
... ... @@ -30,7 +30,7 @@ bool SimpleColorHueStrategy::setColorHue(uint16_t hue, uint8_t transistion, HueL
30 30 Json::Value request(Json::objectValue);
31 31 if (transistion != 4)
32 32 {
33   - request["transistiontime"] = transistion;
  33 + request["transitiontime"] = transistion;
34 34 }
35 35 if (light.state["state"]["on"].asBool() != true)
36 36 {
... ... @@ -54,10 +54,10 @@ bool SimpleColorHueStrategy::setColorHue(uint16_t hue, uint8_t transistion, HueL
54 54 std::string path = "/lights/" + std::to_string(light.id) + "/state/";
55 55 bool success = true;
56 56 int i = 0;
57   - if (success && request.isMember("transistiontime"))
  57 + if (success && request.isMember("transitiontime"))
58 58 {
59 59 //Check if success was sent and the value was changed
60   - success = !reply[i].isNull() && reply[i].isMember("success") && reply[i]["success"][path + "transistiontime"].asUInt() == request["transistiontime"].asUInt();
  60 + success = !reply[i].isNull() && reply[i].isMember("success") && reply[i]["success"][path + "transitiontime"].asUInt() == request["transitiontime"].asUInt();
61 61 ++i;
62 62 }
63 63 if (success && request.isMember("on"))
... ... @@ -80,7 +80,7 @@ bool SimpleColorHueStrategy::setColorSaturation(uint8_t sat, uint8_t transistion
80 80 Json::Value request(Json::objectValue);
81 81 if (transistion != 4)
82 82 {
83   - request["transistiontime"] = transistion;
  83 + request["transitiontime"] = transistion;
84 84 }
85 85 if (light.state["state"]["on"].asBool() != true)
86 86 {
... ... @@ -107,10 +107,10 @@ bool SimpleColorHueStrategy::setColorSaturation(uint8_t sat, uint8_t transistion
107 107 std::string path = "/lights/" + std::to_string(light.id) + "/state/";
108 108 bool success = true;
109 109 int i = 0;
110   - if (success && request.isMember("transistiontime"))
  110 + if (success && request.isMember("transitiontime"))
111 111 {
112 112 //Check if success was sent and the value was changed
113   - success = !reply[i].isNull() && reply[i].isMember("success") && reply[i]["success"][path + "transistiontime"].asUInt() == request["transistiontime"].asUInt();
  113 + success = !reply[i].isNull() && reply[i].isMember("success") && reply[i]["success"][path + "transitiontime"].asUInt() == request["transitiontime"].asUInt();
114 114 ++i;
115 115 }
116 116 if (success && request.isMember("on"))
... ...