From b6468db13cde55e7f7e9d896ac9b38e5c008773b Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Tue, 30 Apr 2024 21:23:02 +0200 Subject: [PATCH] Garmin: add coordinator for Instinct Crossover --- .../GarminInstinctCrossoverCoordinator.java | 19 +++++++++++++++++++ .../gadgetbridge/model/DeviceType.java | 2 ++ app/src/main/res/values/strings.xml | 1 + 3 files changed, 22 insertions(+) create mode 100644 app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/garmin/instinctcrossover/GarminInstinctCrossoverCoordinator.java diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/garmin/instinctcrossover/GarminInstinctCrossoverCoordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/garmin/instinctcrossover/GarminInstinctCrossoverCoordinator.java new file mode 100644 index 000000000..3446c61c7 --- /dev/null +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/garmin/instinctcrossover/GarminInstinctCrossoverCoordinator.java @@ -0,0 +1,19 @@ +package nodomain.freeyourgadget.gadgetbridge.devices.garmin.instinctcrossover; + +import nodomain.freeyourgadget.gadgetbridge.R; +import nodomain.freeyourgadget.gadgetbridge.devices.garmin.GarminCoordinator; +import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice; + +import java.util.regex.Pattern; + +public class GarminInstinctCrossoverCoordinator extends GarminCoordinator { + @Override + protected Pattern getSupportedDeviceName() { + return Pattern.compile("Instinct Crossover"); + } + + @Override + public int getDeviceNameResource() { + return R.string.devicetype_garmin_instinct_crossover; + } +} diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/DeviceType.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/DeviceType.java index 7e473c0d1..d6d0fde01 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/DeviceType.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/DeviceType.java @@ -55,6 +55,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.garmin.instinctsolar.GarminI import nodomain.freeyourgadget.gadgetbridge.devices.garmin.instinct2s.GarminInstinct2SCoordinator; import nodomain.freeyourgadget.gadgetbridge.devices.garmin.instinct2solar.GarminInstinct2SolarCoordinator; import nodomain.freeyourgadget.gadgetbridge.devices.garmin.instinct2soltac.GarminInstinct2SolTacCoordinator; +import nodomain.freeyourgadget.gadgetbridge.devices.garmin.instinctcrossover.GarminInstinctCrossoverCoordinator; import nodomain.freeyourgadget.gadgetbridge.devices.garmin.venu3.GarminVenu3Coordinator; import nodomain.freeyourgadget.gadgetbridge.devices.garmin.vivoactive4s.GarminVivoActive4SCoordinator; import nodomain.freeyourgadget.gadgetbridge.devices.garmin.vivoactive5.GarminVivoActive5Coordinator; @@ -343,6 +344,7 @@ public enum DeviceType { GARMIN_INSTINCT_2S(GarminInstinct2SCoordinator.class), GARMIN_INSTINCT_2_SOLAR(GarminInstinct2SolarCoordinator.class), GARMIN_INSTINCT_2_SOLTAC(GarminInstinct2SolTacCoordinator.class), + GARMIN_INSTINCT_CROSSOVER(GarminInstinctCrossoverCoordinator.class), GARMIN_VIVOMOVE_STYLE(GarminVivomoveStyleCoordinator.class), GARMIN_VENU_3(GarminVenu3Coordinator.class), GARMIN_VIVOACTIVE_4S(GarminVivoActive4SCoordinator.class), diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 200790cb7..8cdea014c 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1492,6 +1492,7 @@ Garmin Instinct 2S Garmin Instinct 2 Solar Instinct 2 SolTac + Instinct Crossover Garmin Forerunner 245 VĂ­voactive 4S Vivoactive 5