mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-02 15:02:56 +01:00
Xiaomi-protobuf: Fix some workout type recognition
This commit is contained in:
parent
e436946bed
commit
e6dc262a4d
@ -293,6 +293,8 @@ public enum ActivityKind {
|
|||||||
BIATHLON(0x040000ee, R.string.activity_type_biathlon),
|
BIATHLON(0x040000ee, R.string.activity_type_biathlon),
|
||||||
BUNGEE_JUMPING(0x040000ef, R.string.activity_type_bungee_jumping),
|
BUNGEE_JUMPING(0x040000ef, R.string.activity_type_bungee_jumping),
|
||||||
ORIENTEERING(0x040000f0, R.string.activity_type_orienteering),
|
ORIENTEERING(0x040000f0, R.string.activity_type_orienteering),
|
||||||
|
TREKKING(0x040000f1, R.string.activity_type_trekking),
|
||||||
|
TRAIL_RUN(0x040000f2, R.string.activity_type_trail_run),
|
||||||
;
|
;
|
||||||
|
|
||||||
private final int code;
|
private final int code;
|
||||||
|
@ -99,16 +99,15 @@ public class XiaomiSimpleActivityParser {
|
|||||||
|
|
||||||
summaryData.add(dataEntry.getKey(), swimStyleName);
|
summaryData.add(dataEntry.getKey(), swimStyleName);
|
||||||
} else if (dataEntry.getKey().equals(XIAOMI_WORKOUT_TYPE)) {
|
} else if (dataEntry.getKey().equals(XIAOMI_WORKOUT_TYPE)) {
|
||||||
// TODO use XiaomiWorkoutType
|
|
||||||
switch (value.intValue()) {
|
switch (value.intValue()) {
|
||||||
case 1:
|
case 1:
|
||||||
summary.setActivityKind(ActivityKind.OUTDOOR_WALKING.getCode());
|
summary.setActivityKind(ActivityKind.OUTDOOR_RUNNING.getCode());
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
summary.setActivityKind(ActivityKind.WALKING.getCode());
|
summary.setActivityKind(ActivityKind.OUTDOOR_WALKING.getCode());
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
summary.setActivityKind(ActivityKind.CYCLING.getCode());
|
summary.setActivityKind(ActivityKind.OUTDOOR_CYCLING.getCode());
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
summary.setActivityKind(ActivityKind.UNKNOWN.getCode());
|
summary.setActivityKind(ActivityKind.UNKNOWN.getCode());
|
||||||
|
Loading…
Reference in New Issue
Block a user