mirror of
https://github.com/esphome/esphome.git
synced 2025-10-28 05:33:53 +00:00
Introduce hex parsing & formatting helper functions (#2882)
This commit is contained in:
@@ -61,7 +61,7 @@ void ModbusSwitch::write_state(bool state) {
|
||||
}
|
||||
}
|
||||
if (!data.empty()) {
|
||||
ESP_LOGV(TAG, "Modbus Switch write raw: %s", hexencode(data).c_str());
|
||||
ESP_LOGV(TAG, "Modbus Switch write raw: %s", format_hex_pretty(data).c_str());
|
||||
cmd = ModbusCommandItem::create_custom_command(
|
||||
this->parent_, data,
|
||||
[this, cmd](ModbusRegisterType register_type, uint16_t start_address, const std::vector<uint8_t> &data) {
|
||||
|
||||
Reference in New Issue
Block a user