Extra byte indeed appears to be heartrate value #205

This commit is contained in:
cpfeiffer 2016-02-26 00:04:33 +01:00
parent 095ef56c14
commit 0b568df8de
1 changed files with 4 additions and 2 deletions

View File

@ -305,7 +305,7 @@ public class FetchActivityOperation extends AbstractMiBandOperation {
}
int bpm = getBytesPerMinuteOfActivityData();
LOG.debug("flushing activity data samples: " + activityStruct.activityDataHolderProgress / bpm);
byte category, intensity, steps;
byte category, intensity, steps, heartrate;
DBHandler dbHandler = null;
try {
@ -325,7 +325,9 @@ public class FetchActivityOperation extends AbstractMiBandOperation {
category = activityStruct.activityDataHolder[i];
intensity = activityStruct.activityDataHolder[i + 1];
steps = activityStruct.activityDataHolder[i + 2];
byte unknown = activityStruct.activityDataHolder[i + 3];
if (hasExtendedActivityData) {
heartrate = activityStruct.activityDataHolder[i + 3];
}
samples[minutes] = new GBActivitySample(
sampleProvider,