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 5539261 commit 04ed8ca
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions components/tc_bus/tc_bus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -633,23 +633,23 @@ namespace esphome
bool is_long = (command > 0xFFFF);

CommandData cmd_data = parseCommand(command, is_long);
enqueue_command(cmd_data, wait_duration);
send_command(cmd_data, wait_duration);
}

void TCBusComponent::send_command(uint32_t command, bool is_long, uint32_t wait_duration)
{
CommandData cmd_data = parseCommand(command, is_long);
enqueue_command(cmd_data, wait_duration);
send_command(cmd_data, wait_duration);
}

void TCBusComponent::send_command(CommandType type, uint8_t address, uint32_t payload, uint32_t serial_number, uint32_t wait_duration)
{
CommandData cmd_data{};
cmd_data.type = type;
cmd_data.address = address;
cmd_data.payload = payload;
cmd_data.serial_number = serial_number;
CommandData cmd_data = buildCommand(type, address, payload, serial_number);
send_command(cmd_data, wait_duration);
}

void TCBusComponent::send_command(CommandData cmd_data, uint32_t wait_duration)
{
enqueue_command(cmd_data, wait_duration);
}

Expand Down
2 changes: 1 addition & 1 deletion components/tc_bus/tc_bus.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ namespace esphome
void send_command(uint32_t command, uint32_t wait_duration = 200);
void send_command(uint32_t command, bool is_long, uint32_t wait_duration = 200);
void send_command(CommandType type, uint8_t address = 0, uint32_t payload = 0, uint32_t serial_number = 0, uint32_t wait_duration = 200);

void send_command(CommandData cmd_data, uint32_t wait_duration = 200)
void process_command_queue();
void enqueue_command(CommandData cmd_data, uint32_t wait_duration = 200);
void transmit_command(CommandData cmd_data);
Expand Down

0 comments on commit 04ed8ca

Please sign in to comment.