mirror of
https://github.com/esphome/esphome.git
synced 2025-10-05 19:33:47 +01:00
[lvgl] Rework events to avoid feedback loops (#7262)
This commit is contained in:
@@ -29,7 +29,11 @@ LvglComponent = lvgl_ns.class_("LvglComponent", cg.PollingComponent)
|
||||
LVGL_COMP_ARG = [(LvglComponent.operator("ptr"), LVGL_COMP)]
|
||||
lv_event_t_ptr = cg.global_ns.namespace("lv_event_t").operator("ptr")
|
||||
EVENT_ARG = [(lv_event_t_ptr, "ev")]
|
||||
CUSTOM_EVENT = literal("lvgl::lv_custom_event")
|
||||
# Two custom events; API_EVENT is fired when an entity is updated remotely by an API interaction;
|
||||
# UPDATE_EVENT is fired when an entity is programmatically updated locally.
|
||||
# VALUE_CHANGED is the event generated by LVGL when an entity's value changes through user interaction.
|
||||
API_EVENT = literal("lvgl::lv_api_event")
|
||||
UPDATE_EVENT = literal("lvgl::lv_update_event")
|
||||
|
||||
|
||||
def get_line_marks(value) -> list:
|
||||
|
Reference in New Issue
Block a user