diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/pebble/AppMessageHandlerMisfit.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/pebble/AppMessageHandlerMisfit.java index 1a835b04..c44070f3 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/pebble/AppMessageHandlerMisfit.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/pebble/AppMessageHandlerMisfit.java @@ -74,14 +74,13 @@ public class AppMessageHandlerMisfit extends AppMessageHandler { GBActivitySample[] activitySamples = new GBActivitySample[samples]; for (int i = 0; i < samples; i++) { short sample = buf.getShort(); - if ((sample & 0x0001) == 0 || (sample & 0xff00) == 0) { // 16-??? steps encoded in bits 1-7 + if ((sample & 0x0001) == 0) { // 16-??? steps encoded in bits 1-7 steps = (sample & 0x00fe); - } else if ((sample & 0x0001) == 0x0001) { // 0-14 steps encoded in bits 1-3, most of the time fc71 bits are set in that case + } else { // 0-14 steps encoded in bits 1-3, most of the time fc71 bits are set in that case // 0040 also set always? steps = (sample & 0x000e); - } else { - steps = 0; } + totalSteps += steps; LOG.info("got steps for sample " + i + " : " + steps + "(" + Integer.toHexString(sample & 0xffff) + ")"); byte activityKind = ActivityKind.TYPE_UNKNOWN;