![]() |
HAN-FUN API
1.5.3
This project provides the common implementation of ULE Alliance's HAN-FUN application protocol.
|
Hue and Saturation Transition. More...
#include <colour_control.h>
Public Member Functions | |
HS_Transition (IServer &_server, uint16_t period, int32_t hue_step=0, int32_t sat_step=0, uint16_t n_steps=0, HS_Colour end=HS_Colour(0, 0)) | |
Constructor. More... | |
HS_Transition ()=default | |
Default constructor. | |
~HS_Transition () | |
Empty destructor. | |
bool | run (uint16_t time) |
Run the transition. More... | |
bool | next () |
Check if the transition should continue. More... | |
![]() | |
ITransition (IServer &_server, uint16_t period) | |
Constructor. More... | |
Data Fields | |
int32_t | hue_step |
Hue step. | |
int32_t | sat_step |
Saturation step. | |
uint16_t | n_steps |
Counter for the steps needed. More... | |
HS_Colour | end |
End value to stop the iteration. More... | |
![]() | |
IServer & | server |
The server instance. | |
uint16_t | period |
Time period for the transition (in 100 msec units). More... | |
uint16_t | remaining_time |
Remaining time until the transition is ran. More... | |
Hue and Saturation Transition.
Definition at line 1078 of file colour_control.h.
|
inline |
Constructor.
[in] | _server | server instance |
[in] | period | the Transition period. In units of 100msec. |
[in] | hue_step | the hue step size for each transition iteration. |
[in] | sat_step | the saturation step size for each transition iteration. |
[in] | n_steps | number of steps. |
[in] | end | end value for the transition. |
Definition at line 1095 of file colour_control.h.
|
inlinevirtual |
Check if the transition should continue.
true | the transition continues. |
false | the transition ended. |
Implements HF::Interfaces::ColourControl::ITransition.
Definition at line 1111 of file colour_control.h.
References HF::Interfaces::ColourControl::ITransition::period.
|
virtual |
Run the transition.
This will update the remaining time and check if the transition should run.
[in] | time | time elapsed time since the last call. |
true | run the transition specialization. |
false | don't run the transition specialization. |
Reimplemented from HF::Interfaces::ColourControl::ITransition.
HS_Colour HF::Interfaces::ColourControl::HS_Transition::end |
End value to stop the iteration.
Definition at line 1083 of file colour_control.h.
uint16_t HF::Interfaces::ColourControl::HS_Transition::n_steps |
Counter for the steps needed.
Definition at line 1082 of file colour_control.h.