From 03eb3031819af732740a83c774ee60a826549df6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Rebelo?= Date: Thu, 12 Dec 2024 18:14:25 +0000 Subject: [PATCH] Garmin Fenix 7X: Initial support --- .../fenix/GarminFenix7XCoordinator.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/fenix/GarminFenix7XCoordinator.java diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/garmin/watches/fenix/GarminFenix7XCoordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/garmin/watches/fenix/GarminFenix7XCoordinator.java new file mode 100644 index 000000000..9b43ab21b --- /dev/null +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/garmin/watches/fenix/GarminFenix7XCoordinator.java @@ -0,0 +1,18 @@ +package nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.fenix; + +import java.util.regex.Pattern; + +import nodomain.freeyourgadget.gadgetbridge.R; +import nodomain.freeyourgadget.gadgetbridge.devices.garmin.GarminCoordinator; + +public class GarminFenix7XCoordinator extends GarminCoordinator { + @Override + protected Pattern getSupportedDeviceName() { + return Pattern.compile("^fenix 7X$"); + } + + @Override + public int getDeviceNameResource() { + return R.string.devicetype_garmin_fenix_7x; + } +} 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 16c3d75a7..adc227398 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/DeviceType.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/DeviceType.java @@ -69,6 +69,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.fenix.GarminF import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.fenix.GarminFenix7Coordinator; import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.fenix.GarminFenix7ProCoordinator; import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.fenix.GarminFenix7SCoordinator; +import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.fenix.GarminFenix7XCoordinator; import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.fenix.GarminFenix8Coordinator; import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.forerunner.GarminForerunner165Coordinator; import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.forerunner.GarminForerunner235Coordinator; @@ -442,6 +443,7 @@ public enum DeviceType { GARMIN_FENIX_6S_SAPPHIRE(GarminFenix6SSapphireCoordinator.class), GARMIN_FENIX_7(GarminFenix7Coordinator.class), GARMIN_FENIX_7S(GarminFenix7SCoordinator.class), + GARMIN_FENIX_7X(GarminFenix7XCoordinator.class), GARMIN_FENIX_7_PRO(GarminFenix7ProCoordinator.class), GARMIN_FENIX_8(GarminFenix8Coordinator.class), GARMIN_FORERUNNER_55(GarminForerunner55Coordinator.class), diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index d641e3a98..2f1a28c93 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1755,6 +1755,7 @@ Garmin Fenix 6S Sapphire Garmin Fenix 7 Garmin Fenix 7S + Garmin Fenix 7X Garmin Fenix 7 Pro Garmin Fenix 8 Garmin Instinct