From 7ba40df46eaead4d0a344745bcaeb4ddc9960922 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 7 Jun 2023 09:59:12 -0500 Subject: [PATCH] get rid of strings --- components/ratgdo/ratgdo.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/components/ratgdo/ratgdo.cpp b/components/ratgdo/ratgdo.cpp index 4cda504..26c9dbe 100644 --- a/components/ratgdo/ratgdo.cpp +++ b/components/ratgdo/ratgdo.cpp @@ -495,7 +495,7 @@ namespace ratgdo { { LightState val = static_cast(this->store_.lightState); ESP_LOGD(TAG, "Light state %s", light_state_to_string(val)); - for (auto *child : this->children_) { + for (auto* child : this->children_) { child->on_light_state(val); } } @@ -504,7 +504,7 @@ namespace ratgdo { { LockState val = static_cast(this->store_.lockState); ESP_LOGD(TAG, "Lock state %s", lock_state_to_string(val)); - for (auto *child : this->children_) { + for (auto* child : this->children_) { child->on_lock_state(val); } } @@ -513,20 +513,20 @@ namespace ratgdo { { MotionState val = static_cast(this->store_.motionState); ESP_LOGD(TAG, "Motion state %s", motion_state_to_string(val)); - for (auto *child : this->children_) { + for (auto* child : this->children_) { child->on_motion_state(val); } this->store_.motionState = MotionState::MOTION_STATE_CLEAR; // reset motion state - for (auto *child : this->children_) { + for (auto* child : this->children_) { child->on_motion_state(MotionState::MOTION_STATE_CLEAR); - } + } } void RATGDOComponent::sendObstructionStatus() { ObstructionState val = static_cast(this->store_.obstructionState); ESP_LOGD(TAG, "Obstruction state %s", obstruction_state_to_string(val)); - for (auto *child : this->children_) { + for (auto* child : this->children_) { child->on_obstruction_state(val); } this->status_obst_pin_->digital_write(this->store_.obstructionState == 0);