From 931821a5803546357c252ee93bc2d220e40bc2a1 Mon Sep 17 00:00:00 2001 From: Florian Date: Fri, 14 Feb 2025 09:16:32 +0100 Subject: [PATCH] Test --- components/tc_bus/tc_bus.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/components/tc_bus/tc_bus.cpp b/components/tc_bus/tc_bus.cpp index a2f8480b..8bc49abb 100644 --- a/components/tc_bus/tc_bus.cpp +++ b/components/tc_bus/tc_bus.cpp @@ -518,8 +518,22 @@ namespace esphome cmd_crc = pulse_type; command_ready = true; } + } else if (pulse_type == 2) { // Another START signal + // Only reset if we're not in the middle of a valid command + if (!command_ready) { + cmd_pos = 1; // Set to 1 since we're starting a new command + command = 0; + cmd_crc = 0; + cmd_cal_crc = 1; + is_long = false; + } } else { cmd_pos = 0; + command = 0; + cmd_crc = 0; + cmd_cal_crc = 1; + is_long = false; + ack_pos = 0; ack_command = 0; ack_crc = 0;