Unpack float with endian
zavdimka opened this issue · 2 comments
zavdimka commented
I'm working with esp 32 and have task to unpack c structure on Android.
With python & struct it's very easy
struct.unpack("<cffhhhhfffccc", message)
But I have failed to make it with this library. To make it work with this lib I need to unpack to integer using "<int" and then use Float.intBitsToFloat to this value. It's not so comfortable and readable code when you have a lot of structure fields.
Could you add "<floatj" behaves same as in python struct packet, please?
Expected behavior
Byte array - 00 00 80 3f
parse with "<floatj" give 1.0
actual behavior
parse with "<floatj" give
raydac commented
what was the problem in the case?