1

Fix syntax errors

This commit is contained in:
2025-07-02 17:28:15 -04:00
parent 9a978cd646
commit 162e18f293
+4 -4
View File
@@ -88,15 +88,15 @@ void Hauslane::loop() {
} }
} else if (this->speed < this->speed_target) { } else if (this->speed < this->speed_target) {
// increase speed // increase speed
button_press(pin_up, true) button_press(pin_up, true);
} else if (this->speed > this->speed_target) { } else if (this->speed > this->speed_target) {
// decrease speed // decrease speed
button_press(pin_down, true) button_press(pin_down, true);
} }
} else if (this->light_cur != this->light_target) { } else if (this->light_cur != this->light_target) {
if (this->power) { if (this->power) {
// press light button // press light button
button_press(pin_light, true) button_press(pin_light, true);
} else { } else {
// power on hood first // power on hood first
button_press(pin_power, true); button_press(pin_power, true);
@@ -258,7 +258,7 @@ void Hauslane::command(std::string command) {
} }
// simulate a button press by activating the GPIO then releasing // simulate a button press by activating the GPIO then releasing
void Hauslane::button_press(GPIOPin *pin, val) { void Hauslane::button_press(GPIOPin *pin, bool val) {
if (val) { if (val) {
ESP_LOGD(TAG, "Press button: %d", pin); ESP_LOGD(TAG, "Press button: %d", pin);
this->last_button=pin; this->last_button=pin;