Remove obsolete commands and txt property

This commit is contained in:
fvanroie 2023-04-12 23:31:30 +02:00
parent 34149b875a
commit bba7eddd2b
3 changed files with 14 additions and 14 deletions

View File

@ -2644,8 +2644,8 @@ void hasp_process_obj_attribute(lv_obj_t* obj, const char* attribute, const char
ret = attribute_common_val(obj, val, update); ret = attribute_common_val(obj, val, update);
break; break;
case ATTR_TXT: // TODO: remove // case ATTR_TXT: // TODO: remove
LOG_WARNING(TAG_HASP, F(D_ATTRIBUTE_OBSOLETE D_ATTRIBUTE_INSTEAD), attribute, "text"); // LOG_WARNING(TAG_HASP, F(D_ATTRIBUTE_OBSOLETE D_ATTRIBUTE_INSTEAD), attribute, "text");
case ATTR_TEXT: case ATTR_TEXT:
case ATTR_TEMPLATE: case ATTR_TEMPLATE:
ret = attribute_common_text(obj, attr_hash, payload, &text, update); ret = attribute_common_text(obj, attr_hash, payload, &text, update);

View File

@ -973,12 +973,12 @@ void dispatch_moodlight(const char* topic, const char* payload, uint8_t source)
dispatch_state_subtopic(out_topic, buffer); dispatch_state_subtopic(out_topic, buffer);
} }
void dispatch_backlight_obsolete(const char* topic, const char* payload, uint8_t source) // void dispatch_backlight_obsolete(const char* topic, const char* payload, uint8_t source)
{ // {
LOG_WARNING(TAG_MSGR, F(D_ATTRIBUTE_OBSOLETE D_ATTRIBUTE_INSTEAD), topic, // LOG_WARNING(TAG_MSGR, F(D_ATTRIBUTE_OBSOLETE D_ATTRIBUTE_INSTEAD), topic,
"backlight"); // TODO: obsolete dim, light and brightness // "backlight"); // TODO: obsolete dim, light and brightness
dispatch_backlight(topic, payload, source); // dispatch_backlight(topic, payload, source);
} // }
void dispatch_backlight(const char*, const char* payload, uint8_t source) void dispatch_backlight(const char*, const char* payload, uint8_t source)
{ {
@ -1347,7 +1347,7 @@ void dispatch_wakeup()
void dispatch_wakeup_obsolete(const char* topic, const char*, uint8_t source) void dispatch_wakeup_obsolete(const char* topic, const char*, uint8_t source)
{ {
LOG_WARNING(TAG_MSGR, F(D_ATTRIBUTE_OBSOLETE D_ATTRIBUTE_INSTEAD), topic, LOG_WARNING(TAG_MSGR, F(D_ATTRIBUTE_OBSOLETE D_ATTRIBUTE_INSTEAD), topic,
"idle=off"); // TODO: obsolete dim, light and brightness "idle=off"); // TODO: obsolete wakeup
dispatch_wakeup(); dispatch_wakeup();
hasp_set_wakeup_touch(false); hasp_set_wakeup_touch(false);
} }
@ -1490,10 +1490,10 @@ void dispatchSetup()
dispatch_add_command(PSTR("factoryreset"), dispatch_factory_reset); dispatch_add_command(PSTR("factoryreset"), dispatch_factory_reset);
/* obsolete commands */ /* obsolete commands */
dispatch_add_command(PSTR("dim"), dispatch_backlight_obsolete); // dispatch_add_command(PSTR("dim"), dispatch_backlight_obsolete);
dispatch_add_command(PSTR("brightness"), dispatch_backlight_obsolete); // dispatch_add_command(PSTR("brightness"), dispatch_backlight_obsolete);
dispatch_add_command(PSTR("wakeup"), dispatch_wakeup_obsolete); // dispatch_add_command(PSTR("light"), dispatch_backlight_obsolete);
dispatch_add_command(PSTR("light"), dispatch_backlight_obsolete); dispatch_add_command(PSTR("wakeup"), dispatch_wakeup_obsolete); // used in CC
#if HASP_USE_SPIFFS > 0 || HASP_USE_LITTLEFS > 0 #if HASP_USE_SPIFFS > 0 || HASP_USE_LITTLEFS > 0
#if defined(ARDUINO_ARCH_ESP32) #if defined(ARDUINO_ARCH_ESP32)

View File

@ -10,7 +10,7 @@ const char FP_SKIP[] PROGMEM = "skip";
const char FP_PAGE[] PROGMEM = "page"; const char FP_PAGE[] PROGMEM = "page";
const char FP_ID[] PROGMEM = "id"; const char FP_ID[] PROGMEM = "id";
const char FP_OBJ[] PROGMEM = "obj"; const char FP_OBJ[] PROGMEM = "obj";
const char FP_OBJID[] PROGMEM = "objid"; // const char FP_OBJID[] PROGMEM = "objid"; // obsolete
const char FP_PARENTID[] PROGMEM = "parentid"; const char FP_PARENTID[] PROGMEM = "parentid";
const char FP_GROUPID[] PROGMEM = "groupid"; const char FP_GROUPID[] PROGMEM = "groupid";