mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
Garmin: decode more FIT messages and fields
This commit is contained in:
+1
-1
@@ -1068,7 +1068,7 @@ public class GarminSupport extends AbstractBTLESingleDeviceSupport implements IC
|
||||
.setEnabled(alarm.getEnabled() ? 1 : 0)
|
||||
.setSound(soundCode)
|
||||
.setBacklight(alarm.getBacklight() ? 1 : 0)
|
||||
.setSomeTimestamp((long) currentTime)
|
||||
.setTimeCreated((long) currentTime)
|
||||
.setUnknown7(0)
|
||||
.setLabel(label)
|
||||
.setMessageIndex(numberEnabledAlarms);
|
||||
|
||||
+7
@@ -33,9 +33,16 @@
|
||||
*/
|
||||
package nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit;
|
||||
|
||||
import static nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.NativeFITMessage.KNOWN_MESSAGES;
|
||||
|
||||
public final class FitDebug {
|
||||
/// format a native number (Native FIT message number) for logging
|
||||
public static String mesgNumLookup(int nativeMessageNumber) {
|
||||
final NativeFITMessage fit = KNOWN_MESSAGES.getOrDefault(nativeMessageNumber, null);
|
||||
if (fit != null) {
|
||||
return fit.getNumber() + "_" + fit.name();
|
||||
}
|
||||
|
||||
return switch (nativeMessageNumber) {
|
||||
case 0 -> "0_file_id";
|
||||
case 1 -> "1_capabilities";
|
||||
|
||||
+412
-178
File diff suppressed because it is too large
Load Diff
+12
-2
@@ -68,7 +68,7 @@ public class FitAlarmSettings extends RecordData {
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Long getSomeTimestamp() {
|
||||
public Long getTimeCreated() {
|
||||
return getFieldByNumber(5, Long.class);
|
||||
}
|
||||
|
||||
@@ -82,6 +82,11 @@ public class FitAlarmSettings extends RecordData {
|
||||
return getFieldByNumber(8, Label.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Long getTimeUpdated() {
|
||||
return getFieldByNumber(11, Long.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getMessageIndex() {
|
||||
return getFieldByNumber(254, Integer.class);
|
||||
@@ -120,7 +125,7 @@ public class FitAlarmSettings extends RecordData {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setSomeTimestamp(final Long value) {
|
||||
public Builder setTimeCreated(final Long value) {
|
||||
setFieldByNumber(5, value);
|
||||
return this;
|
||||
}
|
||||
@@ -135,6 +140,11 @@ public class FitAlarmSettings extends RecordData {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setTimeUpdated(final Long value) {
|
||||
setFieldByNumber(11, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setMessageIndex(final Integer value) {
|
||||
setFieldByNumber(254, value);
|
||||
return this;
|
||||
|
||||
+110
@@ -0,0 +1,110 @@
|
||||
/* Copyright (C) 2026 Freeyourgadget
|
||||
|
||||
This file is part of Gadgetbridge.
|
||||
|
||||
Gadgetbridge is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Gadgetbridge is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
package nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.messages;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.FitRecordDataBuilder;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.RecordData;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.RecordDefinition;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.RecordHeader;
|
||||
|
||||
/**
|
||||
* WARNING: This class was auto-generated, please avoid modifying it directly.
|
||||
* See {@link nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.codegen.FitCodeGen}
|
||||
*
|
||||
* @noinspection unused
|
||||
*/
|
||||
public class FitAlert extends RecordData {
|
||||
public FitAlert(final RecordDefinition recordDefinition, final RecordHeader recordHeader) {
|
||||
super(recordDefinition, recordHeader);
|
||||
|
||||
final int nativeNumber = recordDefinition.getNativeFITMessage().getNumber();
|
||||
if (nativeNumber != 16) {
|
||||
throw new IllegalArgumentException("FitAlert expects native messages of " + 16 + ", got " + nativeNumber);
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getMetric() {
|
||||
return getFieldByNumber(1, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Long getValue() {
|
||||
return getFieldByNumber(2, Long.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getStatus() {
|
||||
return getFieldByNumber(3, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public String getMessage() {
|
||||
return getFieldByNumber(4, String.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getRepeat() {
|
||||
return getFieldByNumber(5, Integer.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @noinspection unused
|
||||
*/
|
||||
public static class Builder extends FitRecordDataBuilder {
|
||||
public Builder() {
|
||||
super(16);
|
||||
}
|
||||
|
||||
public Builder setMetric(final Integer value) {
|
||||
setFieldByNumber(1, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setValue(final Long value) {
|
||||
setFieldByNumber(2, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setStatus(final Integer value) {
|
||||
setFieldByNumber(3, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setMessage(final String value) {
|
||||
setFieldByNumber(4, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setRepeat(final Integer value) {
|
||||
setFieldByNumber(5, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FitAlert build() {
|
||||
return (FitAlert) super.build();
|
||||
}
|
||||
|
||||
@Override
|
||||
public FitAlert build(final int localMessageType) {
|
||||
return (FitAlert) super.build(localMessageType);
|
||||
}
|
||||
}
|
||||
}
|
||||
+110
@@ -0,0 +1,110 @@
|
||||
/* Copyright (C) 2026 Freeyourgadget
|
||||
|
||||
This file is part of Gadgetbridge.
|
||||
|
||||
Gadgetbridge is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Gadgetbridge is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
package nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.messages;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.FitRecordDataBuilder;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.RecordData;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.RecordDefinition;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.RecordHeader;
|
||||
|
||||
/**
|
||||
* WARNING: This class was auto-generated, please avoid modifying it directly.
|
||||
* See {@link nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.codegen.FitCodeGen}
|
||||
*
|
||||
* @noinspection unused
|
||||
*/
|
||||
public class FitBestEffort extends RecordData {
|
||||
public FitBestEffort(final RecordDefinition recordDefinition, final RecordHeader recordHeader) {
|
||||
super(recordDefinition, recordHeader);
|
||||
|
||||
final int nativeNumber = recordDefinition.getNativeFITMessage().getNumber();
|
||||
if (nativeNumber != 113) {
|
||||
throw new IllegalArgumentException("FitBestEffort expects native messages of " + 113 + ", got " + nativeNumber);
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getSport() {
|
||||
return getFieldByNumber(1, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Double getDistance() {
|
||||
return getFieldByNumber(2, Double.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Double getTime() {
|
||||
return getFieldByNumber(3, Double.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Long getTimestamp() {
|
||||
return getFieldByNumber(4, Long.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getPersonalRecord() {
|
||||
return getFieldByNumber(5, Integer.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @noinspection unused
|
||||
*/
|
||||
public static class Builder extends FitRecordDataBuilder {
|
||||
public Builder() {
|
||||
super(113);
|
||||
}
|
||||
|
||||
public Builder setSport(final Integer value) {
|
||||
setFieldByNumber(1, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setDistance(final Double value) {
|
||||
setFieldByNumber(2, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setTime(final Double value) {
|
||||
setFieldByNumber(3, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setTimestamp(final Long value) {
|
||||
setFieldByNumber(4, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setPersonalRecord(final Integer value) {
|
||||
setFieldByNumber(5, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FitBestEffort build() {
|
||||
return (FitBestEffort) super.build();
|
||||
}
|
||||
|
||||
@Override
|
||||
public FitBestEffort build(final int localMessageType) {
|
||||
return (FitBestEffort) super.build(localMessageType);
|
||||
}
|
||||
}
|
||||
}
|
||||
+100
@@ -0,0 +1,100 @@
|
||||
/* Copyright (C) 2026 Freeyourgadget
|
||||
|
||||
This file is part of Gadgetbridge.
|
||||
|
||||
Gadgetbridge is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Gadgetbridge is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
package nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.messages;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.FitRecordDataBuilder;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.RecordData;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.RecordDefinition;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.RecordHeader;
|
||||
|
||||
/**
|
||||
* WARNING: This class was auto-generated, please avoid modifying it directly.
|
||||
* See {@link nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.codegen.FitCodeGen}
|
||||
*
|
||||
* @noinspection unused
|
||||
*/
|
||||
public class FitConnectIqField extends RecordData {
|
||||
public FitConnectIqField(final RecordDefinition recordDefinition, final RecordHeader recordHeader) {
|
||||
super(recordDefinition, recordHeader);
|
||||
|
||||
final int nativeNumber = recordDefinition.getNativeFITMessage().getNumber();
|
||||
if (nativeNumber != 170) {
|
||||
throw new IllegalArgumentException("FitConnectIqField expects native messages of " + 170 + ", got " + nativeNumber);
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Number[] getAppId() {
|
||||
return getArrayFieldByNumber(1, Number.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Long getDataField() {
|
||||
return getFieldByNumber(2, Long.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getScreenId() {
|
||||
return getFieldByNumber(100, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getFieldBits() {
|
||||
return getFieldByNumber(101, Integer.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @noinspection unused
|
||||
*/
|
||||
public static class Builder extends FitRecordDataBuilder {
|
||||
public Builder() {
|
||||
super(170);
|
||||
}
|
||||
|
||||
public Builder setAppId(final Number[] value) {
|
||||
setFieldByNumber(1, (Object[]) value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setDataField(final Long value) {
|
||||
setFieldByNumber(2, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setScreenId(final Integer value) {
|
||||
setFieldByNumber(100, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setFieldBits(final Integer value) {
|
||||
setFieldByNumber(101, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FitConnectIqField build() {
|
||||
return (FitConnectIqField) super.build();
|
||||
}
|
||||
|
||||
@Override
|
||||
public FitConnectIqField build(final int localMessageType) {
|
||||
return (FitConnectIqField) super.build(localMessageType);
|
||||
}
|
||||
}
|
||||
}
|
||||
+110
@@ -0,0 +1,110 @@
|
||||
/* Copyright (C) 2026 Freeyourgadget
|
||||
|
||||
This file is part of Gadgetbridge.
|
||||
|
||||
Gadgetbridge is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Gadgetbridge is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
package nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.messages;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.FitRecordDataBuilder;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.RecordData;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.RecordDefinition;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.RecordHeader;
|
||||
|
||||
/**
|
||||
* WARNING: This class was auto-generated, please avoid modifying it directly.
|
||||
* See {@link nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.codegen.FitCodeGen}
|
||||
*
|
||||
* @noinspection unused
|
||||
*/
|
||||
public class FitDataScreen extends RecordData {
|
||||
public FitDataScreen(final RecordDefinition recordDefinition, final RecordHeader recordHeader) {
|
||||
super(recordDefinition, recordHeader);
|
||||
|
||||
final int nativeNumber = recordDefinition.getNativeFITMessage().getNumber();
|
||||
if (nativeNumber != 14) {
|
||||
throw new IllegalArgumentException("FitDataScreen expects native messages of " + 14 + ", got " + nativeNumber);
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getNrFields() {
|
||||
return getFieldByNumber(3, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getDataFields() {
|
||||
return getFieldByNumber(7, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getLayout() {
|
||||
return getFieldByNumber(8, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getPosition() {
|
||||
return getFieldByNumber(9, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getScreenType() {
|
||||
return getFieldByNumber(10, Integer.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @noinspection unused
|
||||
*/
|
||||
public static class Builder extends FitRecordDataBuilder {
|
||||
public Builder() {
|
||||
super(14);
|
||||
}
|
||||
|
||||
public Builder setNrFields(final Integer value) {
|
||||
setFieldByNumber(3, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setDataFields(final Integer value) {
|
||||
setFieldByNumber(7, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setLayout(final Integer value) {
|
||||
setFieldByNumber(8, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setPosition(final Integer value) {
|
||||
setFieldByNumber(9, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setScreenType(final Integer value) {
|
||||
setFieldByNumber(10, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FitDataScreen build() {
|
||||
return (FitDataScreen) super.build();
|
||||
}
|
||||
|
||||
@Override
|
||||
public FitDataScreen build(final int localMessageType) {
|
||||
return (FitDataScreen) super.build(localMessageType);
|
||||
}
|
||||
}
|
||||
}
|
||||
+70
@@ -680,6 +680,41 @@ public class FitLap extends RecordData {
|
||||
return getFieldByNumber(160, Float.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Double getGradeAdjustedSpeed() {
|
||||
return getFieldByNumber(161, Double.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getUnpaved() {
|
||||
return getFieldByNumber(163, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Float getStepSpeedLossDistance() {
|
||||
return getFieldByNumber(164, Float.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Float getStepSpeedLossPercentage() {
|
||||
return getFieldByNumber(165, Float.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Double getAvgForce() {
|
||||
return getFieldByNumber(166, Double.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Double getMaxForce() {
|
||||
return getFieldByNumber(167, Double.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Double getNormalizedForce() {
|
||||
return getFieldByNumber(168, Double.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Long getTimestamp() {
|
||||
return getFieldByNumber(253, Long.class);
|
||||
@@ -1338,6 +1373,41 @@ public class FitLap extends RecordData {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setGradeAdjustedSpeed(final Double value) {
|
||||
setFieldByNumber(161, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setUnpaved(final Integer value) {
|
||||
setFieldByNumber(163, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setStepSpeedLossDistance(final Float value) {
|
||||
setFieldByNumber(164, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setStepSpeedLossPercentage(final Float value) {
|
||||
setFieldByNumber(165, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setAvgForce(final Double value) {
|
||||
setFieldByNumber(166, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setMaxForce(final Double value) {
|
||||
setFieldByNumber(167, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setNormalizedForce(final Double value) {
|
||||
setFieldByNumber(168, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setTimestamp(final Long value) {
|
||||
setFieldByNumber(253, value);
|
||||
return this;
|
||||
|
||||
+100
@@ -0,0 +1,100 @@
|
||||
/* Copyright (C) 2026 Freeyourgadget
|
||||
|
||||
This file is part of Gadgetbridge.
|
||||
|
||||
Gadgetbridge is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Gadgetbridge is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
package nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.messages;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.FitRecordDataBuilder;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.RecordData;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.RecordDefinition;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.RecordHeader;
|
||||
|
||||
/**
|
||||
* WARNING: This class was auto-generated, please avoid modifying it directly.
|
||||
* See {@link nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.codegen.FitCodeGen}
|
||||
*
|
||||
* @noinspection unused
|
||||
*/
|
||||
public class FitMetronome extends RecordData {
|
||||
public FitMetronome(final RecordDefinition recordDefinition, final RecordHeader recordHeader) {
|
||||
super(recordDefinition, recordHeader);
|
||||
|
||||
final int nativeNumber = recordDefinition.getNativeFITMessage().getNumber();
|
||||
if (nativeNumber != 152) {
|
||||
throw new IllegalArgumentException("FitMetronome expects native messages of " + 152 + ", got " + nativeNumber);
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getEnabled() {
|
||||
return getFieldByNumber(0, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getBeatsPerMinute() {
|
||||
return getFieldByNumber(1, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getAlertFrequency() {
|
||||
return getFieldByNumber(2, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getSoundAndVibe() {
|
||||
return getFieldByNumber(3, Integer.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @noinspection unused
|
||||
*/
|
||||
public static class Builder extends FitRecordDataBuilder {
|
||||
public Builder() {
|
||||
super(152);
|
||||
}
|
||||
|
||||
public Builder setEnabled(final Integer value) {
|
||||
setFieldByNumber(0, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setBeatsPerMinute(final Integer value) {
|
||||
setFieldByNumber(1, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setAlertFrequency(final Integer value) {
|
||||
setFieldByNumber(2, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setSoundAndVibe(final Integer value) {
|
||||
setFieldByNumber(3, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FitMetronome build() {
|
||||
return (FitMetronome) super.build();
|
||||
}
|
||||
|
||||
@Override
|
||||
public FitMetronome build(final int localMessageType) {
|
||||
return (FitMetronome) super.build(localMessageType);
|
||||
}
|
||||
}
|
||||
}
|
||||
+80
@@ -0,0 +1,80 @@
|
||||
/* Copyright (C) 2026 Freeyourgadget
|
||||
|
||||
This file is part of Gadgetbridge.
|
||||
|
||||
Gadgetbridge is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Gadgetbridge is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
package nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.messages;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.FitRecordDataBuilder;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.RecordData;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.RecordDefinition;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.RecordHeader;
|
||||
|
||||
/**
|
||||
* WARNING: This class was auto-generated, please avoid modifying it directly.
|
||||
* See {@link nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.codegen.FitCodeGen}
|
||||
*
|
||||
* @noinspection unused
|
||||
*/
|
||||
public class FitMtbCx extends RecordData {
|
||||
public FitMtbCx(final RecordDefinition recordDefinition, final RecordHeader recordHeader) {
|
||||
super(recordDefinition, recordHeader);
|
||||
|
||||
final int nativeNumber = recordDefinition.getNativeFITMessage().getNumber();
|
||||
if (nativeNumber != 309) {
|
||||
throw new IllegalArgumentException("FitMtbCx expects native messages of " + 309 + ", got " + nativeNumber);
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getGritFlowJumpRecording() {
|
||||
return getFieldByNumber(1, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getJumpAlerts() {
|
||||
return getFieldByNumber(2, Integer.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @noinspection unused
|
||||
*/
|
||||
public static class Builder extends FitRecordDataBuilder {
|
||||
public Builder() {
|
||||
super(309);
|
||||
}
|
||||
|
||||
public Builder setGritFlowJumpRecording(final Integer value) {
|
||||
setFieldByNumber(1, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setJumpAlerts(final Integer value) {
|
||||
setFieldByNumber(2, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FitMtbCx build() {
|
||||
return (FitMtbCx) super.build();
|
||||
}
|
||||
|
||||
@Override
|
||||
public FitMtbCx build(final int localMessageType) {
|
||||
return (FitMtbCx) super.build(localMessageType);
|
||||
}
|
||||
}
|
||||
}
|
||||
+100
@@ -0,0 +1,100 @@
|
||||
/* Copyright (C) 2026 Freeyourgadget
|
||||
|
||||
This file is part of Gadgetbridge.
|
||||
|
||||
Gadgetbridge is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Gadgetbridge is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
package nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.messages;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.FitRecordDataBuilder;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.RecordData;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.RecordDefinition;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.RecordHeader;
|
||||
|
||||
/**
|
||||
* WARNING: This class was auto-generated, please avoid modifying it directly.
|
||||
* See {@link nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.codegen.FitCodeGen}
|
||||
*
|
||||
* @noinspection unused
|
||||
*/
|
||||
public class FitMultisportActivity extends RecordData {
|
||||
public FitMultisportActivity(final RecordDefinition recordDefinition, final RecordHeader recordHeader) {
|
||||
super(recordDefinition, recordHeader);
|
||||
|
||||
final int nativeNumber = recordDefinition.getNativeFITMessage().getNumber();
|
||||
if (nativeNumber != 144) {
|
||||
throw new IllegalArgumentException("FitMultisportActivity expects native messages of " + 144 + ", got " + nativeNumber);
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getSport() {
|
||||
return getFieldByNumber(0, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getSubSport() {
|
||||
return getFieldByNumber(1, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getLockDevice() {
|
||||
return getFieldByNumber(2, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public String getName() {
|
||||
return getFieldByNumber(3, String.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @noinspection unused
|
||||
*/
|
||||
public static class Builder extends FitRecordDataBuilder {
|
||||
public Builder() {
|
||||
super(144);
|
||||
}
|
||||
|
||||
public Builder setSport(final Integer value) {
|
||||
setFieldByNumber(0, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setSubSport(final Integer value) {
|
||||
setFieldByNumber(1, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setLockDevice(final Integer value) {
|
||||
setFieldByNumber(2, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setName(final String value) {
|
||||
setFieldByNumber(3, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FitMultisportActivity build() {
|
||||
return (FitMultisportActivity) super.build();
|
||||
}
|
||||
|
||||
@Override
|
||||
public FitMultisportActivity build(final int localMessageType) {
|
||||
return (FitMultisportActivity) super.build(localMessageType);
|
||||
}
|
||||
}
|
||||
}
|
||||
+110
@@ -0,0 +1,110 @@
|
||||
/* Copyright (C) 2026 Freeyourgadget
|
||||
|
||||
This file is part of Gadgetbridge.
|
||||
|
||||
Gadgetbridge is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Gadgetbridge is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
package nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.messages;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.FitRecordDataBuilder;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.RecordData;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.RecordDefinition;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.RecordHeader;
|
||||
|
||||
/**
|
||||
* WARNING: This class was auto-generated, please avoid modifying it directly.
|
||||
* See {@link nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.codegen.FitCodeGen}
|
||||
*
|
||||
* @noinspection unused
|
||||
*/
|
||||
public class FitMusicInfo extends RecordData {
|
||||
public FitMusicInfo(final RecordDefinition recordDefinition, final RecordHeader recordHeader) {
|
||||
super(recordDefinition, recordHeader);
|
||||
|
||||
final int nativeNumber = recordDefinition.getNativeFITMessage().getNumber();
|
||||
if (nativeNumber != 243) {
|
||||
throw new IllegalArgumentException("FitMusicInfo expects native messages of " + 243 + ", got " + nativeNumber);
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Long getStartTime() {
|
||||
return getFieldByNumber(0, Long.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public String getTitle() {
|
||||
return getFieldByNumber(2, String.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public String getArtist() {
|
||||
return getFieldByNumber(3, String.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public String getGenre() {
|
||||
return getFieldByNumber(4, String.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getDuration() {
|
||||
return getFieldByNumber(5, Integer.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @noinspection unused
|
||||
*/
|
||||
public static class Builder extends FitRecordDataBuilder {
|
||||
public Builder() {
|
||||
super(243);
|
||||
}
|
||||
|
||||
public Builder setStartTime(final Long value) {
|
||||
setFieldByNumber(0, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setTitle(final String value) {
|
||||
setFieldByNumber(2, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setArtist(final String value) {
|
||||
setFieldByNumber(3, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setGenre(final String value) {
|
||||
setFieldByNumber(4, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setDuration(final Integer value) {
|
||||
setFieldByNumber(5, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FitMusicInfo build() {
|
||||
return (FitMusicInfo) super.build();
|
||||
}
|
||||
|
||||
@Override
|
||||
public FitMusicInfo build(final int localMessageType) {
|
||||
return (FitMusicInfo) super.build(localMessageType);
|
||||
}
|
||||
}
|
||||
}
|
||||
+4
-4
@@ -45,7 +45,7 @@ public class FitNap extends RecordData {
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getUnknown1() {
|
||||
public Integer getStartTzOffset() {
|
||||
return getFieldByNumber(1, Integer.class);
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ public class FitNap extends RecordData {
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getUnknown3() {
|
||||
public Integer getEndTzOffset() {
|
||||
return getFieldByNumber(3, Integer.class);
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ public class FitNap extends RecordData {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setUnknown1(final Integer value) {
|
||||
public Builder setStartTzOffset(final Integer value) {
|
||||
setFieldByNumber(1, value);
|
||||
return this;
|
||||
}
|
||||
@@ -102,7 +102,7 @@ public class FitNap extends RecordData {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setUnknown3(final Integer value) {
|
||||
public Builder setEndTzOffset(final Integer value) {
|
||||
setFieldByNumber(3, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
+100
@@ -0,0 +1,100 @@
|
||||
/* Copyright (C) 2026 Freeyourgadget
|
||||
|
||||
This file is part of Gadgetbridge.
|
||||
|
||||
Gadgetbridge is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Gadgetbridge is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
package nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.messages;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.FitRecordDataBuilder;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.RecordData;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.RecordDefinition;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.RecordHeader;
|
||||
|
||||
/**
|
||||
* WARNING: This class was auto-generated, please avoid modifying it directly.
|
||||
* See {@link nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.codegen.FitCodeGen}
|
||||
*
|
||||
* @noinspection unused
|
||||
*/
|
||||
public class FitPersonalRecord extends RecordData {
|
||||
public FitPersonalRecord(final RecordDefinition recordDefinition, final RecordHeader recordHeader) {
|
||||
super(recordDefinition, recordHeader);
|
||||
|
||||
final int nativeNumber = recordDefinition.getNativeFITMessage().getNumber();
|
||||
if (nativeNumber != 114) {
|
||||
throw new IllegalArgumentException("FitPersonalRecord expects native messages of " + 114 + ", got " + nativeNumber);
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getMetric() {
|
||||
return getFieldByNumber(0, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getSport() {
|
||||
return getFieldByNumber(1, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Double getDistance() {
|
||||
return getFieldByNumber(2, Double.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Long getRecord() {
|
||||
return getFieldByNumber(5, Long.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @noinspection unused
|
||||
*/
|
||||
public static class Builder extends FitRecordDataBuilder {
|
||||
public Builder() {
|
||||
super(114);
|
||||
}
|
||||
|
||||
public Builder setMetric(final Integer value) {
|
||||
setFieldByNumber(0, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setSport(final Integer value) {
|
||||
setFieldByNumber(1, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setDistance(final Double value) {
|
||||
setFieldByNumber(2, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setRecord(final Long value) {
|
||||
setFieldByNumber(5, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FitPersonalRecord build() {
|
||||
return (FitPersonalRecord) super.build();
|
||||
}
|
||||
|
||||
@Override
|
||||
public FitPersonalRecord build(final int localMessageType) {
|
||||
return (FitPersonalRecord) super.build(localMessageType);
|
||||
}
|
||||
}
|
||||
}
|
||||
+140
@@ -39,6 +39,11 @@ public class FitPhysiologicalMetrics extends RecordData {
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getNewHrMax() {
|
||||
return getFieldByNumber(1, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Float getAerobicEffect() {
|
||||
return getFieldByNumber(4, Float.class);
|
||||
@@ -54,16 +59,81 @@ public class FitPhysiologicalMetrics extends RecordData {
|
||||
return getFieldByNumber(9, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getSport() {
|
||||
return getFieldByNumber(11, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getLactateThresholdHeartRate() {
|
||||
return getFieldByNumber(14, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getLactateThresholdPower() {
|
||||
return getFieldByNumber(15, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Float getLactateThresholdSpeed() {
|
||||
return getFieldByNumber(16, Float.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getEndingPerformanceCondition() {
|
||||
return getFieldByNumber(17, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Float getAnaerobicEffect() {
|
||||
return getFieldByNumber(20, Float.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getEndingBodyBattery() {
|
||||
return getFieldByNumber(25, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Double getFirstVo2Max() {
|
||||
return getFieldByNumber(29, Double.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getPrimaryBenefit() {
|
||||
return getFieldByNumber(41, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Long getLocalTimestamp() {
|
||||
return getFieldByNumber(48, Long.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getEndingPotential() {
|
||||
return getFieldByNumber(50, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getTotalAscent() {
|
||||
return getFieldByNumber(60, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getTotalDescent() {
|
||||
return getFieldByNumber(61, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getAveragePower() {
|
||||
return getFieldByNumber(62, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getAverageHeartRate() {
|
||||
return getFieldByNumber(63, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Long getTimestamp() {
|
||||
return getFieldByNumber(253, Long.class);
|
||||
@@ -77,6 +147,11 @@ public class FitPhysiologicalMetrics extends RecordData {
|
||||
super(140);
|
||||
}
|
||||
|
||||
public Builder setNewHrMax(final Integer value) {
|
||||
setFieldByNumber(1, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setAerobicEffect(final Float value) {
|
||||
setFieldByNumber(4, value);
|
||||
return this;
|
||||
@@ -92,16 +167,81 @@ public class FitPhysiologicalMetrics extends RecordData {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setSport(final Integer value) {
|
||||
setFieldByNumber(11, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setLactateThresholdHeartRate(final Integer value) {
|
||||
setFieldByNumber(14, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setLactateThresholdPower(final Integer value) {
|
||||
setFieldByNumber(15, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setLactateThresholdSpeed(final Float value) {
|
||||
setFieldByNumber(16, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setEndingPerformanceCondition(final Integer value) {
|
||||
setFieldByNumber(17, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setAnaerobicEffect(final Float value) {
|
||||
setFieldByNumber(20, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setEndingBodyBattery(final Integer value) {
|
||||
setFieldByNumber(25, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setFirstVo2Max(final Double value) {
|
||||
setFieldByNumber(29, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setPrimaryBenefit(final Integer value) {
|
||||
setFieldByNumber(41, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setLocalTimestamp(final Long value) {
|
||||
setFieldByNumber(48, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setEndingPotential(final Integer value) {
|
||||
setFieldByNumber(50, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setTotalAscent(final Integer value) {
|
||||
setFieldByNumber(60, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setTotalDescent(final Integer value) {
|
||||
setFieldByNumber(61, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setAveragePower(final Integer value) {
|
||||
setFieldByNumber(62, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setAverageHeartRate(final Integer value) {
|
||||
setFieldByNumber(63, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setTimestamp(final Long value) {
|
||||
setFieldByNumber(253, value);
|
||||
return this;
|
||||
|
||||
+90
@@ -0,0 +1,90 @@
|
||||
/* Copyright (C) 2026 Freeyourgadget
|
||||
|
||||
This file is part of Gadgetbridge.
|
||||
|
||||
Gadgetbridge is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Gadgetbridge is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
package nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.messages;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.FitRecordDataBuilder;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.RecordData;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.RecordDefinition;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.RecordHeader;
|
||||
|
||||
/**
|
||||
* WARNING: This class was auto-generated, please avoid modifying it directly.
|
||||
* See {@link nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.codegen.FitCodeGen}
|
||||
*
|
||||
* @noinspection unused
|
||||
*/
|
||||
public class FitPowerMode extends RecordData {
|
||||
public FitPowerMode(final RecordDefinition recordDefinition, final RecordHeader recordHeader) {
|
||||
super(recordDefinition, recordHeader);
|
||||
|
||||
final int nativeNumber = recordDefinition.getNativeFITMessage().getNumber();
|
||||
if (nativeNumber != 321) {
|
||||
throw new IllegalArgumentException("FitPowerMode expects native messages of " + 321 + ", got " + nativeNumber);
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Long getLowBatteryAlert() {
|
||||
return getFieldByNumber(0, Long.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Long getDefaultMode() {
|
||||
return getFieldByNumber(1, Long.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Long getAutoEnableTime() {
|
||||
return getFieldByNumber(3, Long.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @noinspection unused
|
||||
*/
|
||||
public static class Builder extends FitRecordDataBuilder {
|
||||
public Builder() {
|
||||
super(321);
|
||||
}
|
||||
|
||||
public Builder setLowBatteryAlert(final Long value) {
|
||||
setFieldByNumber(0, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setDefaultMode(final Long value) {
|
||||
setFieldByNumber(1, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setAutoEnableTime(final Long value) {
|
||||
setFieldByNumber(3, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FitPowerMode build() {
|
||||
return (FitPowerMode) super.build();
|
||||
}
|
||||
|
||||
@Override
|
||||
public FitPowerMode build(final int localMessageType) {
|
||||
return (FitPowerMode) super.build(localMessageType);
|
||||
}
|
||||
}
|
||||
}
|
||||
+100
@@ -0,0 +1,100 @@
|
||||
/* Copyright (C) 2026 Freeyourgadget
|
||||
|
||||
This file is part of Gadgetbridge.
|
||||
|
||||
Gadgetbridge is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Gadgetbridge is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
package nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.messages;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.FitRecordDataBuilder;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.RecordData;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.RecordDefinition;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.RecordHeader;
|
||||
|
||||
/**
|
||||
* WARNING: This class was auto-generated, please avoid modifying it directly.
|
||||
* See {@link nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.codegen.FitCodeGen}
|
||||
*
|
||||
* @noinspection unused
|
||||
*/
|
||||
public class FitRace extends RecordData {
|
||||
public FitRace(final RecordDefinition recordDefinition, final RecordHeader recordHeader) {
|
||||
super(recordDefinition, recordHeader);
|
||||
|
||||
final int nativeNumber = recordDefinition.getNativeFITMessage().getNumber();
|
||||
if (nativeNumber != 310) {
|
||||
throw new IllegalArgumentException("FitRace expects native messages of " + 310 + ", got " + nativeNumber);
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Double getGoalTime() {
|
||||
return getFieldByNumber(3, Double.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Float getGoalSpeed() {
|
||||
return getFieldByNumber(4, Float.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Double getDistance() {
|
||||
return getFieldByNumber(5, Double.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Double getSplitDistance() {
|
||||
return getFieldByNumber(7, Double.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @noinspection unused
|
||||
*/
|
||||
public static class Builder extends FitRecordDataBuilder {
|
||||
public Builder() {
|
||||
super(310);
|
||||
}
|
||||
|
||||
public Builder setGoalTime(final Double value) {
|
||||
setFieldByNumber(3, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setGoalSpeed(final Float value) {
|
||||
setFieldByNumber(4, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setDistance(final Double value) {
|
||||
setFieldByNumber(5, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setSplitDistance(final Double value) {
|
||||
setFieldByNumber(7, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FitRace build() {
|
||||
return (FitRace) super.build();
|
||||
}
|
||||
|
||||
@Override
|
||||
public FitRace build(final int localMessageType) {
|
||||
return (FitRace) super.build(localMessageType);
|
||||
}
|
||||
}
|
||||
}
|
||||
+170
@@ -0,0 +1,170 @@
|
||||
/* Copyright (C) 2026 Freeyourgadget
|
||||
|
||||
This file is part of Gadgetbridge.
|
||||
|
||||
Gadgetbridge is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Gadgetbridge is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
package nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.messages;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.FitRecordDataBuilder;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.RecordData;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.RecordDefinition;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.RecordHeader;
|
||||
|
||||
/**
|
||||
* WARNING: This class was auto-generated, please avoid modifying it directly.
|
||||
* See {@link nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.codegen.FitCodeGen}
|
||||
*
|
||||
* @noinspection unused
|
||||
*/
|
||||
public class FitRaceEvent extends RecordData {
|
||||
public FitRaceEvent(final RecordDefinition recordDefinition, final RecordHeader recordHeader) {
|
||||
super(recordDefinition, recordHeader);
|
||||
|
||||
final int nativeNumber = recordDefinition.getNativeFITMessage().getNumber();
|
||||
if (nativeNumber != 358) {
|
||||
throw new IllegalArgumentException("FitRaceEvent expects native messages of " + 358 + ", got " + nativeNumber);
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public String getEventId() {
|
||||
return getFieldByNumber(1, String.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Long getStartTime() {
|
||||
return getFieldByNumber(2, Long.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Long getLocalTimestamp() {
|
||||
return getFieldByNumber(3, Long.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public String getName() {
|
||||
return getFieldByNumber(4, String.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public String getLocation() {
|
||||
return getFieldByNumber(5, String.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Double getStartPointLat() {
|
||||
return getFieldByNumber(6, Double.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Double getStartPointLong() {
|
||||
return getFieldByNumber(7, Double.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Double getDistance() {
|
||||
return getFieldByNumber(10, Double.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Double getTargetTime() {
|
||||
return getFieldByNumber(12, Double.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public String getCity() {
|
||||
return getFieldByNumber(24, String.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public String getCountry() {
|
||||
return getFieldByNumber(26, String.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @noinspection unused
|
||||
*/
|
||||
public static class Builder extends FitRecordDataBuilder {
|
||||
public Builder() {
|
||||
super(358);
|
||||
}
|
||||
|
||||
public Builder setEventId(final String value) {
|
||||
setFieldByNumber(1, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setStartTime(final Long value) {
|
||||
setFieldByNumber(2, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setLocalTimestamp(final Long value) {
|
||||
setFieldByNumber(3, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setName(final String value) {
|
||||
setFieldByNumber(4, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setLocation(final String value) {
|
||||
setFieldByNumber(5, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setStartPointLat(final Double value) {
|
||||
setFieldByNumber(6, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setStartPointLong(final Double value) {
|
||||
setFieldByNumber(7, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setDistance(final Double value) {
|
||||
setFieldByNumber(10, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setTargetTime(final Double value) {
|
||||
setFieldByNumber(12, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setCity(final String value) {
|
||||
setFieldByNumber(24, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setCountry(final String value) {
|
||||
setFieldByNumber(26, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FitRaceEvent build() {
|
||||
return (FitRaceEvent) super.build();
|
||||
}
|
||||
|
||||
@Override
|
||||
public FitRaceEvent build(final int localMessageType) {
|
||||
return (FitRaceEvent) super.build(localMessageType);
|
||||
}
|
||||
}
|
||||
}
|
||||
+110
@@ -0,0 +1,110 @@
|
||||
/* Copyright (C) 2026 Freeyourgadget
|
||||
|
||||
This file is part of Gadgetbridge.
|
||||
|
||||
Gadgetbridge is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Gadgetbridge is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
package nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.messages;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.FitRecordDataBuilder;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.RecordData;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.RecordDefinition;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.RecordHeader;
|
||||
|
||||
/**
|
||||
* WARNING: This class was auto-generated, please avoid modifying it directly.
|
||||
* See {@link nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.codegen.FitCodeGen}
|
||||
*
|
||||
* @noinspection unused
|
||||
*/
|
||||
public class FitRangeAlert extends RecordData {
|
||||
public FitRangeAlert(final RecordDefinition recordDefinition, final RecordHeader recordHeader) {
|
||||
super(recordDefinition, recordHeader);
|
||||
|
||||
final int nativeNumber = recordDefinition.getNativeFITMessage().getNumber();
|
||||
if (nativeNumber != 17) {
|
||||
throw new IllegalArgumentException("FitRangeAlert expects native messages of " + 17 + ", got " + nativeNumber);
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getMetric() {
|
||||
return getFieldByNumber(1, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getLowStatus() {
|
||||
return getFieldByNumber(2, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getLowValue() {
|
||||
return getFieldByNumber(3, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getHighStatus() {
|
||||
return getFieldByNumber(4, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getHighValue() {
|
||||
return getFieldByNumber(5, Integer.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @noinspection unused
|
||||
*/
|
||||
public static class Builder extends FitRecordDataBuilder {
|
||||
public Builder() {
|
||||
super(17);
|
||||
}
|
||||
|
||||
public Builder setMetric(final Integer value) {
|
||||
setFieldByNumber(1, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setLowStatus(final Integer value) {
|
||||
setFieldByNumber(2, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setLowValue(final Integer value) {
|
||||
setFieldByNumber(3, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setHighStatus(final Integer value) {
|
||||
setFieldByNumber(4, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setHighValue(final Integer value) {
|
||||
setFieldByNumber(5, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FitRangeAlert build() {
|
||||
return (FitRangeAlert) super.build();
|
||||
}
|
||||
|
||||
@Override
|
||||
public FitRangeAlert build(final int localMessageType) {
|
||||
return (FitRangeAlert) super.build(localMessageType);
|
||||
}
|
||||
}
|
||||
}
|
||||
+16
@@ -44,7 +44,10 @@ public class FitRecordDataFactory {
|
||||
case 10 -> new FitMetZone(recordDefinition, recordHeader);
|
||||
case 12 -> new FitSport(recordDefinition, recordHeader);
|
||||
case 13 -> new FitTrainingSettings(recordDefinition, recordHeader);
|
||||
case 14 -> new FitDataScreen(recordDefinition, recordHeader);
|
||||
case 15 -> new FitGoals(recordDefinition, recordHeader);
|
||||
case 16 -> new FitAlert(recordDefinition, recordHeader);
|
||||
case 17 -> new FitRangeAlert(recordDefinition, recordHeader);
|
||||
case 18 -> new FitSession(recordDefinition, recordHeader);
|
||||
case 19 -> new FitLap(recordDefinition, recordHeader);
|
||||
case 20 -> new FitRecord(recordDefinition, recordHeader);
|
||||
@@ -69,6 +72,7 @@ public class FitRecordDataFactory {
|
||||
case 53 -> new FitSpeedZone(recordDefinition, recordHeader);
|
||||
case 55 -> new FitMonitoring(recordDefinition, recordHeader);
|
||||
case 70 -> new FitMapLayer(recordDefinition, recordHeader);
|
||||
case 71 -> new FitRouting(recordDefinition, recordHeader);
|
||||
case 72 -> new FitTrainingFile(recordDefinition, recordHeader);
|
||||
case 78 -> new FitHrv(recordDefinition, recordHeader);
|
||||
case 79 -> new FitUserMetrics(recordDefinition, recordHeader);
|
||||
@@ -80,6 +84,8 @@ public class FitRecordDataFactory {
|
||||
case 104 -> new FitDeviceStatus(recordDefinition, recordHeader);
|
||||
case 105 -> new FitPad(recordDefinition, recordHeader);
|
||||
case 106 -> new FitSlaveDevice(recordDefinition, recordHeader);
|
||||
case 113 -> new FitBestEffort(recordDefinition, recordHeader);
|
||||
case 114 -> new FitPersonalRecord(recordDefinition, recordHeader);
|
||||
case 127 -> new FitConnectivity(recordDefinition, recordHeader);
|
||||
case 128 -> new FitWeather(recordDefinition, recordHeader);
|
||||
case 129 -> new FitWeatherAlert(recordDefinition, recordHeader);
|
||||
@@ -88,12 +94,14 @@ public class FitRecordDataFactory {
|
||||
case 140 -> new FitPhysiologicalMetrics(recordDefinition, recordHeader);
|
||||
case 141 -> new FitEpoStatus(recordDefinition, recordHeader);
|
||||
case 142 -> new FitSegmentLap(recordDefinition, recordHeader);
|
||||
case 144 -> new FitMultisportActivity(recordDefinition, recordHeader);
|
||||
case 145 -> new FitMemoGlob(recordDefinition, recordHeader);
|
||||
case 147 -> new FitSensorSettings(recordDefinition, recordHeader);
|
||||
case 148 -> new FitSegmentId(recordDefinition, recordHeader);
|
||||
case 149 -> new FitSegmentLeaderboardEntry(recordDefinition, recordHeader);
|
||||
case 150 -> new FitSegmentPoint(recordDefinition, recordHeader);
|
||||
case 151 -> new FitSegmentFile(recordDefinition, recordHeader);
|
||||
case 152 -> new FitMetronome(recordDefinition, recordHeader);
|
||||
case 158 -> new FitWorkoutSession(recordDefinition, recordHeader);
|
||||
case 159 -> new FitWatchfaceSettings(recordDefinition, recordHeader);
|
||||
case 160 -> new FitGpsMetadata(recordDefinition, recordHeader);
|
||||
@@ -103,6 +111,7 @@ public class FitRecordDataFactory {
|
||||
case 165 -> new FitAccelerometerData(recordDefinition, recordHeader);
|
||||
case 167 -> new FitThreeDSensorCalibration(recordDefinition, recordHeader);
|
||||
case 169 -> new FitVideoFrame(recordDefinition, recordHeader);
|
||||
case 170 -> new FitConnectIqField(recordDefinition, recordHeader);
|
||||
case 174 -> new FitObdiiData(recordDefinition, recordHeader);
|
||||
case 177 -> new FitNmeaSentence(recordDefinition, recordHeader);
|
||||
case 178 -> new FitAviationAttitude(recordDefinition, recordHeader);
|
||||
@@ -125,6 +134,7 @@ public class FitRecordDataFactory {
|
||||
case 225 -> new FitSet(recordDefinition, recordHeader);
|
||||
case 227 -> new FitStressLevel(recordDefinition, recordHeader);
|
||||
case 229 -> new FitMaxMetData(recordDefinition, recordHeader);
|
||||
case 243 -> new FitMusicInfo(recordDefinition, recordHeader);
|
||||
case 258 -> new FitDiveSettings(recordDefinition, recordHeader);
|
||||
case 259 -> new FitDiveGas(recordDefinition, recordHeader);
|
||||
case 262 -> new FitDiveAlarm(recordDefinition, recordHeader);
|
||||
@@ -144,12 +154,16 @@ public class FitRecordDataFactory {
|
||||
case 306 -> new FitHsaStressData(recordDefinition, recordHeader);
|
||||
case 307 -> new FitHsaRespirationData(recordDefinition, recordHeader);
|
||||
case 308 -> new FitHsaHeartRateData(recordDefinition, recordHeader);
|
||||
case 309 -> new FitMtbCx(recordDefinition, recordHeader);
|
||||
case 310 -> new FitRace(recordDefinition, recordHeader);
|
||||
case 311 -> new FitSplitTime(recordDefinition, recordHeader);
|
||||
case 312 -> new FitSplit(recordDefinition, recordHeader);
|
||||
case 313 -> new FitSplitSummary(recordDefinition, recordHeader);
|
||||
case 314 -> new FitHsaBodyBatteryData(recordDefinition, recordHeader);
|
||||
case 315 -> new FitHsaEvent(recordDefinition, recordHeader);
|
||||
case 317 -> new FitClimbPro(recordDefinition, recordHeader);
|
||||
case 319 -> new FitTankUpdate(recordDefinition, recordHeader);
|
||||
case 321 -> new FitPowerMode(recordDefinition, recordHeader);
|
||||
case 323 -> new FitTankSummary(recordDefinition, recordHeader);
|
||||
case 326 -> new FitGpsEvent(recordDefinition, recordHeader);
|
||||
case 336 -> new FitEcgSummary(recordDefinition, recordHeader);
|
||||
@@ -157,6 +171,7 @@ public class FitRecordDataFactory {
|
||||
case 338 -> new FitEcgSmoothSample(recordDefinition, recordHeader);
|
||||
case 346 -> new FitSleepStats(recordDefinition, recordHeader);
|
||||
case 356 -> new FitFunctionalMetrics(recordDefinition, recordHeader);
|
||||
case 358 -> new FitRaceEvent(recordDefinition, recordHeader);
|
||||
case 369 -> new FitTrainingReadiness(recordDefinition, recordHeader);
|
||||
case 370 -> new FitHrvSummary(recordDefinition, recordHeader);
|
||||
case 371 -> new FitHrvValue(recordDefinition, recordHeader);
|
||||
@@ -177,6 +192,7 @@ public class FitRecordDataFactory {
|
||||
case 403 -> new FitEnduranceScore(recordDefinition, recordHeader);
|
||||
case 409 -> new FitHsaWristTemperatureData(recordDefinition, recordHeader);
|
||||
case 412 -> new FitNap(recordDefinition, recordHeader);
|
||||
case 428 -> new FitWorkoutSchedule(recordDefinition, recordHeader);
|
||||
case 470 -> new FitSleepDisruptionSeverityPeriod(recordDefinition, recordHeader);
|
||||
case 471 -> new FitSleepDisruptionOvernightSeverity(recordDefinition, recordHeader);
|
||||
default -> new RecordData(recordDefinition, recordHeader);
|
||||
|
||||
+130
@@ -0,0 +1,130 @@
|
||||
/* Copyright (C) 2026 Freeyourgadget
|
||||
|
||||
This file is part of Gadgetbridge.
|
||||
|
||||
Gadgetbridge is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Gadgetbridge is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
package nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.messages;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.FitRecordDataBuilder;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.RecordData;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.RecordDefinition;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.RecordHeader;
|
||||
|
||||
/**
|
||||
* WARNING: This class was auto-generated, please avoid modifying it directly.
|
||||
* See {@link nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.codegen.FitCodeGen}
|
||||
*
|
||||
* @noinspection unused
|
||||
*/
|
||||
public class FitRouting extends RecordData {
|
||||
public FitRouting(final RecordDefinition recordDefinition, final RecordHeader recordHeader) {
|
||||
super(recordDefinition, recordHeader);
|
||||
|
||||
final int nativeNumber = recordDefinition.getNativeFITMessage().getNumber();
|
||||
if (nativeNumber != 71) {
|
||||
throw new IllegalArgumentException("FitRouting expects native messages of " + 71 + ", got " + nativeNumber);
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getRoutingMode() {
|
||||
return getFieldByNumber(0, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getCalculationMethod() {
|
||||
return getFieldByNumber(1, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getLockOnRoad() {
|
||||
return getFieldByNumber(2, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getAvoidances() {
|
||||
return getFieldByNumber(3, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getRouteRecalculation() {
|
||||
return getFieldByNumber(4, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getType() {
|
||||
return getFieldByNumber(5, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getCourseRecalculation() {
|
||||
return getFieldByNumber(7, Integer.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @noinspection unused
|
||||
*/
|
||||
public static class Builder extends FitRecordDataBuilder {
|
||||
public Builder() {
|
||||
super(71);
|
||||
}
|
||||
|
||||
public Builder setRoutingMode(final Integer value) {
|
||||
setFieldByNumber(0, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setCalculationMethod(final Integer value) {
|
||||
setFieldByNumber(1, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setLockOnRoad(final Integer value) {
|
||||
setFieldByNumber(2, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setAvoidances(final Integer value) {
|
||||
setFieldByNumber(3, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setRouteRecalculation(final Integer value) {
|
||||
setFieldByNumber(4, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setType(final Integer value) {
|
||||
setFieldByNumber(5, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setCourseRecalculation(final Integer value) {
|
||||
setFieldByNumber(7, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FitRouting build() {
|
||||
return (FitRouting) super.build();
|
||||
}
|
||||
|
||||
@Override
|
||||
public FitRouting build(final int localMessageType) {
|
||||
return (FitRouting) super.build(localMessageType);
|
||||
}
|
||||
}
|
||||
}
|
||||
+70
@@ -49,6 +49,31 @@ public class FitSensorSettings extends RecordData {
|
||||
return getFieldByNumber(2, String.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getWheelSizeManual() {
|
||||
return getFieldByNumber(10, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getCalibrationFactor() {
|
||||
return getFieldByNumber(11, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getWheelSizeAuto() {
|
||||
return getFieldByNumber(21, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getProduct() {
|
||||
return getFieldByNumber(32, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getManufacturer() {
|
||||
return getFieldByNumber(33, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getUseForSpeed() {
|
||||
return getFieldByNumber(45, Integer.class);
|
||||
@@ -64,6 +89,16 @@ public class FitSensorSettings extends RecordData {
|
||||
return getFieldByNumber(51, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getSensorType() {
|
||||
return getFieldByNumber(52, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public String getProductName() {
|
||||
return getFieldByNumber(91, String.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getMessageIndex() {
|
||||
return getFieldByNumber(254, Integer.class);
|
||||
@@ -87,6 +122,31 @@ public class FitSensorSettings extends RecordData {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setWheelSizeManual(final Integer value) {
|
||||
setFieldByNumber(10, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setCalibrationFactor(final Integer value) {
|
||||
setFieldByNumber(11, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setWheelSizeAuto(final Integer value) {
|
||||
setFieldByNumber(21, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setProduct(final Integer value) {
|
||||
setFieldByNumber(32, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setManufacturer(final Integer value) {
|
||||
setFieldByNumber(33, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setUseForSpeed(final Integer value) {
|
||||
setFieldByNumber(45, value);
|
||||
return this;
|
||||
@@ -102,6 +162,16 @@ public class FitSensorSettings extends RecordData {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setSensorType(final Integer value) {
|
||||
setFieldByNumber(52, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setProductName(final String value) {
|
||||
setFieldByNumber(91, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setMessageIndex(final Integer value) {
|
||||
setFieldByNumber(254, value);
|
||||
return this;
|
||||
|
||||
+2
-2
@@ -50,7 +50,7 @@ public class FitSleepRestlessMoments extends RecordData {
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Number[] getUnknown2() {
|
||||
public Number[] getDurations() {
|
||||
return getArrayFieldByNumber(2, Number.class);
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ public class FitSleepRestlessMoments extends RecordData {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setUnknown2(final Number[] value) {
|
||||
public Builder setDurations(final Number[] value) {
|
||||
setFieldByNumber(2, (Object[]) value);
|
||||
return this;
|
||||
}
|
||||
|
||||
+170
@@ -0,0 +1,170 @@
|
||||
/* Copyright (C) 2026 Freeyourgadget
|
||||
|
||||
This file is part of Gadgetbridge.
|
||||
|
||||
Gadgetbridge is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Gadgetbridge is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
package nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.messages;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.FitRecordDataBuilder;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.RecordData;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.RecordDefinition;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.RecordHeader;
|
||||
|
||||
/**
|
||||
* WARNING: This class was auto-generated, please avoid modifying it directly.
|
||||
* See {@link nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.codegen.FitCodeGen}
|
||||
*
|
||||
* @noinspection unused
|
||||
*/
|
||||
public class FitSplitTime extends RecordData {
|
||||
public FitSplitTime(final RecordDefinition recordDefinition, final RecordHeader recordHeader) {
|
||||
super(recordDefinition, recordHeader);
|
||||
|
||||
final int nativeNumber = recordDefinition.getNativeFITMessage().getNumber();
|
||||
if (nativeNumber != 311) {
|
||||
throw new IllegalArgumentException("FitSplitTime expects native messages of " + 311 + ", got " + nativeNumber);
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Double getTime() {
|
||||
return getFieldByNumber(0, Double.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Double getDistance() {
|
||||
return getFieldByNumber(1, Double.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Double getSplitTime() {
|
||||
return getFieldByNumber(2, Double.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Double getSplitDistance() {
|
||||
return getFieldByNumber(3, Double.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Float getSplitSpeed() {
|
||||
return getFieldByNumber(4, Float.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Double getStartPositionLat() {
|
||||
return getFieldByNumber(9, Double.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Double getStartPositionLong() {
|
||||
return getFieldByNumber(10, Double.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Double getEndPositionLat() {
|
||||
return getFieldByNumber(11, Double.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Double getEndPositionLong() {
|
||||
return getFieldByNumber(12, Double.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Double getStartAltitude() {
|
||||
return getFieldByNumber(13, Double.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Double getEndAltitude() {
|
||||
return getFieldByNumber(14, Double.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @noinspection unused
|
||||
*/
|
||||
public static class Builder extends FitRecordDataBuilder {
|
||||
public Builder() {
|
||||
super(311);
|
||||
}
|
||||
|
||||
public Builder setTime(final Double value) {
|
||||
setFieldByNumber(0, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setDistance(final Double value) {
|
||||
setFieldByNumber(1, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setSplitTime(final Double value) {
|
||||
setFieldByNumber(2, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setSplitDistance(final Double value) {
|
||||
setFieldByNumber(3, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setSplitSpeed(final Float value) {
|
||||
setFieldByNumber(4, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setStartPositionLat(final Double value) {
|
||||
setFieldByNumber(9, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setStartPositionLong(final Double value) {
|
||||
setFieldByNumber(10, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setEndPositionLat(final Double value) {
|
||||
setFieldByNumber(11, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setEndPositionLong(final Double value) {
|
||||
setFieldByNumber(12, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setStartAltitude(final Double value) {
|
||||
setFieldByNumber(13, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setEndAltitude(final Double value) {
|
||||
setFieldByNumber(14, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FitSplitTime build() {
|
||||
return (FitSplitTime) super.build();
|
||||
}
|
||||
|
||||
@Override
|
||||
public FitSplitTime build(final int localMessageType) {
|
||||
return (FitSplitTime) super.build(localMessageType);
|
||||
}
|
||||
}
|
||||
}
|
||||
+70
@@ -54,6 +54,41 @@ public class FitSport extends RecordData {
|
||||
return getFieldByNumber(3, String.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getPopularityRouting() {
|
||||
return getFieldByNumber(15, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getNavigationPrompt() {
|
||||
return getFieldByNumber(17, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getSharpBendWarnings() {
|
||||
return getFieldByNumber(18, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getWorkoutVideos() {
|
||||
return getFieldByNumber(21, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getHighTrafficRoadWarnings() {
|
||||
return getFieldByNumber(22, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getRoadHazardWarnings() {
|
||||
return getFieldByNumber(23, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getUnpavedRoadWarnings() {
|
||||
return getFieldByNumber(24, Integer.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @noinspection unused
|
||||
*/
|
||||
@@ -77,6 +112,41 @@ public class FitSport extends RecordData {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setPopularityRouting(final Integer value) {
|
||||
setFieldByNumber(15, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setNavigationPrompt(final Integer value) {
|
||||
setFieldByNumber(17, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setSharpBendWarnings(final Integer value) {
|
||||
setFieldByNumber(18, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setWorkoutVideos(final Integer value) {
|
||||
setFieldByNumber(21, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setHighTrafficRoadWarnings(final Integer value) {
|
||||
setFieldByNumber(22, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setRoadHazardWarnings(final Integer value) {
|
||||
setFieldByNumber(23, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setUnpavedRoadWarnings(final Integer value) {
|
||||
setFieldByNumber(24, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FitSport build() {
|
||||
return (FitSport) super.build();
|
||||
|
||||
+390
@@ -39,6 +39,61 @@ public class FitTrainingSettings extends RecordData {
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Float getVirtualPartnerPace() {
|
||||
return getFieldByNumber(2, Float.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getAutoLapMode() {
|
||||
return getFieldByNumber(3, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Double getAutoLapDistance() {
|
||||
return getFieldByNumber(4, Double.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getAutoPause() {
|
||||
return getFieldByNumber(7, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Float getAutoPauseThreshold() {
|
||||
return getFieldByNumber(8, Float.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getPowerAveraging() {
|
||||
return getFieldByNumber(12, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getAutoScroll() {
|
||||
return getFieldByNumber(15, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getTimerStartPrompt() {
|
||||
return getFieldByNumber(18, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Float getPoolLength() {
|
||||
return getFieldByNumber(22, Float.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getAutoSleep() {
|
||||
return getFieldByNumber(25, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getSatellites() {
|
||||
return getFieldByNumber(27, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Double getTargetDistance() {
|
||||
return getFieldByNumber(31, Double.class);
|
||||
@@ -54,6 +109,146 @@ public class FitTrainingSettings extends RecordData {
|
||||
return getFieldByNumber(33, Long.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getSpeed3D() {
|
||||
return getFieldByNumber(35, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getDistance3D() {
|
||||
return getFieldByNumber(36, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getAutoClimb() {
|
||||
return getFieldByNumber(37, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getAutoClimbInvertColors() {
|
||||
return getFieldByNumber(40, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Long getAutoClimbVerticalSpeed() {
|
||||
return getFieldByNumber(41, Long.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getAutoClimbModeSwitch() {
|
||||
return getFieldByNumber(42, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getLapKey() {
|
||||
return getFieldByNumber(46, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getWorkoutTargetAlerts() {
|
||||
return getFieldByNumber(50, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getTimerStartAuto() {
|
||||
return getFieldByNumber(51, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Float getTimerStartSpeed() {
|
||||
return getFieldByNumber(52, Float.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getSegmentAlerts() {
|
||||
return getFieldByNumber(52, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getCountdownStart() {
|
||||
return getFieldByNumber(57, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getClimbPro() {
|
||||
return getFieldByNumber(63, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getTrackConsumption() {
|
||||
return getFieldByNumber(67, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getBottleSize() {
|
||||
return getFieldByNumber(69, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getVolume() {
|
||||
return getFieldByNumber(70, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getMinimumRideDuration() {
|
||||
return getFieldByNumber(80, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getLaneNumber() {
|
||||
return getFieldByNumber(86, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getBroadcastHeartRate() {
|
||||
return getFieldByNumber(87, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getSelfEvaluation() {
|
||||
return getFieldByNumber(93, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getSpeedPro() {
|
||||
return getFieldByNumber(102, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getTouch() {
|
||||
return getFieldByNumber(103, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getRecordTemperature() {
|
||||
return getFieldByNumber(106, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getRunningPowerMode() {
|
||||
return getFieldByNumber(109, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getAccountForWind() {
|
||||
return getFieldByNumber(110, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getClimbProMode() {
|
||||
return getFieldByNumber(111, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getClimbDetection() {
|
||||
return getFieldByNumber(117, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getClimbProTerrain() {
|
||||
return getFieldByNumber(119, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Double getPreciseTargetSpeed() {
|
||||
return getFieldByNumber(153, Double.class);
|
||||
@@ -67,6 +262,61 @@ public class FitTrainingSettings extends RecordData {
|
||||
super(13);
|
||||
}
|
||||
|
||||
public Builder setVirtualPartnerPace(final Float value) {
|
||||
setFieldByNumber(2, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setAutoLapMode(final Integer value) {
|
||||
setFieldByNumber(3, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setAutoLapDistance(final Double value) {
|
||||
setFieldByNumber(4, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setAutoPause(final Integer value) {
|
||||
setFieldByNumber(7, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setAutoPauseThreshold(final Float value) {
|
||||
setFieldByNumber(8, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setPowerAveraging(final Integer value) {
|
||||
setFieldByNumber(12, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setAutoScroll(final Integer value) {
|
||||
setFieldByNumber(15, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setTimerStartPrompt(final Integer value) {
|
||||
setFieldByNumber(18, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setPoolLength(final Float value) {
|
||||
setFieldByNumber(22, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setAutoSleep(final Integer value) {
|
||||
setFieldByNumber(25, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setSatellites(final Integer value) {
|
||||
setFieldByNumber(27, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setTargetDistance(final Double value) {
|
||||
setFieldByNumber(31, value);
|
||||
return this;
|
||||
@@ -82,6 +332,146 @@ public class FitTrainingSettings extends RecordData {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setSpeed3D(final Integer value) {
|
||||
setFieldByNumber(35, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setDistance3D(final Integer value) {
|
||||
setFieldByNumber(36, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setAutoClimb(final Integer value) {
|
||||
setFieldByNumber(37, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setAutoClimbInvertColors(final Integer value) {
|
||||
setFieldByNumber(40, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setAutoClimbVerticalSpeed(final Long value) {
|
||||
setFieldByNumber(41, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setAutoClimbModeSwitch(final Integer value) {
|
||||
setFieldByNumber(42, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setLapKey(final Integer value) {
|
||||
setFieldByNumber(46, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setWorkoutTargetAlerts(final Integer value) {
|
||||
setFieldByNumber(50, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setTimerStartAuto(final Integer value) {
|
||||
setFieldByNumber(51, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setTimerStartSpeed(final Float value) {
|
||||
setFieldByNumber(52, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setSegmentAlerts(final Integer value) {
|
||||
setFieldByNumber(52, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setCountdownStart(final Integer value) {
|
||||
setFieldByNumber(57, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setClimbPro(final Integer value) {
|
||||
setFieldByNumber(63, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setTrackConsumption(final Integer value) {
|
||||
setFieldByNumber(67, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setBottleSize(final Integer value) {
|
||||
setFieldByNumber(69, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setVolume(final Integer value) {
|
||||
setFieldByNumber(70, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setMinimumRideDuration(final Integer value) {
|
||||
setFieldByNumber(80, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setLaneNumber(final Integer value) {
|
||||
setFieldByNumber(86, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setBroadcastHeartRate(final Integer value) {
|
||||
setFieldByNumber(87, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setSelfEvaluation(final Integer value) {
|
||||
setFieldByNumber(93, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setSpeedPro(final Integer value) {
|
||||
setFieldByNumber(102, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setTouch(final Integer value) {
|
||||
setFieldByNumber(103, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setRecordTemperature(final Integer value) {
|
||||
setFieldByNumber(106, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setRunningPowerMode(final Integer value) {
|
||||
setFieldByNumber(109, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setAccountForWind(final Integer value) {
|
||||
setFieldByNumber(110, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setClimbProMode(final Integer value) {
|
||||
setFieldByNumber(111, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setClimbDetection(final Integer value) {
|
||||
setFieldByNumber(117, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setClimbProTerrain(final Integer value) {
|
||||
setFieldByNumber(119, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setPreciseTargetSpeed(final Double value) {
|
||||
setFieldByNumber(153, value);
|
||||
return this;
|
||||
|
||||
+42
-2
@@ -75,7 +75,22 @@ public class FitUserMetrics extends RecordData {
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getInitialBodyBattery() {
|
||||
public Integer getLactateThresholdHeartRate() {
|
||||
return getFieldByNumber(11, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getLactateThresholdPower() {
|
||||
return getFieldByNumber(12, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Float getLactateThresholdSpeed() {
|
||||
return getFieldByNumber(13, Float.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getBeginningBodyBattery() {
|
||||
return getFieldByNumber(15, Integer.class);
|
||||
}
|
||||
|
||||
@@ -84,6 +99,11 @@ public class FitUserMetrics extends RecordData {
|
||||
return getFieldByNumber(16, Long.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Long getFirstVo2Max() {
|
||||
return getFieldByNumber(19, Long.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getBeginningPotential() {
|
||||
return getFieldByNumber(32, Integer.class);
|
||||
@@ -147,7 +167,22 @@ public class FitUserMetrics extends RecordData {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setInitialBodyBattery(final Integer value) {
|
||||
public Builder setLactateThresholdHeartRate(final Integer value) {
|
||||
setFieldByNumber(11, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setLactateThresholdPower(final Integer value) {
|
||||
setFieldByNumber(12, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setLactateThresholdSpeed(final Float value) {
|
||||
setFieldByNumber(13, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setBeginningBodyBattery(final Integer value) {
|
||||
setFieldByNumber(15, value);
|
||||
return this;
|
||||
}
|
||||
@@ -157,6 +192,11 @@ public class FitUserMetrics extends RecordData {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setFirstVo2Max(final Long value) {
|
||||
setFieldByNumber(19, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setBeginningPotential(final Integer value) {
|
||||
setFieldByNumber(32, value);
|
||||
return this;
|
||||
|
||||
+2
-2
@@ -177,7 +177,7 @@ public class FitUserProfile extends RecordData {
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Float getLtspeed() {
|
||||
public Float getLactateThresholdSpeed() {
|
||||
return getFieldByNumber(37, Float.class);
|
||||
}
|
||||
|
||||
@@ -349,7 +349,7 @@ public class FitUserProfile extends RecordData {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setLtspeed(final Float value) {
|
||||
public Builder setLactateThresholdSpeed(final Float value) {
|
||||
setFieldByNumber(37, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
+50
@@ -59,6 +59,16 @@ public class FitWorkout extends RecordData {
|
||||
return getFieldByNumber(8, String.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getDurationType() {
|
||||
return getFieldByNumber(9, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Long getDurationValue() {
|
||||
return getFieldByNumber(10, Long.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getSubSport() {
|
||||
return getFieldByNumber(11, Integer.class);
|
||||
@@ -79,6 +89,21 @@ public class FitWorkout extends RecordData {
|
||||
return getFieldByNumber(17, String.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getWorkoutIndex() {
|
||||
return getFieldByNumber(20, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Double getTime() {
|
||||
return getFieldByNumber(21, Double.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Double getDistance() {
|
||||
return getFieldByNumber(22, Double.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getMessageIndex() {
|
||||
return getFieldByNumber(254, Integer.class);
|
||||
@@ -112,6 +137,16 @@ public class FitWorkout extends RecordData {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setDurationType(final Integer value) {
|
||||
setFieldByNumber(9, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setDurationValue(final Long value) {
|
||||
setFieldByNumber(10, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setSubSport(final Integer value) {
|
||||
setFieldByNumber(11, value);
|
||||
return this;
|
||||
@@ -132,6 +167,21 @@ public class FitWorkout extends RecordData {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setWorkoutIndex(final Integer value) {
|
||||
setFieldByNumber(20, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setTime(final Double value) {
|
||||
setFieldByNumber(21, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setDistance(final Double value) {
|
||||
setFieldByNumber(22, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setMessageIndex(final Integer value) {
|
||||
setFieldByNumber(254, value);
|
||||
return this;
|
||||
|
||||
+120
@@ -0,0 +1,120 @@
|
||||
/* Copyright (C) 2026 Freeyourgadget
|
||||
|
||||
This file is part of Gadgetbridge.
|
||||
|
||||
Gadgetbridge is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Gadgetbridge is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
package nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.messages;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.FitRecordDataBuilder;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.RecordData;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.RecordDefinition;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.RecordHeader;
|
||||
|
||||
/**
|
||||
* WARNING: This class was auto-generated, please avoid modifying it directly.
|
||||
* See {@link nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.codegen.FitCodeGen}
|
||||
*
|
||||
* @noinspection unused
|
||||
*/
|
||||
public class FitWorkoutSchedule extends RecordData {
|
||||
public FitWorkoutSchedule(final RecordDefinition recordDefinition, final RecordHeader recordHeader) {
|
||||
super(recordDefinition, recordHeader);
|
||||
|
||||
final int nativeNumber = recordDefinition.getNativeFITMessage().getNumber();
|
||||
if (nativeNumber != 428) {
|
||||
throw new IllegalArgumentException("FitWorkoutSchedule expects native messages of " + 428 + ", got " + nativeNumber);
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getWorkoutIndex() {
|
||||
return getFieldByNumber(1, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getEstBenefit() {
|
||||
return getFieldByNumber(3, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Float getEstAerobicTe() {
|
||||
return getFieldByNumber(5, Float.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Float getEstAnaerTe() {
|
||||
return getFieldByNumber(6, Float.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getSport() {
|
||||
return getFieldByNumber(7, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Double getDuration() {
|
||||
return getFieldByNumber(9, Double.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @noinspection unused
|
||||
*/
|
||||
public static class Builder extends FitRecordDataBuilder {
|
||||
public Builder() {
|
||||
super(428);
|
||||
}
|
||||
|
||||
public Builder setWorkoutIndex(final Integer value) {
|
||||
setFieldByNumber(1, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setEstBenefit(final Integer value) {
|
||||
setFieldByNumber(3, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setEstAerobicTe(final Float value) {
|
||||
setFieldByNumber(5, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setEstAnaerTe(final Float value) {
|
||||
setFieldByNumber(6, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setSport(final Integer value) {
|
||||
setFieldByNumber(7, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setDuration(final Double value) {
|
||||
setFieldByNumber(9, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FitWorkoutSchedule build() {
|
||||
return (FitWorkoutSchedule) super.build();
|
||||
}
|
||||
|
||||
@Override
|
||||
public FitWorkoutSchedule build(final int localMessageType) {
|
||||
return (FitWorkoutSchedule) super.build(localMessageType);
|
||||
}
|
||||
}
|
||||
}
|
||||
+20
@@ -109,6 +109,11 @@ public class FitWorkoutStep extends RecordData {
|
||||
return getFieldByNumber(13, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getSkipLastRecover() {
|
||||
return getFieldByNumber(18, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getSecondaryTargetType() {
|
||||
return getFieldByNumber(19, Integer.class);
|
||||
@@ -129,6 +134,11 @@ public class FitWorkoutStep extends RecordData {
|
||||
return getFieldByNumber(22, Long.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getWorkoutIndex() {
|
||||
return getFieldByNumber(31, Integer.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getMessageIndex() {
|
||||
return getFieldByNumber(254, Integer.class);
|
||||
@@ -212,6 +222,11 @@ public class FitWorkoutStep extends RecordData {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setSkipLastRecover(final Integer value) {
|
||||
setFieldByNumber(18, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setSecondaryTargetType(final Integer value) {
|
||||
setFieldByNumber(19, value);
|
||||
return this;
|
||||
@@ -232,6 +247,11 @@ public class FitWorkoutStep extends RecordData {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setWorkoutIndex(final Integer value) {
|
||||
setFieldByNumber(31, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setMessageIndex(final Integer value) {
|
||||
setFieldByNumber(254, value);
|
||||
return this;
|
||||
|
||||
Reference in New Issue
Block a user