#include "AccessoryLight.hpp"
This class describes a single light accessory.
Definition at line 15 of file AccessoryLight.hpp.
AccessoryLight::AccessoryLight |
( |
| ) |
|
void AccessoryLight::begin |
( |
Port * |
inpPort, |
|
|
unsigned long |
inId, |
|
|
unsigned long |
inBlinkDuration = 0 , |
|
|
int |
inIntensity = 255 |
|
) |
| |
Initialize the instance.
- Parameters
-
inpPort | Port driven this light. |
inId | Id of this accessory. |
inBlinkDuration | Blink duration, 0 for fix light. Default is 0. |
inIntensity | Intensity of this light. Default is maximum, 255. |
Definition at line 16 of file AccessoryLight.cpp.
void AccessoryLight::Blink |
( |
| ) |
|
|
inline |
int AccessoryLight::EEPROMLoad |
( |
int |
inPos | ) |
|
|
virtual |
Reload all data from the EEPROM.
Reimplemented from Accessory.
void AccessoryLight::Event |
( |
unsigned long |
inId, |
|
|
ACCESSORIES_EVENT_TYPE |
inEvent = ACCESSORIES_EVENT_MOVEPOSITIONID , |
|
|
int |
inData = 0 |
|
) |
| |
|
virtual |
Execute a new event.
- Parameters
-
inId | Id of an accessory or an accessory item. |
inEvent | Type of the new event. Default is ACCESSORIES_EVENT_MOVEPOSITIONID. |
inData | Associated data to the event type. Default is 0. |
Reimplemented from Accessory.
Definition at line 41 of file AccessoryLight.cpp.
bool AccessoryLight::IsBlinking |
( |
| ) |
const |
|
inline |
Checks if the light is blinking.
- Returns
- true if the light is blinking.
Definition at line 48 of file AccessoryLight.hpp.
bool AccessoryLight::IsFading |
( |
| ) |
const |
|
inline |
Checks if the light is fading.
- Returns
- true if the light is fading.
Definition at line 53 of file AccessoryLight.hpp.
bool AccessoryLight::IsOn |
( |
| ) |
const |
|
inline |
Checks if the light is on.
- Returns
- true if the light is on.
Definition at line 44 of file AccessoryLight.hpp.
void AccessoryLight::LightOff |
( |
| ) |
|
|
inline |
void AccessoryLight::LightOn |
( |
| ) |
|
|
inline |
void AccessoryLight::SetBlinking |
( |
unsigned long |
inBlinkingDelay | ) |
|
|
inline |
Sets the blinking delay.
- Parameters
-
inBlinkingDelay | Blinking delay in milliseconds. |
Definition at line 34 of file AccessoryLight.hpp.
void AccessoryLight::SetFading |
( |
uint8_t |
inStep, |
|
|
uint8_t |
inDelay |
|
) |
| |
|
inline |
Set the fading mode, defining its speed.
- Parameters
-
inStep | Number of steps between light on and light off. |
inDelay | Duration of each step. |
Definition at line 39 of file AccessoryLight.hpp.
void AccessoryLight::SetState |
( |
ACC_STATE |
inState | ) |
|
|
inlinevirtual |
Sets the internal state.
- Parameters
-
inState | new state LIGHTON, LIGHTOFF or LIGHTBLINKING. |
Reimplemented from Accessory.
Definition at line 65 of file AccessoryLight.hpp.
ACC_STATE AccessoryLight::Toggle |
( |
| ) |
|
|
inlinevirtual |
The documentation for this class was generated from the following files: