Merge remote-tracking branch 'origin/inline-set-component-state' into integration

This commit is contained in:
J. Nick Koston
2026-02-27 17:48:00 -10:00
3 changed files with 5 additions and 7 deletions
+1 -2
View File
@@ -542,8 +542,7 @@ void Application::enable_pending_loops_() {
// Clear the pending flag and enable the loop
component->pending_enable_loop_ = false;
ESP_LOGVV(TAG, "%s loop enabled from ISR", LOG_STR_ARG(component->get_component_log_str()));
component->component_state_ &= ~COMPONENT_STATE_MASK;
component->component_state_ |= COMPONENT_STATE_LOOP;
component->set_component_state_(COMPONENT_STATE_LOOP);
// Move to active section
this->activate_looping_component_(i);
-4
View File
@@ -310,10 +310,6 @@ void Component::mark_failed() {
// Also remove from loop since failed components shouldn't loop
App.disable_component_loop_(this);
}
void Component::set_component_state_(uint8_t state) {
this->component_state_ &= ~COMPONENT_STATE_MASK;
this->component_state_ |= state;
}
void Component::disable_loop() {
if ((this->component_state_ & COMPONENT_STATE_MASK) != COMPONENT_STATE_LOOP_DONE) {
ESP_LOGVV(TAG, "%s loop disabled", LOG_STR_ARG(this->get_component_log_str()));
+4 -1
View File
@@ -294,7 +294,10 @@ class Component {
void call_dump_config_();
/// Helper to set component state (clears state bits and sets new state)
void set_component_state_(uint8_t state);
inline void set_component_state_(uint8_t state) {
this->component_state_ &= ~COMPONENT_STATE_MASK;
this->component_state_ |= state;
}
/** Set an interval function with a unique name. Empty name means no cancelling possible.
*