From 9a5272313914414598a4af1f5b5d6b2961a23425 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Rebelo?= Date: Mon, 20 Jan 2025 13:24:12 +0000 Subject: [PATCH] Garmin Instinct E: Initial support --- .../instinct/GarminInstinctECoordinator.java | 18 ++++++++++++++++++ .../gadgetbridge/model/DeviceType.java | 2 ++ app/src/main/res/values/strings.xml | 1 + 3 files changed, 21 insertions(+) create mode 100644 app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/garmin/watches/instinct/GarminInstinctECoordinator.java diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/garmin/watches/instinct/GarminInstinctECoordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/garmin/watches/instinct/GarminInstinctECoordinator.java new file mode 100644 index 000000000..fd247f66c --- /dev/null +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/garmin/watches/instinct/GarminInstinctECoordinator.java @@ -0,0 +1,18 @@ +package nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.instinct; + +import java.util.regex.Pattern; + +import nodomain.freeyourgadget.gadgetbridge.R; +import nodomain.freeyourgadget.gadgetbridge.devices.garmin.GarminCoordinator; + +public class GarminInstinctECoordinator extends GarminCoordinator { + @Override + protected Pattern getSupportedDeviceName() { + return Pattern.compile("^Instinct E - \\d+mm$"); + } + + @Override + public int getDeviceNameResource() { + return R.string.devicetype_garmin_instinct_e; + } +} 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 71ba233fe..305672195 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/DeviceType.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/DeviceType.java @@ -97,6 +97,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.instinct.Garm import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.instinct.GarminInstinct2XSolarCoordinator; import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.instinct.GarminInstinctCoordinator; import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.instinct.GarminInstinctCrossoverCoordinator; +import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.instinct.GarminInstinctECoordinator; import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.instinct.GarminInstinctSolarCoordinator; import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.swim.GarminSwim2Coordinator; import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.venu.GarminVenu2Coordinator; @@ -488,6 +489,7 @@ public enum DeviceType { GARMIN_INSTINCT_2_SOLAR(GarminInstinct2SolarCoordinator.class), GARMIN_INSTINCT_2_SOLTAC(GarminInstinct2SolTacCoordinator.class), GARMIN_INSTINCT_CROSSOVER(GarminInstinctCrossoverCoordinator.class), + GARMIN_INSTINCT_E(GarminInstinctECoordinator.class), GARMIN_VIVOMOVE_STYLE(GarminVivomoveStyleCoordinator.class), GARMIN_VIVOMOVE_TREND(GarminVivomoveTrendCoordinator.class), GARMIN_VENU(GarminVenuCoordinator.class), diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 7d31a2615..e23f9f523 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1778,6 +1778,7 @@ Garmin Instinct 2 Solar Garmin Instinct 2 SolTac Garmin Instinct Crossover + Garmin Instinct E Garmin Forerunner 45 Garmin Forerunner 55 Garmin Forerunner 165