1

I'm getting a byte array like this one:

[60, 2, 0, 0, 0]

In the documentation there is written this:

uint16 -> heartBeatNum;
uint8 -> rawDataFilesNum;
uint8 -> alertNum
uint8 -> fallsNum

I will explain a little about the device so that you understand and then I ask my question.

The bluetooth device sends an object every minute that is called heartbeat. If this is the first time the object is to use the array looks like this:

After first minute: [1, 0, 0, 0, 0]

After two minute: [2, 0, 0, 0, 0]

After three minute: [3, 0, 0, 0, 0]

After for minute: [4, 0, 0, 0, 0] ...

Now there are more than 12 that have passed and the array is: [60, 2, 0, 0, 0]

So I try to understand from the documentation the heartbeat count is the first 16 bytes. I can not figure out how to collect the 60's and the 2's to have the exact heartbeat number.

How does this function?

According to my calculation if I do 60 * 12 = 720

So I should have about 700

Can someone enlighten me how to gather the 16 bytes in int?

Mickael Belhassen
  • 2,970
  • 1
  • 25
  • 46

0 Answers0