Add text attribute, obsolete txt

This commit is contained in:
fvanroie 2021-02-09 22:22:44 +01:00
parent 9ef3adedf2
commit ed33bf5f5f
3 changed files with 4 additions and 2 deletions

View File

@ -1475,7 +1475,8 @@ void hasp_process_obj_attribute(lv_obj_t * obj, const char * attr_p, const char
: hasp_out_int(obj, attr, lv_obj_get_hidden(obj));
break; // attribute_found
case ATTR_TXT:
case ATTR_TEXT:
case ATTR_TXT: // TODO: remove
hasp_process_obj_attribute_txt(obj, attr, payload, update);
break; // attribute_found

View File

@ -275,6 +275,7 @@ _HASP_ATTRIBUTE(SCALE_END_LINE_WIDTH, scale_end_line_width, lv_style_int_t)
#define ATTR_VAL 15809
#define ATTR_COLOR 58979
#define ATTR_TXT 9328
#define ATTR_TEXT 53869
#define ATTR_SRC 4964
#define ATTR_ID 6715

View File

@ -445,7 +445,7 @@ static void selector_event_handler(lv_obj_t * obj, lv_event_t event)
}
// set the property
snprintf_P(property, sizeof(property), PSTR("val\":%d,\"txt"), val);
snprintf_P(property, sizeof(property), PSTR("val\":%d,\"text"), val);
hasp_send_obj_attribute_str(obj, property, buffer);
if(max > 0) dispatch_normalized_group_value(obj->user_data.groupid, NORMALIZE(val, 0, max), obj);