Merge branch 'error_logstr' into integration

This commit is contained in:
J. Nick Koston
2025-11-24 12:17:05 -06:00
2 changed files with 8 additions and 1 deletions

View File

@@ -333,6 +333,12 @@ void Component::status_set_warning(const LogString *message) {
ESP_LOGW(TAG, "%s set Warning flag: %s", LOG_STR_ARG(this->get_component_log_str()),
message ? LOG_STR_ARG(message) : LOG_STR_LITERAL("unspecified"));
}
void Component::status_set_error() {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
this->status_set_error(nullptr);
#pragma GCC diagnostic pop
}
void Component::status_set_error(const char *message) {
if ((this->component_state_ & STATUS_LED_ERROR) != 0)
return;

View File

@@ -227,9 +227,10 @@ class Component {
void status_set_warning(const char *message = nullptr);
void status_set_warning(const LogString *message);
void status_set_error(); // Set error flag without message
// Remove before 2026.6.0
ESPDEPRECATED("Use status_set_error(LOG_STR(message)) instead. Will stop working in 2026.6.0", "2025.12.0")
void status_set_error(const char *message = nullptr);
void status_set_error(const char *message);
void status_set_error(const LogString *message);
void status_clear_warning();