Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions common/tab5-ha-hmi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -547,15 +547,15 @@ text_sensor:
// disable some UI widgets
lv_obj_add_state(id(ac_container), LV_STATE_DISABLED);
lv_obj_add_state(id(temp_spin_down), LV_STATE_DISABLED);
lv_obj_clear_flag(id(temp_spin_down), LV_OBJ_FLAG_CLICKABLE);
lv_obj_remove_flag(id(temp_spin_down), LV_OBJ_FLAG_CLICKABLE);
lv_obj_add_state(id(temp_spin_up), LV_STATE_DISABLED);
lv_obj_clear_flag(id(temp_spin_up), LV_OBJ_FLAG_CLICKABLE);
lv_obj_remove_flag(id(temp_spin_up), LV_OBJ_FLAG_CLICKABLE);
} else {
// restore UI widgets
lv_obj_clear_state(id(ac_container), LV_STATE_DISABLED);
lv_obj_clear_state(id(temp_spin_down), LV_STATE_DISABLED);
lv_obj_remove_state(id(ac_container), LV_STATE_DISABLED);
lv_obj_remove_state(id(temp_spin_down), LV_STATE_DISABLED);
lv_obj_add_flag(id(temp_spin_down), LV_OBJ_FLAG_CLICKABLE);
lv_obj_clear_state(id(temp_spin_up), LV_STATE_DISABLED);
lv_obj_remove_state(id(temp_spin_up), LV_STATE_DISABLED);
lv_obj_add_flag(id(temp_spin_up), LV_OBJ_FLAG_CLICKABLE);
}
- lvgl.dropdown.update:
Expand Down
6 changes: 3 additions & 3 deletions common/tab5-scripts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ script:
if (i == id(page_num)) {
lv_obj_add_state(buttons[i], LV_STATE_CHECKED);
} else {
lv_obj_clear_state(buttons[i], LV_STATE_CHECKED);
lv_obj_remove_state(buttons[i], LV_STATE_CHECKED);
}
bool selected = (i == active);
lv_obj_add_style(labels[i], selected ? id(nav_label_activate) : id(nav_label_inactivate), LV_PART_MAIN);
Expand Down Expand Up @@ -129,7 +129,7 @@ script:
float val = 1.0f; // fixed brightness

lv_color_t c = hsv_to_rgb(hue, sat, val);
lv_canvas_set_px(canvas, x, y, c);
lv_canvas_set_px(canvas, x, y, c, LV_OPA_COVER);
}
};
# This script was used to draw a custom 'indicator' on color palette
Expand All @@ -148,7 +148,7 @@ script:
then:
- lambda: |-
lv_obj_add_event_cb(id(color_palette_indicator), [](lv_event_t * e){
lv_obj_t * obj = lv_event_get_target(e);
lv_obj_t * obj = lv_event_get_target_obj(e);

lv_indev_t * indev = lv_indev_get_act();
if(indev == NULL) return;
Expand Down