diff --git a/src/hasp_attribute.cpp b/src/hasp_attribute.cpp index de69758f..4a110d65 100644 --- a/src/hasp_attribute.cpp +++ b/src/hasp_attribute.cpp @@ -588,11 +588,7 @@ static void hasp_process_obj_attribute_val(lv_obj_t * obj, const char * attr, co return update ? lv_slider_set_value(obj, intval, LV_ANIM_ON) : hasp_out_int(obj, attr, lv_slider_get_value(obj)); } else if(check_obj_type(objtype, LV_HASP_LED)) { - if(update) { - return is_true(payload) ? lv_led_on(obj) : lv_led_off(obj); - } else { - // return hasp_out_int(obj, attr, lv_led_get_state(obj)); - } + return update ? lv_led_set_bright(obj, (uint8_t)val) : hasp_out_int(obj, attr, lv_led_get_bright(obj)); } else if(check_obj_type(objtype, LV_HASP_GAUGE)) { return update ? lv_gauge_set_value(obj, 0, intval) : hasp_out_int(obj, attr, lv_gauge_get_value(obj, 0)); } else if(check_obj_type(objtype, LV_HASP_ROLLER)) { @@ -782,16 +778,6 @@ void hasp_process_obj_attribute(lv_obj_t * obj, const char * attr_p, const char } break; // not a options object - case ATTR_BRIGHTNESS: - if(check_obj_type(obj, LV_HASP_LED)) { - if(update) { - lv_led_set_bright(obj, (uint8_t)val); - } else { - hasp_out_int(obj, attr, lv_led_get_bright(obj)); - } - return; - } - // default: // hasp_local_style_attr(obj, attr, payload, update); } diff --git a/src/hasp_attribute.h b/src/hasp_attribute.h index e2fc932d..6171e1e3 100644 --- a/src/hasp_attribute.h +++ b/src/hasp_attribute.h @@ -212,7 +212,6 @@ _HASP_ATTRIBUTE(SCALE_END_LINE_WIDTH, scale_end_line_width, lv_style_int_t) #define ATTR_Y 121 #define ATTR_W 119 #define ATTR_H 104 -#define ATTR_BRIGHTNESS 10 // LED #define ATTR_OPTIONS 29886 #define ATTR_ENABLED 28193 #define ATTR_OPACITY 10155