Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AzonInc committed Sep 23, 2024
1 parent 17d398c commit 5aeb043
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions components/tc_bus/tc_bus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -695,10 +695,21 @@ namespace esphome
memory_buffer_[index] = (cell1 << 4) | (new_value & 0xF);
settings_.handset_volume = new_value;
break;

default:
ESP_LOGW(TAG, "Unknown Setting!");
break;
}

uint16_t new_values = (memory_buffer_[index] << 8) | memory_buffer_[index + 1];
send_command(COMMAND_TYPE_WRITE_MEMORY, index, new_values, serial_number);
if(index == 0)
{
return;
}
else
{
uint16_t new_values = (memory_buffer_[index] << 8) | memory_buffer_[index + 1];
send_command(COMMAND_TYPE_WRITE_MEMORY, index, new_values, serial_number);
}
}

void TCBusComponent::write_memory(uint32_t serial_number)
Expand Down

0 comments on commit 5aeb043

Please sign in to comment.