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

fix issue with optionaldata awaited when none in the telegram #5

Merged
merged 2 commits into from
Mar 31, 2017

Conversation

codlab
Copy link
Contributor

@codlab codlab commented Mar 30, 2017

This PR fixes the machine state improper state when an EnOcean packet is received with header.optionalLength = 0

in this case, fillOptionalData was called and pushed the byte into its array. This byte was actually the final data+optional data crc. Hence, "locking" the data into awaiting the crc. It would then require to receive a frame from an EnOcean compatible device to "flush" (and lose) the buffer.

The proposed PR fixes it by branching into the correct step when dealing with optional data

This PR fixes the machine state improper state when an EnOcean packet is received with header.optionalLength = 0

in this case, fillOptionalData was called and pushed the byte into its array. This byte was actually the final data+optional data crc. Hence, "locking" the data into awaiting the crc. It would then require to receive a frame from an EnOcean compatible device to "flush" (and lose) the buffer.

The proposed PR fixes it by branching into the correct step when dealing with optional data
Fixes: RafaelKa#5
@RafaelKa
Copy link
Owner

@codlab Thanks for your PR, I changed it a little bit, please do not be angry about that.

@RafaelKa RafaelKa merged commit 2d69520 into RafaelKa:master Mar 31, 2017
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants