rename, cleanup

This commit is contained in:
J. Nick Koston
2025-06-15 01:26:25 -05:00
parent 8fb3856665
commit 1d52fceafa
19 changed files with 70 additions and 25 deletions
+9 -2
View File
@@ -137,11 +137,18 @@ void Component::mark_failed() {
this->component_state_ |= COMPONENT_STATE_FAILED;
this->status_set_error();
}
void Component::mark_loop_done() {
ESP_LOGD(TAG, "Component %s loop marked as done.", this->get_component_source());
void Component::disable_loop() {
ESP_LOGD(TAG, "Component %s loop disabled.", this->get_component_source());
this->component_state_ &= ~COMPONENT_STATE_MASK;
this->component_state_ |= COMPONENT_STATE_LOOP_DONE;
}
void Component::enable_loop() {
if ((this->component_state_ & COMPONENT_STATE_MASK) == COMPONENT_STATE_LOOP_DONE) {
ESP_LOGD(TAG, "Component %s loop enabled.", this->get_component_source());
this->component_state_ &= ~COMPONENT_STATE_MASK;
this->component_state_ |= COMPONENT_STATE_LOOP;
}
}
void Component::reset_to_construction_state() {
if ((this->component_state_ & COMPONENT_STATE_MASK) == COMPONENT_STATE_FAILED) {
ESP_LOGI(TAG, "Component %s is being reset to construction state.", this->get_component_source());