I am currently getting four bytes that contains (from Arduino code):
In Arduino code I can get the reconstructed number by:
How do I get the reconstructedValue using B4J?
B4X:
int32_t LatGPS = 395192359;
byte bufflen = 4;
byte XBUFFER[bufflen]="";
XBUFFER[0] = LatGPS & 0xFF;
XBUFFER[1] = (LatGPS >> 8) & 0xFF;
XBUFFER[2] = (LatGPS >> 16) & 0xFF;
XBUFFER[3] = (LatGPS >> 24) & 0xFF;
In Arduino code I can get the reconstructed number by:
B4X:
int32_t reconstructedValue;
reconstructedValue = ((int32_t)XBUFFER[3] << 24) | ((int32_t)XBUFFER[2] << 16) | ((int32_t)XBUFFER[1] << 8) | (int32_t)XBUFFER[0];
How do I get the reconstructedValue using B4J?