renamed 'raise' to 'step_up' and 'lower' to 'step_down'

This commit is contained in:
Rocka84
2024-06-06 00:25:03 +02:00
parent 7bed131dd9
commit 6474be98bf
6 changed files with 45 additions and 35 deletions

View File

@@ -145,11 +145,11 @@ namespace esphome {
btn->add_on_press_callback([this, action]() { this->button_press_action(action); });
}
void JiecangDeskController::raise() {
void JiecangDeskController::step_up() {
send_simple_command(0x01);
}
void JiecangDeskController::lower() {
void JiecangDeskController::step_down() {
send_simple_command(0x02);
}
@@ -224,11 +224,11 @@ namespace esphome {
void JiecangDeskController::button_press_action(int action) {
ESP_LOGV("JiecangDeskController", "button_press_action %i", action);
switch (action) {
case BUTTON_RAISE:
raise();
case BUTTON_STEP_UP:
step_up();
break;
case BUTTON_LOWER:
lower();
case BUTTON_STEP_DOWN:
step_down();
break;
case BUTTON_STOP:
stop();