fix power button check
This commit is contained in:
@@ -102,7 +102,7 @@ void Hauslane::loop() {
|
|||||||
button_press(pin_power, true);
|
button_press(pin_power, true);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// target already met, so rest flag
|
// target already met, so reset flag
|
||||||
this->meet_target=false;
|
this->meet_target=false;
|
||||||
}
|
}
|
||||||
} else if (this->speed==0 && !this->light_cur) {
|
} else if (this->speed==0 && !this->light_cur) {
|
||||||
@@ -267,7 +267,7 @@ void Hauslane::button_press(GPIOPin *pin, bool val) {
|
|||||||
this->last_button=pin;
|
this->last_button=pin;
|
||||||
} else {
|
} else {
|
||||||
ESP_LOGD(TAG, "Release button: %d", pin);
|
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->power= !this->power;
|
||||||
}
|
}
|
||||||
this->last_button=NULL;
|
this->last_button=NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user