ESPixelStick Firmware
Firmware for the ESPixelStick
Loading...
Searching...
No Matches
c_InputEffectEngine Class Reference

#include <InputEffectEngine.hpp>

Inheritance diagram for c_InputEffectEngine:
Collaboration diagram for c_InputEffectEngine:

Classes

struct  CRGB
 
struct  dCHSV
 
struct  dCRGB
 
struct  EffectDescriptor_t
 
struct  FlashInfo_t
 
struct  MarqueeGroup_t
 
struct  MQTTConfiguration_t
 
struct  Transition_t
 

Public Types

typedef uint16_t(c_InputEffectEngine::*) EffectFunc(void)
 

Public Member Functions

 c_InputEffectEngine (c_InputMgr::e_InputChannelIds NewInputChannelId, c_InputMgr::e_InputType NewChannelType, uint32_t BufferSize)
 
virtual ~c_InputEffectEngine ()
 
 c_InputEffectEngine ()
 
void Begin ()
 set up the operating environment based on the current config (or defaults)
 
bool SetConfig (JsonObject &jsonConfig)
 Set a new config in the driver.
 
void SetMqttConfig (MQTTConfiguration_t &mqttConfig)
 Set a new config in the driver.
 
void GetConfig (JsonObject &jsonConfig)
 Get the current config used by the driver.
 
void GetMqttConfig (MQTTConfiguration_t &mqttConfig)
 Get the current config used by the driver.
 
void GetMqttEffectList (JsonObject &jsonConfig)
 Get the current config used by the driver.
 
void GetStatus (JsonObject &jsonStatus)
 
void Process ()
 Call from loop(), renders Input data.
 
void Poll ()
 Call from loop(), renders Input data.
 
void GetDriverName (String &sDriverName)
 get the name for the instantiated driver
 
void SetBufferInfo (uint32_t BufferSize)
 
void NextEffect ()
 
void ProcessButtonActions (c_ExternalInput::InputValue_t value)
 
uint16_t effectSolidColor ()
 
uint16_t effectRainbow ()
 
uint16_t effectChase ()
 
uint16_t effectBlink ()
 
uint16_t effectFlash ()
 
uint16_t effectFireFlicker ()
 
uint16_t effectLightning ()
 
uint16_t effectBreathe ()
 
uint16_t effectNull ()
 
uint16_t effectRandom ()
 
uint16_t effectTransition ()
 
uint16_t effectMarquee ()
 
- Public Member Functions inherited from c_InputCommon
 c_InputCommon (c_InputMgr::e_InputChannelIds NewInputChannelId, c_InputMgr::e_InputType NewChannelType, uint32_t BufferSize)
 < Start up the driver and put it into a safe mode
 
virtual ~c_InputCommon ()
 
virtual bool SetConfig (ArduinoJson::JsonObject &jsonConfig)=0
 Set a new config in the driver.
 
virtual void GetConfig (ArduinoJson::JsonObject &jsonConfig)=0
 Get the current config used by the driver.
 
virtual void SetOperationalState (bool ActiveFlag)
 
virtual void NetworkStateChanged (bool IsConnected)
 
virtual bool isShutDownRebootNeeded ()
 
c_InputMgr::e_InputChannelIds GetInputChannelId ()
 
c_InputMgr::e_InputType GetInputType ()
 

Private Types

using timeType = decltype(millis())
 

Private Member Functions

void validateConfiguration ()
 
void setPixel (uint16_t idx, CRGB color)
 
void GetPixel (uint16_t pixelId, CRGB &out)
 
void setRange (uint16_t first, uint16_t len, CRGB color)
 
void clearRange (uint16_t first, uint16_t len)
 
void setAll (CRGB color)
 
void outputEffectColor (uint16_t pixelId, CRGB outputColor)
 
CRGB colorWheel (uint8_t pos)
 
dCHSV rgb2hsv (CRGB in)
 
CRGB hsv2rgb (dCHSV in)
 
void setColor (String &NewColor)
 
void setEffect (const String &effectName)
 
void setBrightness (float brightness)
 
void setSpeed (uint16_t speed)
 
void setDelay (uint16_t delay)
 
void PollFlash ()
 
void clearAll ()
 
bool ColorHasReachedTarget ()
 
bool ColorHasReachedTarget (double tc, double cc, double step)
 
void ConditionalIncrementColor (double tc, double &cc, double step)
 
void CalculateTransitionStepValue (double tc, double cc, double &step)
 

Private Attributes

bool HasBeenInitialized = false
 
uint32_t EffectWait = 0
 
uint32_t EffectCounter = 0
 
uint32_t EffectSpeed = 6
 
uint32_t EffectDelay = 0
 
bool EffectReverse = false
 
bool EffectMirror = false
 
bool EffectAllLeds = false
 
bool EffectWhiteChannel = false
 
float EffectBrightness = 1.0
 
CRGB EffectColor = { 183, 0, 255 }
 
bool StayDark = false
 
bool Disabled = false
 
uint32_t effectMarqueePixelAdvanceCount = 1
 
uint32_t effectMarqueePixelLocation = 0
 
