mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-09 03:37:03 +01:00
Garmin: add GENERIC activity and use it for imported GPX files
This commit is contained in:
parent
8a72bf8895
commit
51a0745b06
@ -21,7 +21,7 @@ import nodomain.freeyourgadget.gadgetbridge.util.gpx.model.GpxTrackSegment;
|
|||||||
public class GpxRouteFileConverter {
|
public class GpxRouteFileConverter {
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(GpxRouteFileConverter.class);
|
private static final Logger LOG = LoggerFactory.getLogger(GpxRouteFileConverter.class);
|
||||||
final double speed = 1.4; // m/s // TODO: make this configurable (and activity dependent?)
|
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 long timestamp;
|
||||||
private final GpxFile gpxFile;
|
private final GpxFile gpxFile;
|
||||||
private FitFile convertedFile;
|
private FitFile convertedFile;
|
||||||
|
@ -8,6 +8,7 @@ import nodomain.freeyourgadget.gadgetbridge.model.ActivityKind;
|
|||||||
// Garmin API doc (https://developer.garmin.com/connect-iq/api-docs/Toybox/Activity.html)
|
// Garmin API doc (https://developer.garmin.com/connect-iq/api-docs/Toybox/Activity.html)
|
||||||
// and FIT files
|
// and FIT files
|
||||||
public enum GarminSport {
|
public enum GarminSport {
|
||||||
|
GENERIC(0, 0, ActivityKind.ACTIVITY),
|
||||||
NAVIGATE(0, 50, ActivityKind.NAVIGATE),
|
NAVIGATE(0, 50, ActivityKind.NAVIGATE),
|
||||||
RUN(1, 0, ActivityKind.RUNNING),
|
RUN(1, 0, ActivityKind.RUNNING),
|
||||||
TREADMILL(1, 1, ActivityKind.TREADMILL),
|
TREADMILL(1, 1, ActivityKind.TREADMILL),
|
||||||
|
Loading…
Reference in New Issue
Block a user