mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-26 04:36:38 +00:00
Revert led brightness
This commit is contained in:
parent
0bb0f9875d
commit
2936147e50
@ -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)
|
return update ? lv_slider_set_value(obj, intval, LV_ANIM_ON)
|
||||||
: hasp_out_int(obj, attr, lv_slider_get_value(obj));
|
: hasp_out_int(obj, attr, lv_slider_get_value(obj));
|
||||||
} else if(check_obj_type(objtype, LV_HASP_LED)) {
|
} else if(check_obj_type(objtype, LV_HASP_LED)) {
|
||||||
if(update) {
|
return update ? lv_led_set_bright(obj, (uint8_t)val) : hasp_out_int(obj, attr, lv_led_get_bright(obj));
|
||||||
return is_true(payload) ? lv_led_on(obj) : lv_led_off(obj);
|
|
||||||
} else {
|
|
||||||
// return hasp_out_int(obj, attr, lv_led_get_state(obj));
|
|
||||||
}
|
|
||||||
} else if(check_obj_type(objtype, LV_HASP_GAUGE)) {
|
} 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));
|
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)) {
|
} 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
|
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:
|
// default:
|
||||||
// hasp_local_style_attr(obj, attr, payload, update);
|
// hasp_local_style_attr(obj, attr, payload, update);
|
||||||
}
|
}
|
||||||
|
@ -212,7 +212,6 @@ _HASP_ATTRIBUTE(SCALE_END_LINE_WIDTH, scale_end_line_width, lv_style_int_t)
|
|||||||
#define ATTR_Y 121
|
#define ATTR_Y 121
|
||||||
#define ATTR_W 119
|
#define ATTR_W 119
|
||||||
#define ATTR_H 104
|
#define ATTR_H 104
|
||||||
#define ATTR_BRIGHTNESS 10 // LED
|
|
||||||
#define ATTR_OPTIONS 29886
|
#define ATTR_OPTIONS 29886
|
||||||
#define ATTR_ENABLED 28193
|
#define ATTR_ENABLED 28193
|
||||||
#define ATTR_OPACITY 10155
|
#define ATTR_OPACITY 10155
|
||||||
|
Loading…
x
Reference in New Issue
Block a user