mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-01-26 00:21:45 +01:00
Zepp OS: Map strength training, basketball and cricket activity types
This commit is contained in:
parent
9c82180930
commit
08a41f655c
@ -123,6 +123,8 @@ public class Huami2021ActivityDetailsParser extends AbstractHuamiActivityDetails
|
|||||||
case HEARTRATE:
|
case HEARTRATE:
|
||||||
consumeHeartRate(buf);
|
consumeHeartRate(buf);
|
||||||
break;
|
break;
|
||||||
|
case STRENGTH_SET:
|
||||||
|
// TODO parse strength sets: weight, count, type
|
||||||
default:
|
default:
|
||||||
LOG.warn("No consumer for for type {}", type);
|
LOG.warn("No consumer for for type {}", type);
|
||||||
// Consume the reported length
|
// Consume the reported length
|
||||||
@ -320,6 +322,7 @@ public class Huami2021ActivityDetailsParser extends AbstractHuamiActivityDetails
|
|||||||
SPEED(5, 8),
|
SPEED(5, 8),
|
||||||
ALTITUDE(7, 6),
|
ALTITUDE(7, 6),
|
||||||
HEARTRATE(8, 3),
|
HEARTRATE(8, 3),
|
||||||
|
STRENGTH_SET(15, 34),
|
||||||
;
|
;
|
||||||
|
|
||||||
private final byte code;
|
private final byte code;
|
||||||
|
@ -160,6 +160,10 @@ public enum Huami2021WorkoutTrackActivityType {
|
|||||||
switch (this) {
|
switch (this) {
|
||||||
case Badminton:
|
case Badminton:
|
||||||
return ActivityKind.TYPE_BADMINTON;
|
return ActivityKind.TYPE_BADMINTON;
|
||||||
|
case Basketball:
|
||||||
|
return ActivityKind.TYPE_BASKETBALL;
|
||||||
|
case Cricket:
|
||||||
|
return ActivityKind.TYPE_CRICKET;
|
||||||
case Elliptical:
|
case Elliptical:
|
||||||
return ActivityKind.TYPE_ELLIPTICAL_TRAINER;
|
return ActivityKind.TYPE_ELLIPTICAL_TRAINER;
|
||||||
case Freestyle:
|
case Freestyle:
|
||||||
@ -184,6 +188,8 @@ public enum Huami2021WorkoutTrackActivityType {
|
|||||||
case Walking:
|
case Walking:
|
||||||
case RaceWalking:
|
case RaceWalking:
|
||||||
return ActivityKind.TYPE_WALKING;
|
return ActivityKind.TYPE_WALKING;
|
||||||
|
case Strength:
|
||||||
|
return ActivityKind.TYPE_STRENGTH_TRAINING;
|
||||||
case Yoga:
|
case Yoga:
|
||||||
return ActivityKind.TYPE_YOGA;
|
return ActivityKind.TYPE_YOGA;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user