Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
AzonInc committed Sep 22, 2024
1 parent 9a22b9b commit 49fb0da
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions components/tc_bus/tc_bus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -325,19 +325,15 @@ namespace esphome
// Turn off
reading_eeprom_ = false;



const char* hexChars = "0123456789abcdef";
std::string hexString(eeprom_buffer_.size() * 2, ' '); // Reserviere den String mit fester Größe

for (std::size_t i = 0; i < eeprom_buffer_.size(); ++i)
{
uint8_t byte = eeprom_buffer_[i];
hexString[2 * i] = hexChars[(byte >> 4) & 0xF];
hexString[2 * i + 1] = hexChars[byte & 0xF];
hexString += format_hex(byte);
}

ESP_LOGD(TAG, "Reading EEPROM: Result: %s", hexString);
ESP_LOGD(TAG, "Reading EEPROM: Count: %i, Result: %s", eeprom_buffer_.size(), hexString);
}
else
{
Expand Down

0 comments on commit 49fb0da

Please sign in to comment.