From b7aac2bee34411c7ab627b31b35502a1db405047 Mon Sep 17 00:00:00 2001 From: Krzysztof Lewandowski Date: Tue, 21 May 2024 12:20:03 +0200 Subject: [PATCH] Facade Blinds: fix invalid tilt value after "missing configuration" state --- src/user/supla_esp_rs_fb.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/user/supla_esp_rs_fb.c b/src/user/supla_esp_rs_fb.c index 8c818e30..0ed0cc1e 100644 --- a/src/user/supla_esp_rs_fb.c +++ b/src/user/supla_esp_rs_fb.c @@ -345,6 +345,11 @@ void GPIO_ICACHE_FLASH supla_esp_gpio_rs_move_position( } int last_pos = *rs_cfg->position; + + if (supla_esp_gpio_rs_is_tilt_supported(rs_cfg) && + (*rs_cfg->tilt < 100 || *rs_cfg->tilt > 10100)) { + *rs_cfg->tilt = 100; + } int last_tilt = *rs_cfg->tilt; unsigned int full_time = full_time_ms * 1000;