Commit 6a8833427ec0fa6733e4f6b4640d6f4c621f4d2c
1 parent
3279b4e7
Add new function getColorType() to HueLight
Showing
2 changed files
with
9 additions
and
0 deletions
hueplusplus/HueLight.cpp
| ... | ... | @@ -47,6 +47,11 @@ std::string HueLight::getName() |
| 47 | 47 | return state["name"].asString(); |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | +ColorType HueLight::getCoorType() | |
| 51 | +{ | |
| 52 | + return colorType; | |
| 53 | +} | |
| 54 | + | |
| 50 | 55 | unsigned int HueLight::KelvinToMired(unsigned int kelvin) |
| 51 | 56 | { |
| 52 | 57 | return int(0.5f + (1000000 / kelvin)); | ... | ... |
hueplusplus/include/HueLight.h
| ... | ... | @@ -110,6 +110,10 @@ public: |
| 110 | 110 | //! \return String containig the name of the light |
| 111 | 111 | std::string getName(); |
| 112 | 112 | |
| 113 | + //! F\unction that returns the color type of the light. | |
| 114 | + //! \return ColorType containig the color type of the light | |
| 115 | + ColorType getCoorType(); | |
| 116 | + | |
| 113 | 117 | //! Function that converts Kelvin to Mired. |
| 114 | 118 | //! \param kelvin Unsigned integer value in Kelvin |
| 115 | 119 | //! \return Unsigned integer value in Mired | ... | ... |