From ba8f19060f98614e00e745a2ec0a592fb88ca806 Mon Sep 17 00:00:00 2001 From: Edward Firmo <94725493+edwardtfn@users.noreply.github.com> Date: Sat, 2 Aug 2025 23:40:01 +0200 Subject: [PATCH] Declare variable used in the loop --- components/tx_ultimate_easy/tx_ultimate_easy.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/tx_ultimate_easy/tx_ultimate_easy.cpp b/components/tx_ultimate_easy/tx_ultimate_easy.cpp index 1efc794..4162176 100644 --- a/components/tx_ultimate_easy/tx_ultimate_easy.cpp +++ b/components/tx_ultimate_easy/tx_ultimate_easy.cpp @@ -147,7 +147,7 @@ namespace esphome { case TOUCH_STATE_SWIPE_RIGHT: switch (uart_received_bytes[5]) { case 12: { - for (i = 10; i > 0; i--) { + for (uint8_t i = 10; i > 0; i--) { if (i > 8 ? uart_received_bytes[6] & (1 << (i - 9)) : uart_received_bytes[7] & (1 << (i - 1))) { @@ -157,7 +157,7 @@ namespace esphome { break; } case 13: { - for (i = 1; i <= 10; i++) { + for (uint8_t i = 1; i <= 10; i++) { if (i > 8 ? uart_received_bytes[6] & (1 << (i - 9)) : uart_received_bytes[7] & (1 << (i - 1))) {