forked from pelud/modbus-potato
-
Notifications
You must be signed in to change notification settings - Fork 1
Added Platformio library.json and one typo #2
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
Open
EugenWiens
wants to merge
18
commits into
lorcap:master
Choose a base branch
from
EugenWiens:platformio_and_some_fixes
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Internal CRC function consists of pure math formulas: it is compact but slow. The user is allowed to provide a custom function which may use a lookup table for computation speed-up.
Data are thus transparently transformed as it already happens for ModbusSlave.
Quantity of register upper limit depends on the function being used.
A wrong number of bytes was transmitted.
When writing 1 register with function Write Multiple Registers, function code was correctly set to 0x10, but number-of-registers fields were missing because overwritten by CRC.
Modbus specifications detects a complete frame when there's no byte reception for at least 3.5-byte time. If bytes are received via interrupt and loop() is not part of it, delayed loop() calls causes lagging responses. Now, a new frame is detected also when enough bytes (according to function type) have been received.
It doesn't make sense to wait for long time when transmitting.
Why wait? The 3.5 pause is meant for detecting an end-of-frame.
In case master doesn't succeed in parsing the received frame, method processing_error() is called. If it returns true (new default behavior), the FSM goes to 'idle' instead of being trapped into 'processing_error' state (old behavior).
Owner
|
I'm going to push two more changes. Then I'll cherrypick your commits. Thanks for contributing. |
Author
|
Very cool. Maybe you will like think about to move the LICENSE file to the root of the project, then GitHub detect the License automatically. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
I added the library.json file. With this file platformio is able to control this library better during the build. Sorry for the MR based on
masterbranch but I can't create MR based on a TAG.This MR is based on the TAG 1.4.1
BR
Eugen