Skip to content

Commit

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

if(command & 0x800000) // 1
switch (((command >> 28) & 0xF) & 0x1)
{
data.type = COMMAND_TYPE_SELECT_EEPROM_PAGE;
// data.address = (command & 0xF); // page todo
data.serial_number = command & 0xFFFFF;
case 1:
data.type = COMMAND_TYPE_SELECT_EEPROM_PAGE;

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

data.serial_number = command & 0xFFFFF;
break;
}
break;
}
Expand Down

0 comments on commit ddd21e6

Please sign in to comment.