fix bug: represent cid as uint16_t
, not uint8_t
#414
Merged
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.
Fixes: #406
The problem description is in the referenced issue.
Diagnosis
The function
ReprogControlsV4::setControlReporting()
erroneously tookcid
asuint8_t
. Because of that, reports contained only lower byte of any cid, so any ReprogControls request for such cid resulted in error response. Lack of error response handling in this library led to timeout.E.g.:
We can see only lower byte (03) of
cid
present. Thus we get an error response (with feature idff
), but the logiops keeps waiting for response with feature id08
and hence eventually timeouts.Solution
ReprogControlsV4::setControlReporting()
was modified to takecid
asuint16_t
.