esphome 2024.10.2__py3-none-any.whl → 2024.10.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- esphome/components/lvgl/widgets/animimg.py +4 -3
- esphome/components/lvgl/widgets/img.py +2 -0
- esphome/components/modbus/modbus.cpp +24 -12
- esphome/components/rpi_dpi_rgb/rpi_dpi_rgb.cpp +20 -0
- esphome/components/rpi_dpi_rgb/rpi_dpi_rgb.h +3 -2
- esphome/const.py +1 -1
- {esphome-2024.10.2.dist-info → esphome-2024.10.3.dist-info}/METADATA +1 -1
- {esphome-2024.10.2.dist-info → esphome-2024.10.3.dist-info}/RECORD +12 -12
- {esphome-2024.10.2.dist-info → esphome-2024.10.3.dist-info}/LICENSE +0 -0
- {esphome-2024.10.2.dist-info → esphome-2024.10.3.dist-info}/WHEEL +0 -0
- {esphome-2024.10.2.dist-info → esphome-2024.10.3.dist-info}/entry_points.txt +0 -0
- {esphome-2024.10.2.dist-info → esphome-2024.10.3.dist-info}/top_level.txt +0 -0
@@ -60,9 +60,10 @@ class AnimimgType(WidgetType):
|
|
60
60
|
lvgl_components_required.add(CONF_IMAGE)
|
61
61
|
lvgl_components_required.add(CONF_ANIMIMG)
|
62
62
|
if CONF_SRC in config:
|
63
|
-
|
64
|
-
await cg.get_variable(x)
|
65
|
-
|
63
|
+
srcs = [
|
64
|
+
await lv_image.process(await cg.get_variable(x))
|
65
|
+
for x in config[CONF_SRC]
|
66
|
+
]
|
66
67
|
src_id = cg.static_const_array(config[CONF_SRC_LIST_ID], srcs)
|
67
68
|
count = len(config[CONF_SRC])
|
68
69
|
lv.animimg_set_src(w.obj, src_id, count)
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import esphome.codegen as cg
|
1
2
|
import esphome.config_validation as cv
|
2
3
|
from esphome.const import CONF_ANGLE, CONF_MODE
|
3
4
|
|
@@ -64,6 +65,7 @@ class ImgType(WidgetType):
|
|
64
65
|
|
65
66
|
async def to_code(self, w: Widget, config):
|
66
67
|
if src := config.get(CONF_SRC):
|
68
|
+
src = await cg.get_variable(src)
|
67
69
|
lv.img_set_src(w.obj, await lv_image.process(src))
|
68
70
|
if (cf_angle := config.get(CONF_ANGLE)) is not None:
|
69
71
|
pivot_x = config[CONF_PIVOT_X]
|
@@ -15,23 +15,33 @@ void Modbus::setup() {
|
|
15
15
|
void Modbus::loop() {
|
16
16
|
const uint32_t now = millis();
|
17
17
|
|
18
|
-
if (now - this->last_modbus_byte_ > 50) {
|
19
|
-
this->rx_buffer_.clear();
|
20
|
-
this->last_modbus_byte_ = now;
|
21
|
-
}
|
22
|
-
// stop blocking new send commands after send_wait_time_ ms regardless if a response has been received since then
|
23
|
-
if (now - this->last_send_ > send_wait_time_) {
|
24
|
-
waiting_for_response = 0;
|
25
|
-
}
|
26
|
-
|
27
18
|
while (this->available()) {
|
28
19
|
uint8_t byte;
|
29
20
|
this->read_byte(&byte);
|
30
21
|
if (this->parse_modbus_byte_(byte)) {
|
31
22
|
this->last_modbus_byte_ = now;
|
32
23
|
} else {
|
24
|
+
size_t at = this->rx_buffer_.size();
|
25
|
+
if (at > 0) {
|
26
|
+
ESP_LOGV(TAG, "Clearing buffer of %d bytes - parse failed", at);
|
27
|
+
this->rx_buffer_.clear();
|
28
|
+
}
|
29
|
+
}
|
30
|
+
}
|
31
|
+
|
32
|
+
if (now - this->last_modbus_byte_ > 50) {
|
33
|
+
size_t at = this->rx_buffer_.size();
|
34
|
+
if (at > 0) {
|
35
|
+
ESP_LOGV(TAG, "Clearing buffer of %d bytes - timeout", at);
|
33
36
|
this->rx_buffer_.clear();
|
34
37
|
}
|
38
|
+
|
39
|
+
// stop blocking new send commands after sent_wait_time_ ms after response received
|
40
|
+
if (now - this->last_send_ > send_wait_time_) {
|
41
|
+
if (waiting_for_response > 0)
|
42
|
+
ESP_LOGV(TAG, "Stop waiting for response from %d", waiting_for_response);
|
43
|
+
waiting_for_response = 0;
|
44
|
+
}
|
35
45
|
}
|
36
46
|
}
|
37
47
|
|
@@ -39,7 +49,7 @@ bool Modbus::parse_modbus_byte_(uint8_t byte) {
|
|
39
49
|
size_t at = this->rx_buffer_.size();
|
40
50
|
this->rx_buffer_.push_back(byte);
|
41
51
|
const uint8_t *raw = &this->rx_buffer_[0];
|
42
|
-
|
52
|
+
ESP_LOGVV(TAG, "Modbus received Byte %d (0X%x)", byte, byte);
|
43
53
|
// Byte 0: modbus address (match all)
|
44
54
|
if (at == 0)
|
45
55
|
return true;
|
@@ -144,8 +154,10 @@ bool Modbus::parse_modbus_byte_(uint8_t byte) {
|
|
144
154
|
ESP_LOGW(TAG, "Got Modbus frame from unknown address 0x%02X! ", address);
|
145
155
|
}
|
146
156
|
|
147
|
-
//
|
148
|
-
|
157
|
+
// reset buffer
|
158
|
+
ESP_LOGV(TAG, "Clearing buffer of %d bytes - parse succeeded", at);
|
159
|
+
this->rx_buffer_.clear();
|
160
|
+
return true;
|
149
161
|
}
|
150
162
|
|
151
163
|
void Modbus::dump_config() {
|
@@ -84,6 +84,26 @@ void RpiDpiRgb::draw_pixels_at(int x_start, int y_start, int w, int h, const uin
|
|
84
84
|
ESP_LOGE(TAG, "lcd_lcd_panel_draw_bitmap failed: %s", esp_err_to_name(err));
|
85
85
|
}
|
86
86
|
|
87
|
+
int RpiDpiRgb::get_width() {
|
88
|
+
switch (this->rotation_) {
|
89
|
+
case display::DISPLAY_ROTATION_90_DEGREES:
|
90
|
+
case display::DISPLAY_ROTATION_270_DEGREES:
|
91
|
+
return this->get_height_internal();
|
92
|
+
default:
|
93
|
+
return this->get_width_internal();
|
94
|
+
}
|
95
|
+
}
|
96
|
+
|
97
|
+
int RpiDpiRgb::get_height() {
|
98
|
+
switch (this->rotation_) {
|
99
|
+
case display::DISPLAY_ROTATION_90_DEGREES:
|
100
|
+
case display::DISPLAY_ROTATION_270_DEGREES:
|
101
|
+
return this->get_width_internal();
|
102
|
+
default:
|
103
|
+
return this->get_height_internal();
|
104
|
+
}
|
105
|
+
}
|
106
|
+
|
87
107
|
void RpiDpiRgb::draw_pixel_at(int x, int y, Color color) {
|
88
108
|
if (!this->get_clipping().inside(x, y))
|
89
109
|
return; // NOLINT
|
@@ -24,6 +24,7 @@ class RpiDpiRgb : public display::Display {
|
|
24
24
|
void update() override { this->do_update_(); }
|
25
25
|
void setup() override;
|
26
26
|
void loop() override;
|
27
|
+
float get_setup_priority() const override { return setup_priority::HARDWARE; }
|
27
28
|
void draw_pixels_at(int x_start, int y_start, int w, int h, const uint8_t *ptr, display::ColorOrder order,
|
28
29
|
display::ColorBitness bitness, bool big_endian, int x_offset, int y_offset, int x_pad) override;
|
29
30
|
void draw_pixel_at(int x, int y, Color color) override;
|
@@ -44,8 +45,8 @@ class RpiDpiRgb : public display::Display {
|
|
44
45
|
this->width_ = width;
|
45
46
|
this->height_ = height;
|
46
47
|
}
|
47
|
-
int get_width() override
|
48
|
-
int get_height() override
|
48
|
+
int get_width() override;
|
49
|
+
int get_height() override;
|
49
50
|
void set_hsync_back_porch(uint16_t hsync_back_porch) { this->hsync_back_porch_ = hsync_back_porch; }
|
50
51
|
void set_hsync_front_porch(uint16_t hsync_front_porch) { this->hsync_front_porch_ = hsync_front_porch; }
|
51
52
|
void set_hsync_pulse_width(uint16_t hsync_pulse_width) { this->hsync_pulse_width_ = hsync_pulse_width; }
|
esphome/const.py
CHANGED
@@ -5,7 +5,7 @@ esphome/codegen.py,sha256=GePHUM7xdXb_Pil59SHVsXg2F4VBPgkH-Fz2PDX8Z54,1873
|
|
5
5
|
esphome/config.py,sha256=nOiXPZv8wHtmytkNlGcewp0uuJd9G5rRjkqevYXtjzo,39618
|
6
6
|
esphome/config_helpers.py,sha256=MKf_wzO35nn41FvigXE0iYKDslPgL2ruf8R-EPtTT2I,3256
|
7
7
|
esphome/config_validation.py,sha256=MeZcJrTRpe91KV5r18i6U-PeZ_Oaql81m12KW_gzCXU,66221
|
8
|
-
esphome/const.py,sha256=
|
8
|
+
esphome/const.py,sha256=_oKZGnp61QXFlhXBVqpQVKGcTMdQ_ZbIx_5O_NssmKI,40030
|
9
9
|
esphome/coroutine.py,sha256=j_14z8dIIzIBeuNO30D4c1RJvMMt1xZFZ58Evd-EvJA,9344
|
10
10
|
esphome/cpp_generator.py,sha256=lXPXHYUsFIvBSAoZ93mXYlGcXYg5L18nTtYGHE4_rr8,31203
|
11
11
|
esphome/cpp_helpers.py,sha256=6C2vNbOIhZKi43xRVlk5hp9GfshfBn-rc5D_ZFUEYaE,4801
|
@@ -1473,13 +1473,13 @@ esphome/components/lvgl/text/__init__.py,sha256=Lqa3m00EJvynqSb_RDNZ0zNEHKBhq76r
|
|
1473
1473
|
esphome/components/lvgl/text/lvgl_text.h,sha256=H0tLRmOMCKTelGj-kLF0J6CGoOPQo142cP-CTOk4Rog,914
|
1474
1474
|
esphome/components/lvgl/text_sensor/__init__.py,sha256=NXdR4qq4T9i293n-yDb5uZlzSNI2nOWsJ3DlKtMjqrA,1247
|
1475
1475
|
esphome/components/lvgl/widgets/__init__.py,sha256=LOSSkuFM4mnA2V7ROgaejEGxZp8Jb6vk__m8N87X48U,13945
|
1476
|
-
esphome/components/lvgl/widgets/animimg.py,sha256=
|
1476
|
+
esphome/components/lvgl/widgets/animimg.py,sha256=G6ADCdDomzAD95VQ6hARC7ZgOsjc6L1H3rT0PaJWkPs,3337
|
1477
1477
|
esphome/components/lvgl/widgets/arc.py,sha256=Gmqxe2AyROyU-7C9XKfzBY3g5CowV0ZJVsDzJAfUvCY,2522
|
1478
1478
|
esphome/components/lvgl/widgets/button.py,sha256=lR_8dHZK3P9AY6WbjfL3Sj9oyTOf-i9qbvkGzcPpzgk,423
|
1479
1479
|
esphome/components/lvgl/widgets/buttonmatrix.py,sha256=okYCiIlGkIl3kHlhwXMgQKEMmM__PXLvo3RnZM_739Q,8648
|
1480
1480
|
esphome/components/lvgl/widgets/checkbox.py,sha256=5MiANLeX3o1uDAlCorw1aOfAkNx1SMnGm6rcXsSgq_c,891
|
1481
1481
|
esphome/components/lvgl/widgets/dropdown.py,sha256=kxXilnJdPmd2H6Y3hcW7e_S6wZDyZRzl_TJ2-UIH7u8,2505
|
1482
|
-
esphome/components/lvgl/widgets/img.py,sha256=
|
1482
|
+
esphome/components/lvgl/widgets/img.py,sha256=UE8X_RQhirIgJploL1VNHNuzdhlnhpZz413D7GeIs_A,2445
|
1483
1483
|
esphome/components/lvgl/widgets/keyboard.py,sha256=1WBm_nfeFpWvzYts68FN_arqovOwMFs47TQAPCKour8,1543
|
1484
1484
|
esphome/components/lvgl/widgets/label.py,sha256=5xl1a6apdJgGKmkpL8m7RDASjaeKzjKTllhY26Gbfag,1139
|
1485
1485
|
esphome/components/lvgl/widgets/led.py,sha256=qoe_kvZpoRkwbxz25Z66KQ__KLC2tfhAukChp1jdlDc,888
|
@@ -1704,7 +1704,7 @@ esphome/components/mmc5983/mmc5983.cpp,sha256=6tH7TsB2jSTYDR3-SQ90JgKNMQtFvG1OJH
|
|
1704
1704
|
esphome/components/mmc5983/mmc5983.h,sha256=djHDHSC4UAimrWpqnKB-g1wycM5ym7vOLHU7BDRfwA8,784
|
1705
1705
|
esphome/components/mmc5983/sensor.py,sha256=_eAPEfWzxYWsp5kPji_Rb99X6j9RxlReC4boxYWUtWY,1670
|
1706
1706
|
esphome/components/modbus/__init__.py,sha256=pe9aU_PBNR9h9TqqezEE8zyvp7PLOtsa01Zaf08DMfk,3111
|
1707
|
-
esphome/components/modbus/modbus.cpp,sha256=
|
1707
|
+
esphome/components/modbus/modbus.cpp,sha256=c0Q4E44zXtPQq3eMlqyNUlXnHcCW8rwdCIv3-_i5eLo,8516
|
1708
1708
|
esphome/components/modbus/modbus.h,sha256=lDXklIqGZsyXnvf4oFslaGtD7yd9YwRkUYSpYsQRcAg,2477
|
1709
1709
|
esphome/components/modbus_controller/__init__.py,sha256=_iP6TbkCcakmKeNsfXfL4pThvpZKuKtURpU5_jUiTW8,10771
|
1710
1710
|
esphome/components/modbus_controller/automation.h,sha256=QyT_EHHjAzhXdM7edxoV3M_-ks-DwzhGiMdrN4QXP-M,555
|
@@ -2289,8 +2289,8 @@ esphome/components/rp2040_pwm/rp2040_pwm.cpp,sha256=3geqplH_DrTcvIM3OCvCBfWe2ezz
|
|
2289
2289
|
esphome/components/rp2040_pwm/rp2040_pwm.h,sha256=z6LGWv3Afgn_7UOiYUySkDezGFYBSu7Djdz-Um13xxM,1513
|
2290
2290
|
esphome/components/rpi_dpi_rgb/__init__.py,sha256=4Nn7UhpMJ9oSbuLdyVEW7G9PlIey2v33SWRNVizt9Oc,30
|
2291
2291
|
esphome/components/rpi_dpi_rgb/display.py,sha256=o_OKr4vaCgm9d9fO-CVkE1VC4qwyauox-AKq--P3nZY,7468
|
2292
|
-
esphome/components/rpi_dpi_rgb/rpi_dpi_rgb.cpp,sha256=
|
2293
|
-
esphome/components/rpi_dpi_rgb/rpi_dpi_rgb.h,sha256=
|
2292
|
+
esphome/components/rpi_dpi_rgb/rpi_dpi_rgb.cpp,sha256=U13Im3DsT37SGrbKS8EBHr2f8Qvvg_0Kg307yRnDMkk,6060
|
2293
|
+
esphome/components/rpi_dpi_rgb/rpi_dpi_rgb.h,sha256=OnPzce1bM1ftJQsgx-oP7BaD82Z227KFvMW6ESuYgLk,4127
|
2294
2294
|
esphome/components/rtl87xx/__init__.py,sha256=HIcczzFYGdNtOj635-gH0VVmBOZjmvcS4mxFWdlPtBo,1362
|
2295
2295
|
esphome/components/rtl87xx/boards.py,sha256=JItSPj4n2UAvUXISoL2PTyTAqIi2Wp3sjGjs1fgS-3M,29269
|
2296
2296
|
esphome/components/rtttl/__init__.py,sha256=m8vjSNfwcgbJm6NhDe_ErddMMwUpe2StubWcMY8sd28,4383
|
@@ -3309,9 +3309,9 @@ esphome/dashboard/util/itertools.py,sha256=8eLrWEWmICLtXNxkKdYPQV0c_N4GEz8m9Npnb
|
|
3309
3309
|
esphome/dashboard/util/password.py,sha256=cQz3b9B-ijTe7zS6BeCW0hc3pWv6JjC78jmnycYYAh8,321
|
3310
3310
|
esphome/dashboard/util/subprocess.py,sha256=T8EW6dbU4LPd2DG1dRrdh8li71tt6J1isn411poMhkk,1022
|
3311
3311
|
esphome/dashboard/util/text.py,sha256=ENDnfN4O0NdA3CKVJjQYabFbwbrsIhVKrAMQe53qYu4,534
|
3312
|
-
esphome-2024.10.
|
3313
|
-
esphome-2024.10.
|
3314
|
-
esphome-2024.10.
|
3315
|
-
esphome-2024.10.
|
3316
|
-
esphome-2024.10.
|
3317
|
-
esphome-2024.10.
|
3312
|
+
esphome-2024.10.3.dist-info/LICENSE,sha256=HzEjkBInJe44L4WvAOPfhPJJDNj6YbnqFyvGWRzArGM,36664
|
3313
|
+
esphome-2024.10.3.dist-info/METADATA,sha256=Woskf6_0t77uP-nvocC4svNUcldwJNUD_w4fQ6RGk48,3407
|
3314
|
+
esphome-2024.10.3.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
3315
|
+
esphome-2024.10.3.dist-info/entry_points.txt,sha256=mIxVNuWtbYzeEcaWCl-AQ-97aBOWbnYBAK8nbF6P4M0,50
|
3316
|
+
esphome-2024.10.3.dist-info/top_level.txt,sha256=0GSXEW3cnITpgG3qnsSMz0qoqJHAFyfw7Y8MVtEf1Yk,8
|
3317
|
+
esphome-2024.10.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|