Commit 700c6eb3f71e35af50cc3fb08df380ad2234b7a6
1 parent
a4c67dcc
Fix typos in SimpleColorHueStrategy
transition was misspelled
Showing
1 changed file
with
14 additions
and
14 deletions
hueplusplus/SimpleColorHueStrategy.cpp
| ... | ... | @@ -24,13 +24,13 @@ |
| 24 | 24 | #include <iostream> |
| 25 | 25 | #include <thread> |
| 26 | 26 | |
| 27 | -bool SimpleColorHueStrategy::setColorHue(uint16_t hue, uint8_t transistion, HueLight& light) const | |
| 27 | +bool SimpleColorHueStrategy::setColorHue(uint16_t hue, uint8_t transition, HueLight& light) const | |
| 28 | 28 | { |
| 29 | 29 | light.refreshState(); |
| 30 | 30 | Json::Value request(Json::objectValue); |
| 31 | - if (transistion != 4) | |
| 31 | + if (transition != 4) | |
| 32 | 32 | { |
| 33 | - request["transitiontime"] = transistion; | |
| 33 | + request["transitiontime"] = transition; | |
| 34 | 34 | } |
| 35 | 35 | if (light.state["state"]["on"].asBool() != true) |
| 36 | 36 | { |
| ... | ... | @@ -74,13 +74,13 @@ bool SimpleColorHueStrategy::setColorHue(uint16_t hue, uint8_t transistion, HueL |
| 74 | 74 | return success; |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | -bool SimpleColorHueStrategy::setColorSaturation(uint8_t sat, uint8_t transistion, HueLight& light) const | |
| 77 | +bool SimpleColorHueStrategy::setColorSaturation(uint8_t sat, uint8_t transition, HueLight& light) const | |
| 78 | 78 | { |
| 79 | 79 | light.refreshState(); |
| 80 | 80 | Json::Value request(Json::objectValue); |
| 81 | - if (transistion != 4) | |
| 81 | + if (transition != 4) | |
| 82 | 82 | { |
| 83 | - request["transitiontime"] = transistion; | |
| 83 | + request["transitiontime"] = transition; | |
| 84 | 84 | } |
| 85 | 85 | if (light.state["state"]["on"].asBool() != true) |
| 86 | 86 | { |
| ... | ... | @@ -127,14 +127,14 @@ bool SimpleColorHueStrategy::setColorSaturation(uint8_t sat, uint8_t transistion |
| 127 | 127 | return success; |
| 128 | 128 | } |
| 129 | 129 | |
| 130 | -bool SimpleColorHueStrategy::setColorHueSaturation(uint16_t hue, uint8_t sat, uint8_t transistion, HueLight& light) const | |
| 130 | +bool SimpleColorHueStrategy::setColorHueSaturation(uint16_t hue, uint8_t sat, uint8_t transition, HueLight& light) const | |
| 131 | 131 | { |
| 132 | 132 | light.refreshState(); |
| 133 | 133 | Json::Value request(Json::objectValue); |
| 134 | 134 | |
| 135 | - if (transistion != 4) | |
| 135 | + if (transition != 4) | |
| 136 | 136 | { |
| 137 | - request["transitiontime"] = transistion; | |
| 137 | + request["transitiontime"] = transition; | |
| 138 | 138 | } |
| 139 | 139 | if (light.state["state"]["on"].asBool() != true) |
| 140 | 140 | { |
| ... | ... | @@ -192,14 +192,14 @@ bool SimpleColorHueStrategy::setColorHueSaturation(uint16_t hue, uint8_t sat, ui |
| 192 | 192 | return success; |
| 193 | 193 | } |
| 194 | 194 | |
| 195 | -bool SimpleColorHueStrategy::setColorXY(float x, float y, uint8_t transistion, HueLight& light) const | |
| 195 | +bool SimpleColorHueStrategy::setColorXY(float x, float y, uint8_t transition, HueLight& light) const | |
| 196 | 196 | { |
| 197 | 197 | light.refreshState(); |
| 198 | 198 | Json::Value request(Json::objectValue); |
| 199 | 199 | |
| 200 | - if (transistion != 4) | |
| 200 | + if (transition != 4) | |
| 201 | 201 | { |
| 202 | - request["transitiontime"] = transistion; | |
| 202 | + request["transitiontime"] = transition; | |
| 203 | 203 | } |
| 204 | 204 | if (light.state["state"]["on"].asBool() != true) |
| 205 | 205 | { |
| ... | ... | @@ -247,7 +247,7 @@ bool SimpleColorHueStrategy::setColorXY(float x, float y, uint8_t transistion, H |
| 247 | 247 | return success; |
| 248 | 248 | } |
| 249 | 249 | |
| 250 | -bool SimpleColorHueStrategy::setColorRGB(uint8_t r, uint8_t g, uint8_t b, uint8_t transistion, HueLight& light) const | |
| 250 | +bool SimpleColorHueStrategy::setColorRGB(uint8_t r, uint8_t g, uint8_t b, uint8_t transition, HueLight& light) const | |
| 251 | 251 | { |
| 252 | 252 | if( (r == 0) && (g == 0) && (b == 0) ) |
| 253 | 253 | { |
| ... | ... | @@ -270,7 +270,7 @@ bool SimpleColorHueStrategy::setColorRGB(uint8_t r, uint8_t g, uint8_t b, uint8_ |
| 270 | 270 | const float x = X / (X + Y + Z); |
| 271 | 271 | const float y = Y / (X + Y + Z); |
| 272 | 272 | |
| 273 | - return light.setColorXY(x, y, transistion); | |
| 273 | + return light.setColorXY(x, y, transition); | |
| 274 | 274 | } |
| 275 | 275 | |
| 276 | 276 | bool SimpleColorHueStrategy::setColorLoop(bool on, HueLight& light) const | ... | ... |