mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-25 20:26:41 +00:00
txt property is obsolete, use text instead
This commit is contained in:
parent
67ffc1e266
commit
83b54eeec6
@ -1006,25 +1006,7 @@ static void hasp_local_style_attr(lv_obj_t* obj, const char* attr_p, uint16_t at
|
|||||||
return attribute_value_opa(obj, part, state, update, attr_p, (lv_opa_t)var);
|
return attribute_value_opa(obj, part, state, update, attr_p, (lv_opa_t)var);
|
||||||
case ATTR_VALUE_STR: {
|
case ATTR_VALUE_STR: {
|
||||||
if(update) {
|
if(update) {
|
||||||
|
|
||||||
my_obj_set_value_str_txt(obj, part, state, payload);
|
my_obj_set_value_str_txt(obj, part, state, payload);
|
||||||
|
|
||||||
// size_t len = strlen(payload);
|
|
||||||
// if(len > 0) {
|
|
||||||
// // Free previous string
|
|
||||||
// const char * str = lv_obj_get_style_value_str(obj, part);
|
|
||||||
|
|
||||||
// // Create new string
|
|
||||||
// len++;
|
|
||||||
// char * str_p = (char *)lv_mem_alloc(len);
|
|
||||||
// memset(str_p, 0, len);
|
|
||||||
// memccpy(str_p, payload, 0, len);
|
|
||||||
// lv_obj_set_style_local_value_str(obj, part, state, str_p);
|
|
||||||
|
|
||||||
// if(str != NULL) {
|
|
||||||
// // lv_mem_free(str); // TODO : BIG Memory Leak ! / crashes
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
} else {
|
} else {
|
||||||
attr_out_str(obj, attr, lv_obj_get_style_value_str(obj, part));
|
attr_out_str(obj, attr, lv_obj_get_style_value_str(obj, part));
|
||||||
}
|
}
|
||||||
@ -1076,9 +1058,6 @@ static void hasp_local_style_attr(lv_obj_t* obj, const char* attr_p, uint16_t at
|
|||||||
/* Image attributes */
|
/* Image attributes */
|
||||||
// Todo
|
// Todo
|
||||||
|
|
||||||
/* Scale attributes */
|
|
||||||
// Todo
|
|
||||||
|
|
||||||
/* Transition attributes */
|
/* Transition attributes */
|
||||||
// Todo
|
// Todo
|
||||||
}
|
}
|
||||||
@ -1507,8 +1486,9 @@ void hasp_process_obj_attribute(lv_obj_t* obj, const char* attr_p, const char* p
|
|||||||
: attr_out_int(obj, attr, lv_obj_get_hidden(obj));
|
: attr_out_int(obj, attr, lv_obj_get_hidden(obj));
|
||||||
break; // attribute_found
|
break; // attribute_found
|
||||||
|
|
||||||
case ATTR_TEXT:
|
|
||||||
case ATTR_TXT: // TODO: remove
|
case ATTR_TXT: // TODO: remove
|
||||||
|
LOG_WARNING(TAG_HASP, F("txt property is obsolete, use text instead"));
|
||||||
|
case ATTR_TEXT:
|
||||||
hasp_process_obj_attribute_txt(obj, attr, payload, update);
|
hasp_process_obj_attribute_txt(obj, attr, payload, update);
|
||||||
break; // attribute_found
|
break; // attribute_found
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user