1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-28 12:56:49 +01:00

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

View File

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