From 4e54f8137dd7cc512376e6ad035804dbcca14713 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Rebelo?= Date: Fri, 5 Jan 2024 21:29:12 +0000 Subject: [PATCH] Xiaomi: Improve walking v2 parsing --- .../xiaomi/activity/impl/WorkoutSummaryParser.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) 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 78dcc22fc..9618a0745 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 @@ -275,14 +275,24 @@ public class WorkoutSummaryParser extends XiaomiActivityParser implements Activi builder.addUnknown(20); builder.addFloat("recoveryValue", "?"); builder.addUnknown(9); - builder.addByte("recoveryTime", "seconds"); + builder.addByte("recoveryTime", "hours"); builder.addUnknown(2); builder.addInt("hrZoneExtreme", "seconds"); builder.addInt("hrZoneAnaerobic", "seconds"); builder.addInt("hrZoneAerobic", "seconds"); builder.addInt("hrZoneFatBurn", "seconds"); builder.addInt("hrZoneWarmUp", "seconds"); - builder.addInt("configured_time_goal", "seconds"); + builder.addInt("configuredTimeGoal", "seconds"); + builder.addShort("configuredCaloriesGoal", "calories_unit"); + builder.addInt("configuredDistanceGoal", "meters"); + builder.addUnknown(11); + builder.addShort("trainingLoad", ""); + builder.addUnknown(24); + builder.addByte("averageHR2", "bpm"); + builder.addByte("maxHR2", "bpm"); + builder.addByte("minHR2", "bpm"); + builder.addUnknown(2); + builder.addByte("averageCadence", "spm"); return builder.build(); }