This is an improvment of the bit_position computing. This now operate only
on full bytes to get the position.
Change-Id: Idb4993a3c9922d50d02379139e7cbbe5a2cb501b
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
*/
uint32_t converter_t::continental_bit_position_mess(unsigned int msg_length, unsigned int bit_position, unsigned int bit_size)
{
- return bit_position + (CHAR_BIT - bit_position % CHAR_BIT) - bit_size;
+ return bit_position + CHAR_BIT - 2 * (bit_position % CHAR_BIT) - bit_size;
}