From 4d3f59302cda608e3475fe73c5f332ceceabaf79 Mon Sep 17 00:00:00 2001 From: kenji Date: Wed, 2 Jul 2025 18:19:14 -0400 Subject: [PATCH] fix power button check --- components/hauslane/hauslane.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/hauslane/hauslane.cpp b/components/hauslane/hauslane.cpp index 285203e..40a1e8e 100644 --- a/components/hauslane/hauslane.cpp +++ b/components/hauslane/hauslane.cpp @@ -102,7 +102,7 @@ void Hauslane::loop() { button_press(pin_power, true); } } else { - // target already met, so rest flag + // target already met, so reset flag this->meet_target=false; } } else if (this->speed==0 && !this->light_cur) { @@ -267,7 +267,7 @@ void Hauslane::button_press(GPIOPin *pin, bool val) { this->last_button=pin; } else { ESP_LOGD(TAG, "Release button: %d", pin); - if (this->last_button=this->pin_power) { + if (this->last_button==this->pin_power) { this->power= !this->power; } this->last_button=NULL;