Commit 174cc9afb13d5e7b569ec679c1dfb0cae0ecb84a

Authored by Moritz Wirger
1 parent 8c12dc6c

Add new fucntions to README

hasBrightnessControl(), hasTemperatureControl() and hasColorControl()
Showing 1 changed file with 9 additions and 2 deletions
README.md
@@ -67,12 +67,19 @@ lights[1].Off(); @@ -67,12 +67,19 @@ lights[1].Off();
67 lights.at(1).setColorHue(4562); 67 lights.at(1).setColorHue(4562);
68 ``` 68 ```
69 But keep in mind that some light types do not have all functions available. So you might call a 69 But keep in mind that some light types do not have all functions available. So you might call a
70 -specific function, but nothing will happen. For that you might want to check beforehand what type  
71 -of a lamp you are controlling. For that you can call the function getColorType(), which will return 70 +specific function, but nothing will happen. For that you might want to check what type
  71 +of a light you are controlling. For that you can call the function getColorType(), which will return
72 a ColorType. 72 a ColorType.
73 ```C++ 73 ```C++
74 ColorType type1 = light1.getColorType(); 74 ColorType type1 = light1.getColorType();
75 ``` 75 ```
  76 +There's also a new way to check whether specific functions of a light are available:
  77 +```C++
  78 +light1.hasBrightnessControl();
  79 +light1.hasTemperatureControl();
  80 +light1.hasColorControl();
  81 +```
  82 +These will either return true(light has specified function) or false(light lacks specified function).
76 83
77 ### Further reading 84 ### Further reading
78 If you want to know more about all functions just look inside the doxygen description, 85 If you want to know more about all functions just look inside the doxygen description,