espressif / esp-modbus

ESP-Modbus - the officially suppported library for Modbus protocol (serial RS485 + TCP over WiFi or Ethernet).
Apache License 2.0
110 stars 52 forks source link

fix: flush uart queue on parity and frame error (IDFGH-13881) #78

Open KoglerF opened 1 day ago

KoglerF commented 1 day ago

Description

In the current version (V1.0.16), UART parity and frame errors are ignored for the Modbus slave. This bugfix branch addresses the issue by flushing the UART queue when an error occurs.

Please consider merging this branch into the next release.

Related

The same issue has already been resolved for the Modbus master. For reference: https://github.com/espressif/esp-modbus/issues/20

Testing

The bugfix was tested by sending UART frames containing errors.

CLAassistant commented 1 day ago

CLA assistant check
All committers have signed the CLA.