mirror of
https://github.com/esphome/esphome.git
synced 2024-12-25 23:14:54 +01:00
[Modbus_controller] Fix duplicate cmd check (#3031)
This commit is contained in:
parent
5026bc7a78
commit
56547b3d50
1 changed files with 1 additions and 1 deletions
|
@ -109,7 +109,7 @@ void ModbusController::queue_command(const ModbusCommandItem &command) {
|
|||
// not very effective but the queue is never really large
|
||||
for (auto &item : command_queue_) {
|
||||
if (item->register_address == command.register_address && item->register_count == command.register_count &&
|
||||
item->register_type == command.register_type) {
|
||||
item->register_type == command.register_type && item->function_code == command.function_code) {
|
||||
ESP_LOGW(TAG, "Duplicate modbus command found");
|
||||
// update the payload of the queued command
|
||||
// replaces a previous command
|
||||
|
|
Loading…
Reference in a new issue