mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-23 18:36:50 +01:00
Garmin: Map some missing fields in FitRecord
This commit is contained in:
parent
bd3b7467a4
commit
598e737f10
@ -139,10 +139,18 @@ public class GlobalFITMessage {
|
||||
new FieldDefinitionPrimitive(1, BaseType.SINT32, "longitude", FieldDefinitionFactory.FIELD.COORDINATE),
|
||||
new FieldDefinitionPrimitive(2, BaseType.UINT16, "altitude", 5, 500), // m
|
||||
new FieldDefinitionPrimitive(3, BaseType.UINT8, "heart_rate"),
|
||||
new FieldDefinitionPrimitive(4, BaseType.UINT8, "cadence"), // rpm
|
||||
new FieldDefinitionPrimitive(5, BaseType.UINT32, "distance", 100, 0), // m
|
||||
new FieldDefinitionPrimitive(6, BaseType.UINT16, "speed", 1000, 0), // m/s
|
||||
new FieldDefinitionPrimitive(73, BaseType.UINT32, "enhanced_speed"), // mm/s
|
||||
new FieldDefinitionPrimitive(7, BaseType.UINT16, "power"), // watt
|
||||
new FieldDefinitionPrimitive(29, BaseType.UINT32, "accumulated_power"), // watt
|
||||
new FieldDefinitionPrimitive(39, BaseType.UINT16, "oscillation", 10, 0), // mm
|
||||
new FieldDefinitionPrimitive(42, BaseType.ENUM, "activity"),
|
||||
new FieldDefinitionPrimitive(53, BaseType.UINT8, "fractional_cadence", 128, 0), // rpm
|
||||
new FieldDefinitionPrimitive(73, BaseType.UINT32, "enhanced_speed", 1000, 0), // mm/s
|
||||
new FieldDefinitionPrimitive(78, BaseType.UINT32, "enhanced_altitude", 5, 500), // m
|
||||
new FieldDefinitionPrimitive(83, BaseType.UINT16, "vertical_ratio", 100, 0), // %
|
||||
new FieldDefinitionPrimitive(85, BaseType.UINT16, "step_length", 10, 0), // mm
|
||||
new FieldDefinitionPrimitive(136, BaseType.UINT8, "wrist_heart_rate"),
|
||||
new FieldDefinitionPrimitive(143, BaseType.UINT8, "body_battery"),
|
||||
new FieldDefinitionPrimitive(253, BaseType.UINT32, "timestamp", FieldDefinitionFactory.FIELD.TIMESTAMP)
|
||||
|
@ -45,6 +45,11 @@ public class FitRecord extends RecordData {
|
||||
return (Integer) getFieldByNumber(3);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getCadence() {
|
||||
return (Integer) getFieldByNumber(4);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Double getDistance() {
|
||||
return (Double) getFieldByNumber(5);
|
||||
@ -56,8 +61,33 @@ public class FitRecord extends RecordData {
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Long getEnhancedSpeed() {
|
||||
return (Long) getFieldByNumber(73);
|
||||
public Integer getPower() {
|
||||
return (Integer) getFieldByNumber(7);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Long getAccumulatedPower() {
|
||||
return (Long) getFieldByNumber(29);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Float getOscillation() {
|
||||
return (Float) getFieldByNumber(39);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getActivity() {
|
||||
return (Integer) getFieldByNumber(42);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Float getFractionalCadence() {
|
||||
return (Float) getFieldByNumber(53);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Double getEnhancedSpeed() {
|
||||
return (Double) getFieldByNumber(73);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@ -65,6 +95,16 @@ public class FitRecord extends RecordData {
|
||||
return (Double) getFieldByNumber(78);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Float getVerticalRatio() {
|
||||
return (Float) getFieldByNumber(83);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Float getStepLength() {
|
||||
return (Float) getFieldByNumber(85);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getWristHeartRate() {
|
||||
return (Integer) getFieldByNumber(136);
|
||||
|
Loading…
Reference in New Issue
Block a user