You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue takes place in the process() function of the Encoder class.
If a byte is begun with a stuffed bit, bitPosition is not incremented. This leads to the next byte being loaded before the current byte has been transmitted.
In other words, if bytePosition % 8 == 0 and a bit-stuff occurs, currentByte will be overwritten on the next iteration since the algorithm thinks the byte has finished.
A simple solution would be to introduce a flag that when raised prevents entry into the if(bitPosition == 0) block. It is lowered on each loop before currentBit is set, and raised when a bit-stuff occurs.
The text was updated successfully, but these errors were encountered:
This issue takes place in the process() function of the Encoder class.
If a byte is begun with a stuffed bit, bitPosition is not incremented. This leads to the next byte being loaded before the current byte has been transmitted.
In other words, if bytePosition % 8 == 0 and a bit-stuff occurs, currentByte will be overwritten on the next iteration since the algorithm thinks the byte has finished.
A simple solution would be to introduce a flag that when raised prevents entry into the if(bitPosition == 0) block. It is lowered on each loop before currentBit is set, and raised when a bit-stuff occurs.
The text was updated successfully, but these errors were encountered: