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