Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
AzonInc committed Feb 14, 2025
1 parent 89dfc1f commit 931821a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions components/tc_bus/tc_bus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 931821a

Please sign in to comment.