-
Notifications
You must be signed in to change notification settings - Fork 1k
2.5.0 #578
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
Merged
Merged
2.5.0 #578
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
The _strict argument should be defaulted to False since the inter_char_timeout feature is not working correctly. Changes in the past have tried to fix the issue but one way or another they do not seem to work consistently across all computers and systems. Therefore I think by default the _strict argument should be set to False unless specified to prevent the faulty behavior from producing false timeouts. There are two possible reasons why I think this feature may never work correclty: * One the OS handling the timeout incorrectly if more than one character arrives at the same time if it is busy doing something else. * Another one as described here https://stackoverflow.com/a/37053542/1813498 is the fact that the timeout value must be a multiple of 0.1. At 9600 the inter char value is calculated to be 0.00171875 and then rounded to 0 so therefore it will not work correctly. The conclusion from my side is that it is not possible to accurately measure this timeout and should perhaps be removed. At least it should be by default disabled. This small patch aims to do the later.
Wrongly attempted to treat the object as a dict, needs to check if the property is there at all. Fixes: 042458b: other: reportSlaveId: allow slaves to provide custom responses Signed-off-by: Karl Palsson <karlp@tweak.net.au>
Currently, to create a sparse data store, you are required to provide an
initial list/dict. The first entry is then used as a "default" for the
reset() call, which seems rather at odds with the "sparse" nature.
Instead, use a supplied intial value if provided, and use that to
properly reset the store to _that_ value. Similarly don't require an
initial list at all, allowing addresses/registers to be filled in via
follow up calls to .setValues()
Example old code: (We want to register 20 addresses at 0x2000}
# must provide at least one initial value!
hr = ModbusSparseDataBlock({0x2000: 0x55aa})
# actually register what we want using flexible lists.
hr.setValues(0x2000, [0]*20)
Example new code:
hr = ModbusSparseDataBlock()
hr.setValues(0x2000, [0]*20)
Example old code using reset:
hr = ModbusSparseDataBlock({
0x2000: 0x55,
0x3000: 0x66
})
hr.reset()
At this point, the store contained two registers, 0x2000 and 0x2001,
both containing the value 0x55. This hardly seems to have been the
intention of .reset() on a Sparse store, but is obvious for the
sequential store.
Fixes: #566
Signed-off-by: Karl Palsson <karlp@etactica.com>
This was
linked to
issues
Dec 30, 2020
Closed
Instead of the other way around, warning when not using them.
Perhaps this will help with attrs etc versions
This was referenced Jan 16, 2021
Closed
Closed
|
SonarCloud Quality Gate failed.
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
version 2.5.0rc3
version 2.5.0rc2
strictmode by default.ReportSlaveIdRequestrequestversion 2.5.0rc1
RETRYING