1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-25 18:15:49 +01:00

Garmin: add GENERIC activity and use it for imported GPX files

This commit is contained in:
Daniele Gobbetti 2024-08-18 12:40:16 +02:00
parent 8a72bf8895
commit 51a0745b06
2 changed files with 2 additions and 1 deletions

View File

@ -21,7 +21,7 @@ import nodomain.freeyourgadget.gadgetbridge.util.gpx.model.GpxTrackSegment;
public class GpxRouteFileConverter {
private static final Logger LOG = LoggerFactory.getLogger(GpxRouteFileConverter.class);
final double speed = 1.4; // m/s // TODO: make this configurable (and activity dependent?)
final int activity = GarminSport.RUN.getType(); //TODO: make this configurable
final int activity = GarminSport.GENERIC.getType(); //TODO: make this configurable
private final long timestamp;
private final GpxFile gpxFile;
private FitFile convertedFile;

View File

@ -8,6 +8,7 @@ import nodomain.freeyourgadget.gadgetbridge.model.ActivityKind;
// Garmin API doc (https://developer.garmin.com/connect-iq/api-docs/Toybox/Activity.html)
// and FIT files
public enum GarminSport {
GENERIC(0, 0, ActivityKind.ACTIVITY),
NAVIGATE(0, 50, ActivityKind.NAVIGATE),
RUN(1, 0, ActivityKind.RUNNING),
TREADMILL(1, 1, ActivityKind.TREADMILL),