mirror of
https://github.com/esphome/esphome.git
synced 2026-09-11 15:27:33 +00:00
[modbus_controller] Brace poll-refused log to fix -Wempty-body warning (#18724)
This commit is contained in:
@@ -218,8 +218,9 @@ void ModbusController::update() {
|
||||
for (auto &cmd : this->polling_command_items_) {
|
||||
ESP_LOGVV(TAG, "Updating range 0x%X", cmd.register_address());
|
||||
// A refusal is already logged by the hub; note the affected range for controller-level diagnostics.
|
||||
if (!cmd.send())
|
||||
if (!cmd.send()) {
|
||||
ESP_LOGD(TAG, "Poll refused by hub for range 0x%X", cmd.register_address());
|
||||
}
|
||||
}
|
||||
}
|
||||
this->update_counter_++;
|
||||
|
||||
Reference in New Issue
Block a user