mirror of
https://github.com/esphome/esphome.git
synced 2025-10-25 05:03:52 +01:00
Migrate from hexencode() to format_hex_pretty() in Kuntze component (#11372)
This commit is contained in:
committed by
GitHub
parent
70cb1793f3
commit
1a2057df30
@@ -14,7 +14,7 @@ void Kuntze::on_modbus_data(const std::vector<uint8_t> &data) {
|
||||
auto get_16bit = [&](int i) -> uint16_t { return (uint16_t(data[i * 2]) << 8) | uint16_t(data[i * 2 + 1]); };
|
||||
|
||||
this->waiting_ = false;
|
||||
ESP_LOGV(TAG, "Data: %s", hexencode(data).c_str());
|
||||
ESP_LOGV(TAG, "Data: %s", format_hex_pretty(data).c_str());
|
||||
|
||||
float value = (float) get_16bit(0);
|
||||
for (int i = 0; i < data[3]; i++)
|
||||
|
||||
Reference in New Issue
Block a user