ESPHome
2024.11.0
esphome
esphome
components
adalight
adalight_light_effect.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
esphome/core/component.h
"
4
#include "
esphome/components/light/addressable_light_effect.h
"
5
#include "
esphome/components/uart/uart.h
"
6
7
#include <vector>
8
9
namespace
esphome
{
10
namespace
adalight {
11
12
class
AdalightLightEffect
:
public
light::AddressableLightEffect
,
public
uart::UARTDevice
{
13
public
:
14
AdalightLightEffect
(
const
std::string &
name
);
15
16
void
start
()
override
;
17
void
stop
()
override
;
18
void
apply
(
light::AddressableLight
&it,
const
Color
¤t_color)
override
;
19
20
protected
:
21
enum
Frame
{
22
INVALID
,
23
PARTIAL
,
24
CONSUMED
,
25
};
26
27
unsigned
int
get_frame_size_
(
int
led_count)
const
;
28
void
reset_frame_
(
light::AddressableLight
&it);
29
void
blank_all_leds_
(
light::AddressableLight
&it);
30
Frame
parse_frame_
(
light::AddressableLight
&it);
31
32
uint32_t
last_ack_
{0};
33
uint32_t
last_byte_
{0};
34
uint32_t
last_reset_
{0};
35
std::vector<uint8_t>
frame_
;
36
};
37
38
}
// namespace adalight
39
}
// namespace esphome
esphome::adalight::AdalightLightEffect::reset_frame_
void reset_frame_(light::AddressableLight &it)
Definition:
adalight_light_effect.cpp:36
esphome::shelly_dimmer::name
const char * name
Definition:
stm32flash.h:78
uart.h
esphome::adalight::AdalightLightEffect
Definition:
adalight_light_effect.h:12
addressable_light_effect.h
esphome::adalight::AdalightLightEffect::AdalightLightEffect
AdalightLightEffect(const std::string &name)
Definition:
adalight_light_effect.cpp:12
esphome::adalight::AdalightLightEffect::parse_frame_
Frame parse_frame_(light::AddressableLight &it)
Definition:
adalight_light_effect.cpp:100
esphome::adalight::AdalightLightEffect::last_reset_
uint32_t last_reset_
Definition:
adalight_light_effect.h:34
esphome::adalight::AdalightLightEffect::blank_all_leds_
void blank_all_leds_(light::AddressableLight &it)
Definition:
adalight_light_effect.cpp:43
esphome::adalight::AdalightLightEffect::CONSUMED
Definition:
adalight_light_effect.h:24
esphome::adalight::AdalightLightEffect::INVALID
Definition:
adalight_light_effect.h:22
esphome::light::AddressableLightEffect::apply
void apply() override
Definition:
addressable_light_effect.h:41
esphome::adalight::AdalightLightEffect::start
void start() override
Definition:
adalight_light_effect.cpp:14
esphome::adalight::AdalightLightEffect::last_byte_
uint32_t last_byte_
Definition:
adalight_light_effect.h:33
esphome::Color
Definition:
color.h:10
esphome::light::AddressableLightEffect
Definition:
addressable_light_effect.h:31
esphome::uart::UARTDevice
Definition:
uart.h:12
esphome::adalight::AdalightLightEffect::frame_
std::vector< uint8_t > frame_
Definition:
adalight_light_effect.h:35
esphome::adalight::AdalightLightEffect::get_frame_size_
unsigned int get_frame_size_(int led_count) const
Definition:
adalight_light_effect.cpp:28
esphome::adalight::AdalightLightEffect::Frame
Frame
Definition:
adalight_light_effect.h:21
esphome
Implementation of SPI Controller mode.
Definition:
a01nyub.cpp:7
component.h
esphome::adalight::AdalightLightEffect::stop
void stop() override
Definition:
adalight_light_effect.cpp:22
esphome::light::AddressableLight
Definition:
addressable_light.h:31
esphome::adalight::AdalightLightEffect::PARTIAL
Definition:
adalight_light_effect.h:23
esphome::adalight::AdalightLightEffect::last_ack_
uint32_t last_ack_
Definition:
adalight_light_effect.h:32
Generated by
1.8.13