uint32_t EffectStep = 0
 
uint32_t PixelCount = 0
 
uint32_t MirroredPixelCount = 0
 
uint8_t ChannelsPerPixel = 3
 
uint32_t PixelOffset = 0
 
FastTimer EffectDelayTimer
 
const EffectDescriptor_tActiveEffect = nullptr
 
struct c_InputEffectEngine::Transition_t TransitionInfo
 
struct c_InputEffectEngine::FlashInfo_t FlashInfo
 

Additional Inherited Members

- Protected Attributes inherited from c_InputCommon
bool HasBeenInitialized = false
 
uint32_t InputDataBufferSize = 0
 
bool IsInputChannelActive = true
 
c_InputMgr::e_InputChannelIds InputChannelId = c_InputMgr::e_InputChannelIds::InputChannelId_ALL
 
c_InputMgr::e_InputType ChannelType = c_InputMgr::e_InputType::InputType_Disabled
 

Member Typedef Documentation

◆ EffectFunc

uint16_t(c_InputEffectEngine::*) c_InputEffectEngine::EffectFunc(void)

◆ timeType

using c_InputEffectEngine::timeType = decltype(millis())
private

Constructor & Destructor Documentation

◆ c_InputEffectEngine() [1/2]

c_InputEffectEngine::c_InputEffectEngine ( c_InputMgr::e_InputChannelIds NewInputChannelId,
c_InputMgr::e_InputType NewChannelType,
uint32_t BufferSize )
Here is the call graph for this function:

◆ ~c_InputEffectEngine()

c_InputEffectEngine::~c_InputEffectEngine ( )
virtual

◆ c_InputEffectEngine() [2/2]

c_InputEffectEngine::c_InputEffectEngine ( )
Here is the call graph for this function:

Member Function Documentation

◆ Begin()

void c_InputEffectEngine::Begin ( )
virtual

set up the operating environment based on the current config (or defaults)

Implements c_InputCommon.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CalculateTransitionStepValue()

void c_InputEffectEngine::CalculateTransitionStepValue ( double tc,
double cc,
double & step )
private
Here is the caller graph for this function:

◆ clearAll()

void c_InputEffectEngine::clearAll ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ clearRange()

void c_InputEffectEngine::clearRange ( uint16_t first,
uint16_t len )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ColorHasReachedTarget() [1/2]

bool c_InputEffectEngine::ColorHasReachedTarget ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ColorHasReachedTarget() [2/2]

bool c_InputEffectEngine::ColorHasReachedTarget ( double tc,
double cc,
double step )
private

◆ colorWheel()

c_InputEffectEngine::CRGB c_InputEffectEngine::colorWheel ( uint8_t pos)
private

◆ ConditionalIncrementColor()

void c_InputEffectEngine::ConditionalIncrementColor ( double tc,
double & cc,
double step )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ effectBlink()

uint16_t c_InputEffectEngine::effectBlink ( )
Here is the call graph for this function:

◆ effectBreathe()

uint16_t c_InputEffectEngine::effectBreathe ( )
Here is the call graph for this function:

◆ effectChase()

uint16_t c_InputEffectEngine::effectChase ( )
Here is the call graph for this function:

◆ effectFireFlicker()

uint16_t c_InputEffectEngine::effectFireFlicker ( )
Here is the call graph for this function:

◆ effectFlash()

uint16_t c_InputEffectEngine::effectFlash ( )
Here is the call graph for this function:

◆ effectLightning()

uint16_t c_InputEffectEngine::effectLightning ( )
Here is the call graph for this function:

◆ effectMarquee()

uint16_t c_InputEffectEngine::effectMarquee ( )
Here is the call graph for this function:

◆ effectNull()

uint16_t c_InputEffectEngine::effectNull ( )

◆ effectRainbow()

uint16_t c_InputEffectEngine::effectRainbow ( )
Here is the call graph for this function:

◆ effectRandom()

uint16_t c_InputEffectEngine::effectRandom ( )
Here is the call graph for this function:

◆ effectSolidColor()

uint16_t c_InputEffectEngine::effectSolidColor ( )
Here is the call graph for this function:

◆ effectTransition()

uint16_t c_InputEffectEngine::effectTransition ( )
Here is the call graph for this function:

◆ GetConfig()

void c_InputEffectEngine::GetConfig ( JsonObject & jsonConfig)

Get the current config used by the driver.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetDriverName()

void c_InputEffectEngine::GetDriverName ( String & sDriverName)
inlinevirtual

get the name for the instantiated driver

Implements c_InputCommon.

◆ GetMqttConfig()

void c_InputEffectEngine::GetMqttConfig ( MQTTConfiguration_t & mqttConfig)

Get the current config used by the driver.

◆ GetMqttEffectList()

void c_InputEffectEngine::GetMqttEffectList ( JsonObject & jsonConfig)

Get the current config used by the driver.

◆ GetPixel()

void c_InputEffectEngine::GetPixel ( uint16_t pixelId,
CRGB & out )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetStatus()

void c_InputEffectEngine::GetStatus ( JsonObject & jsonStatus)
virtual

