From 43829d8f62bba9595f1ba25d9f74fc7f984f1a5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 12 Dec 2024 16:16:46 +0200 Subject: [PATCH] Xiaomi: Add support for parsing jump roping summary v5 It contains an extra unknown byte between the heartrates and heartrate zone times. --- .../devices/xiaomi/activity/impl/WorkoutSummaryParser.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/xiaomi/activity/impl/WorkoutSummaryParser.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/xiaomi/activity/impl/WorkoutSummaryParser.java index 9b36ba10e..5e4c9399c 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/xiaomi/activity/impl/WorkoutSummaryParser.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/xiaomi/activity/impl/WorkoutSummaryParser.java @@ -810,6 +810,7 @@ public class WorkoutSummaryParser extends XiaomiActivityParser implements Activi final int headerSize; switch (version) { case 3: + case 5: headerSize = 5; break; default: @@ -827,6 +828,8 @@ public class WorkoutSummaryParser extends XiaomiActivityParser implements Activi builder.addByte(HR_MAX, UNIT_BPM); builder.addByte(HR_MIN, UNIT_BPM); builder.addUnknown(7); + if (version >= 5) + builder.addUnknown(1); builder.addInt(HR_ZONE_EXTREME, UNIT_SECONDS); builder.addInt(HR_ZONE_ANAEROBIC, UNIT_SECONDS); builder.addInt(HR_ZONE_AEROBIC, UNIT_SECONDS);