Skip to content

Commit

Permalink
Fix Address
Browse files Browse the repository at this point in the history
  • Loading branch information
AzonInc committed Sep 23, 2024
1 parent eafcb7d commit b21d1b9
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions components/tc_bus/protocol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,14 +193,11 @@ namespace esphome
// 81 0 00000
// select eeprom page of serial number

switch ((command >> 28) & 0xF)
switch ((command >> 24) & 0xF)
{
case 1:
data.type = COMMAND_TYPE_SELECT_EEPROM_PAGE;

uint32_t thirdNibble = (command >> 24) & 0xF; // Nibble isolieren
data.address = static_cast<uint8_t>(thirdNibble);

data.address = (command >> 20) & 0xF;
data.serial_number = command & 0xFFFFF;
break;
}
Expand Down

0 comments on commit b21d1b9

Please sign in to comment.