Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modbus server #1

Closed
wants to merge 8 commits into from
Closed

Conversation

FloMeyer
Copy link

What does this implement/fix?

Types of changes

  • [ x] Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Other

Related issue or feature (if applicable): fixes

Pull request in esphome-docs with documentation (if applicable): esphome/esphome-docs#

Test Environment

  • [ x] ESP32
  • ESP32 IDF
  • ESP8266
  • RP2040

Example entry for config.yaml:

# Example config.yaml

Checklist:

  • The code change is tested and works locally.
  • Tests have been added to verify that the new code works (under tests/ folder).

If user exposed functionality or configuration variables are added/changed:

@JeroenVanOort
Copy link
Owner

Thank you very much for spotting this! It took me a while to get my head around, but I now understand what happens: after a match is found, the code keeps matching consecutive registers without checking if the requested number of registers has already been met. The simpler solution seems to break after a match. I will update my PR with this and test it on my local device.

@JeroenVanOort
Copy link
Owner

Thanks again for spotting this problem. I have fixed it in my PR, but using a simpler approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants