From b2e4aaea2395044b6234cb32a22e60e5756bda32 Mon Sep 17 00:00:00 2001 From: anor Date: Tue, 28 Apr 2026 17:28:05 +1000 Subject: [PATCH] =?UTF-8?q?feat:=20=D1=8D=D0=BD=D0=BA=D0=BE=D0=B4=D0=B5?= =?UTF-8?q?=D1=80=20=D0=B2=D0=BB=D0=B5=D0=B2=D0=BE=20=D0=BE=D1=82=200-?= =?UTF-8?q?=D0=B9=20=D1=81=D1=82=D1=83=D0=BF=D0=B5=D0=BD=D0=B8=20=E2=86=92?= =?UTF-8?q?=20=D0=A1=D0=A2=D0=9E=D0=9F,=20=D0=B2=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=BE=20=D0=B2=20=D1=81=D1=82=D0=BE=D0=BF=D0=B5=20=E2=86=92=20?= =?UTF-8?q?=D0=B7=D0=B0=D0=BF=D1=83=D1=81=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vertushka_esp32s3/vertushka_esp32s3.ino | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/vertushka_esp32s3/vertushka_esp32s3.ino b/vertushka_esp32s3/vertushka_esp32s3.ino index 0438433..b6a45de 100644 --- a/vertushka_esp32s3/vertushka_esp32s3.ino +++ b/vertushka_esp32s3/vertushka_esp32s3.ino @@ -1017,7 +1017,11 @@ static void tzApply(int delta) { static void onKnobLeft(int count, void *user) { if (onMainScreen()) { - if (step_idx > 0) { step_idx--; applyState(); ui_dirty = true; } + // Влево: понижаем ступень. На ступени 0 в работе — переходим в СТОП. + if (motor_run) { + if (step_idx > 0) { step_idx--; applyState(); ui_dirty = true; } + else { motor_run = false; applyState(); ui_dirty = true; } + } } else if (onScheduleScreen()) { schAdjustField(-1); } else if (onWifiScreen()) { @@ -1041,7 +1045,14 @@ static void onKnobLeft(int count, void *user) { } static void onKnobRight(int count, void *user) { if (onMainScreen()) { - if (step_idx < calib_count - 1) { step_idx++; applyState(); ui_dirty = true; } + // Вправо: если СТОП — запускаем мотор на текущей ступени; иначе повышаем. + if (!motor_run) { + motor_run = true; + applyState(); + ui_dirty = true; + } else if (step_idx < calib_count - 1) { + step_idx++; applyState(); ui_dirty = true; + } } else if (onScheduleScreen()) { schAdjustField(+1); } else if (onWifiScreen()) {