Implements c_InputCommon.

Here is the caller graph for this function:

◆ hsv2rgb()

c_InputEffectEngine::CRGB c_InputEffectEngine::hsv2rgb ( dCHSV in)
private
Here is the caller graph for this function:

◆ NextEffect()

void c_InputEffectEngine::NextEffect ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ outputEffectColor()

void c_InputEffectEngine::outputEffectColor ( uint16_t pixelId,
CRGB outputColor )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Poll()

void c_InputEffectEngine::Poll ( )

Call from loop(), renders Input data.

Here is the call graph for this function:

◆ PollFlash()

void c_InputEffectEngine::PollFlash ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Process()

void c_InputEffectEngine::Process ( )
virtual

Call from loop(), renders Input data.

Implements c_InputCommon.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ProcessButtonActions()

void c_InputEffectEngine::ProcessButtonActions ( c_ExternalInput::InputValue_t value)
virtual

Reimplemented from c_InputCommon.

Here is the call graph for this function:

◆ rgb2hsv()

c_InputEffectEngine::dCHSV c_InputEffectEngine::rgb2hsv ( CRGB in)
private
Here is the caller graph for this function:

◆ setAll()

void c_InputEffectEngine::setAll ( CRGB color)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setBrightness()

void c_InputEffectEngine::setBrightness ( float brightness)
private
Here is the caller graph for this function:

◆ SetBufferInfo()

void c_InputEffectEngine::SetBufferInfo ( uint32_t BufferSize)
virtual

Implements c_InputCommon.

Here is the caller graph for this function:

◆ setColor()

void c_InputEffectEngine::setColor ( String & NewColor)
private
Here is the caller graph for this function:

◆ SetConfig()

bool c_InputEffectEngine::SetConfig ( JsonObject & jsonConfig)

Set a new config in the driver.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setDelay()

void c_InputEffectEngine::setDelay ( uint16_t delay)
private
Here is the caller graph for this function:

◆ setEffect()

void c_InputEffectEngine::setEffect ( const String & effectName)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetMqttConfig()

void c_InputEffectEngine::SetMqttConfig ( MQTTConfiguration_t & mqttConfig)

Set a new config in the driver.

Here is the call graph for this function:

◆ setPixel()

void c_InputEffectEngine::setPixel ( uint16_t idx,
CRGB color )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setRange()

void c_InputEffectEngine::setRange ( uint16_t first,
uint16_t len,
CRGB color )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setSpeed()

void c_InputEffectEngine::setSpeed ( uint16_t speed)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ validateConfiguration()

void c_InputEffectEngine::validateConfiguration ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ ActiveEffect

const EffectDescriptor_t* c_InputEffectEngine::ActiveEffect = nullptr
private

◆ ChannelsPerPixel

uint8_t c_InputEffectEngine::ChannelsPerPixel = 3
private

◆ Disabled

bool c_InputEffectEngine::Disabled = false
private

◆ EffectAllLeds

bool c_InputEffectEngine::EffectAllLeds = false
private

◆ EffectBrightness

float c_InputEffectEngine::EffectBrightness = 1.0
private

◆ EffectColor

CRGB c_InputEffectEngine::EffectColor = { 183, 0, 255 }
private

◆ EffectCounter

uint32_t c_InputEffectEngine::EffectCounter = 0
private

◆ EffectDelay

uint32_t c_InputEffectEngine::EffectDelay = 0
private

◆ EffectDelayTimer

FastTimer c_InputEffectEngine::EffectDelayTimer
private

◆ effectMarqueePixelAdvanceCount

uint32_t c_InputEffectEngine::effectMarqueePixelAdvanceCount = 1
private

◆ effectMarqueePixelLocation

uint32_t c_InputEffectEngine::effectMarqueePixelLocation = 0
private

◆ EffectMirror

bool c_InputEffectEngine::EffectMirror = false
private

◆ EffectReverse

bool c_InputEffectEngine::EffectReverse = false
private

◆ EffectSpeed

uint32_t c_InputEffectEngine::EffectSpeed = 6
private

◆ EffectStep

uint32_t c_InputEffectEngine::EffectStep = 0
private

◆ EffectWait

uint32_t c_InputEffectEngine::EffectWait = 0
private

◆ EffectWhiteChannel

bool c_InputEffectEngine::EffectWhiteChannel = false
private

◆ FlashInfo

struct c_InputEffectEngine::FlashInfo_t c_InputEffectEngine::FlashInfo
private

◆ HasBeenInitialized

bool c_InputEffectEngine::HasBeenInitialized = false
private

◆ MirroredPixelCount

uint32_t c_InputEffectEngine::MirroredPixelCount = 0
private

◆ PixelCount

uint32_t c_InputEffectEngine::PixelCount = 0
private

◆ PixelOffset

uint32_t c_InputEffectEngine::PixelOffset = 0
private

◆ StayDark

bool c_InputEffectEngine::StayDark = false
private

◆ TransitionInfo

struct c_InputEffectEngine::Transition_t c_InputEffectEngine::TransitionInfo
private

The documentation for this class was generated from the following files: