From d3093a13c2d19295b338d94130cee7ea918eacf8 Mon Sep 17 00:00:00 2001 From: s-hadinger <49731213+s-hadinger@users.noreply.github.com> Date: Fri, 16 Feb 2024 17:23:24 +0100 Subject: [PATCH] HASPmota more attributes (#20744) --- CHANGELOG.md | 1 + .../berry_tasmota/src/be_lv_haspmota.c | 58 ++++++++++--------- .../haspmota_src/haspmota_core/haspmota.be | 6 ++ 3 files changed, 39 insertions(+), 26 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6df9d0e31..471ceb7af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -179,6 +179,7 @@ All notable changes to this project will be documented in this file. ### Added - DeepSleep support through TIMERS (#20117) - Command ``WebCanvas linear-gradient(#F02 7%,#F93,#FF4,#082,#00F,#708 93%)`` to set GUI canvas +- HASPmota more attributes ### Breaking Changed - Remove Berry `every_200ms` event which didn't work anyways (#20205) diff --git a/lib/libesp32/berry_tasmota/src/be_lv_haspmota.c b/lib/libesp32/berry_tasmota/src/be_lv_haspmota.c index e11748520..2c34ccb59 100644 --- a/lib/libesp32/berry_tasmota/src/be_lv_haspmota.c +++ b/lib/libesp32/berry_tasmota/src/be_lv_haspmota.c @@ -4344,37 +4344,43 @@ be_local_class(lvh_obj, { be_const_key_int(6, -1), be_nested_str_weak(hold) }, })) ) } )) }, { be_const_key_weak(_attr_map, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(29, + be_const_map( * be_nested_map(35, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(bg_grad_color, -1), be_nested_str_weak(style_bg_grad_color) }, - { be_const_key_weak(pad_bottom, -1), be_nested_str_weak(style_pad_bottom) }, - { be_const_key_weak(pad_top, -1), be_nested_str_weak(style_pad_top) }, - { be_const_key_weak(y, 10), be_nested_str_weak(y) }, - { be_const_key_weak(border_side, -1), be_nested_str_weak(style_border_side) }, - { be_const_key_weak(w, -1), be_nested_str_weak(width) }, - { be_const_key_weak(start_angle1, -1), be_nested_str_weak(start_angle) }, - { be_const_key_weak(width, 5), be_nested_str_weak(style_width) }, - { be_const_key_weak(start_angle, 23), be_nested_str_weak(bg_start_angle) }, - { be_const_key_weak(h, -1), be_nested_str_weak(height) }, - { be_const_key_weak(rotation, -1), be_nested_str_weak(rotation) }, - { be_const_key_weak(src, 27), be_nested_str_weak(src) }, - { be_const_key_weak(line_color, -1), be_nested_str_weak(style_line_color) }, - { be_const_key_weak(image_recolor_opa, -1), be_nested_str_weak(style_img_recolor_opa) }, - { be_const_key_weak(end_angle, -1), be_nested_str_weak(bg_end_angle) }, - { be_const_key_weak(pad_right, 19), be_nested_str_weak(style_pad_right) }, + { be_const_key_weak(arc_rounded, -1), be_nested_str_weak(style_arc_rounded) }, + { be_const_key_weak(line_color, 13), be_nested_str_weak(style_line_color) }, { be_const_key_weak(bg_grad_dir, -1), be_nested_str_weak(style_bg_grad_dir) }, + { be_const_key_weak(border_side, 7), be_nested_str_weak(style_border_side) }, { be_const_key_weak(pad_all, -1), be_nested_str_weak(style_pad_all) }, - { be_const_key_weak(bg_color, 13), be_nested_str_weak(style_bg_color) }, - { be_const_key_weak(image_recolor, -1), be_nested_str_weak(style_img_recolor) }, - { be_const_key_weak(x, 12), be_nested_str_weak(x) }, - { be_const_key_weak(line_rounded, -1), be_nested_str_weak(style_line_rounded) }, + { be_const_key_weak(height, -1), be_nested_str_weak(style_height) }, + { be_const_key_weak(y, -1), be_nested_str_weak(y) }, + { be_const_key_weak(arc_opa, -1), be_nested_str_weak(style_arc_opa) }, + { be_const_key_weak(pad_right, -1), be_nested_str_weak(style_pad_right) }, + { be_const_key_weak(image_recolor_opa, 28), be_nested_str_weak(style_img_recolor_opa) }, + { be_const_key_weak(x, -1), be_nested_str_weak(x) }, + { be_const_key_weak(arc_color, -1), be_nested_str_weak(style_arc_color) }, + { be_const_key_weak(w, -1), be_nested_str_weak(width) }, + { be_const_key_weak(h, -1), be_nested_str_weak(height) }, + { be_const_key_weak(radius, 8), be_nested_str_weak(style_radius) }, + { be_const_key_weak(width, 11), be_nested_str_weak(style_width) }, + { be_const_key_weak(border_color, 22), be_nested_str_weak(style_border_color) }, + { be_const_key_weak(bg_grad_color, 34), be_nested_str_weak(style_bg_grad_color) }, + { be_const_key_weak(bg_color, -1), be_nested_str_weak(style_bg_color) }, + { be_const_key_weak(border_width, 33), be_nested_str_weak(style_border_width) }, + { be_const_key_weak(pad_top, -1), be_nested_str_weak(style_pad_top) }, + { be_const_key_weak(image_recolor, 17), be_nested_str_weak(style_img_recolor) }, + { be_const_key_weak(border_post, -1), be_nested_str_weak(style_border_pot) }, + { be_const_key_weak(start_angle1, -1), be_nested_str_weak(start_angle) }, + { be_const_key_weak(border_opa, -1), be_nested_str_weak(style_border_opa) }, + { be_const_key_weak(rotation, 10), be_nested_str_weak(rotation) }, + { be_const_key_weak(arc_width, 12), be_nested_str_weak(style_arc_width) }, + { be_const_key_weak(end_angle, -1), be_nested_str_weak(bg_end_angle) }, + { be_const_key_weak(pad_bottom, -1), be_nested_str_weak(style_pad_bottom) }, { be_const_key_weak(bg_opa, -1), be_nested_str_weak(style_bg_opa) }, { be_const_key_weak(end_angle1, -1), be_nested_str_weak(end_angle) }, - { be_const_key_weak(border_color, 21), be_nested_str_weak(style_border_color) }, - { be_const_key_weak(height, -1), be_nested_str_weak(style_height) }, - { be_const_key_weak(pad_left, 17), be_nested_str_weak(style_pad_left) }, - { be_const_key_weak(radius, -1), be_nested_str_weak(style_radius) }, - { be_const_key_weak(border_width, 15), be_nested_str_weak(style_border_width) }, + { be_const_key_weak(start_angle, 30), be_nested_str_weak(bg_start_angle) }, + { be_const_key_weak(src, -1), be_nested_str_weak(src) }, + { be_const_key_weak(line_rounded, -1), be_nested_str_weak(style_line_rounded) }, + { be_const_key_weak(pad_left, -1), be_nested_str_weak(style_pad_left) }, })) ) } )) }, { be_const_key_weak(get_pad_all, 94), be_const_closure(lvh_obj_get_pad_all_closure) }, { be_const_key_weak(set_action, -1), be_const_closure(lvh_obj_set_action_closure) }, diff --git a/tasmota/berry/haspmota_src/haspmota_core/haspmota.be b/tasmota/berry/haspmota_src/haspmota_core/haspmota.be index 2320f9fb8..5a05aa819 100644 --- a/tasmota/berry/haspmota_src/haspmota_core/haspmota.be +++ b/tasmota/berry/haspmota_src/haspmota_core/haspmota.be @@ -87,6 +87,8 @@ class lvh_obj "border_side": "style_border_side", "border_width": "style_border_width", "border_color": "style_border_color", + "border_opa": "style_border_opa", + "border_post": "style_border_pot", # "line_width": nil, # depends on class # "line_width1": nil, # depends on class # "action": nil, # store the action in self.action @@ -100,6 +102,10 @@ class lvh_obj "bg_grad_dir": "style_bg_grad_dir", "line_color": "style_line_color", "line_rounded": "style_line_rounded", + "arc_color": "style_arc_color", + "arc_opa": "style_arc_opa", + "arc_rounded": "style_arc_rounded", + "arc_width": "style_arc_width", "pad_left": "style_pad_left", "pad_right": "style_pad_right", "pad_top": "style_pad_top",