Skip to content
Advertisement

Tag: data-conversion

how to convert raw data to int32 in javascript

I get this data = [0, 4, -109, -31] from modbus and I know this data = 300001 but I don’t know how to convert it properly to get to that 300001. I’ve tried lots of methods found online but I haven’t got it to work. Thank you for any help Edit: As I understand 0 needs to be shifted

Advertisement