diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/Huami2021ActivityDetailsParser.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/Huami2021ActivityDetailsParser.java index e899fbd17..384408d8b 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/Huami2021ActivityDetailsParser.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/Huami2021ActivityDetailsParser.java @@ -123,6 +123,8 @@ public class Huami2021ActivityDetailsParser extends AbstractHuamiActivityDetails case HEARTRATE: consumeHeartRate(buf); break; + case STRENGTH_SET: + // TODO parse strength sets: weight, count, type default: LOG.warn("No consumer for for type {}", type); // Consume the reported length @@ -320,6 +322,7 @@ public class Huami2021ActivityDetailsParser extends AbstractHuamiActivityDetails SPEED(5, 8), ALTITUDE(7, 6), HEARTRATE(8, 3), + STRENGTH_SET(15, 34), ; private final byte code; diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/Huami2021WorkoutTrackActivityType.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/Huami2021WorkoutTrackActivityType.java index cdd71a1eb..92c409070 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/Huami2021WorkoutTrackActivityType.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/Huami2021WorkoutTrackActivityType.java @@ -160,6 +160,10 @@ public enum Huami2021WorkoutTrackActivityType { switch (this) { case Badminton: return ActivityKind.TYPE_BADMINTON; + case Basketball: + return ActivityKind.TYPE_BASKETBALL; + case Cricket: + return ActivityKind.TYPE_CRICKET; case Elliptical: return ActivityKind.TYPE_ELLIPTICAL_TRAINER; case Freestyle: @@ -184,6 +188,8 @@ public enum Huami2021WorkoutTrackActivityType { case Walking: case RaceWalking: return ActivityKind.TYPE_WALKING; + case Strength: + return ActivityKind.TYPE_STRENGTH_TRAINING; case Yoga: return ActivityKind.TYPE_YOGA; }