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
The byte-order is interpreted wrong for big-endian int24 and uint24.
When reading the sequence "80 00 80" the correct interpretation is given for little endian (i.e. -8388480 for int24, 8388736 for uint24) but wrong numbers are given for big endian (-32768 for int24, 8421376 for uint24).
The interpretation mixes up the two last bytes. I.e 8421376 is "80 80 00" instead of the input "80 00 80".
The problem is line 144 to 148 of /media/data_inspector/byteData.ts
The text was updated successfully, but these errors were encountered:
Done. #331
I have no prior experience with vscode extensions nor the language used. So syntax is purely inferred from the other code.
A python equivalent would be:
def read24(b, little, signed):
y = b[2]<<16 | b[1]<<8 | b[0] if little else b[0]<<16 | b[1]<<8 | b[2]
if signed and y >= 1<<23: y -= 1<<24
return y
The byte-order is interpreted wrong for big-endian int24 and uint24.
When reading the sequence "80 00 80" the correct interpretation is given for little endian (i.e. -8388480 for int24, 8388736 for uint24) but wrong numbers are given for big endian (-32768 for int24, 8421376 for uint24).
The interpretation mixes up the two last bytes. I.e 8421376 is "80 80 00" instead of the input "80 00 80".
The problem is line 144 to 148 of /media/data_inspector/byteData.ts
The text was updated successfully, but these errors were encountered: