From 22eebf9592f5ac0ecd1d84ba2ed7a30e856a0bae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Rebelo?= Date: Fri, 25 Oct 2024 18:18:41 +0100 Subject: [PATCH] Garmin Fenix 7: Initial support --- CHANGELOG.md | 2 +- .../watches/fenix/GarminFenix7Coordinator.java | 18 ++++++++++++++++++ .../gadgetbridge/model/DeviceType.java | 2 ++ app/src/main/res/values/strings.xml | 1 + 4 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/garmin/watches/fenix/GarminFenix7Coordinator.java diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b8cae4cf..2157cee13 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ * Initial support for Anker Soundcore Liberty 4 NC * Initial support for CMF Buds Pro 2 / Watch Pro 2 * Initial support for Colmi R02/R03/R06/R10 smart rings -* Initial support for Garmin Enduro 3, Fenix 5/5 Plus/5X Plus/6/6S Sapphire/8, Forerunner 165/255/255S Music/245 Music/265S/955/965, Venu/Venu Sq/Venu Sq 2/Venu 2S, Vivoactive 3, Vivomove Trend, Vivosport +* Initial support for Garmin Enduro 3, Fenix 5/5 Plus/5X Plus/6/6S Sapphire/7/8, Forerunner 165/255/255S Music/245 Music/265S/955/965, Venu/Venu Sq/Venu Sq 2/Venu 2S, Vivoactive 3, Vivomove Trend, Vivosport * Initial support for Huawei Watch 3 / 3 Pro / 4 Pro / D2 / GT 3 SE / GT 5 / GT 5 Pro / GT Cyber / GT Runner * Initial support for Honor Watch GS 3 / Watch GS Pro * Initial support for IKEA desk controller diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/garmin/watches/fenix/GarminFenix7Coordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/garmin/watches/fenix/GarminFenix7Coordinator.java new file mode 100644 index 000000000..f5cde5960 --- /dev/null +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/garmin/watches/fenix/GarminFenix7Coordinator.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 GarminFenix7Coordinator extends GarminCoordinator { + @Override + protected Pattern getSupportedDeviceName() { + return Pattern.compile("^fenix 7$"); + } + + @Override + public int getDeviceNameResource() { + return R.string.devicetype_garmin_fenix_7; + } +} 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 f92b9dc1b..2287d851d 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/DeviceType.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/DeviceType.java @@ -63,6 +63,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.fenix.GarminF import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.fenix.GarminFenix6Coordinator; import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.fenix.GarminFenix6SSapphireCoordinator; import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.fenix.GarminFenix6SapphireCoordinator; +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.GarminFenix8Coordinator; @@ -418,6 +419,7 @@ public enum DeviceType { GARMIN_FENIX_6(GarminFenix6Coordinator.class), GARMIN_FENIX_6_SAPPHIRE(GarminFenix6SapphireCoordinator.class), GARMIN_FENIX_6S_SAPPHIRE(GarminFenix6SSapphireCoordinator.class), + GARMIN_FENIX_7(GarminFenix7Coordinator.class), GARMIN_FENIX_7S(GarminFenix7SCoordinator.class), GARMIN_FENIX_7_PRO(GarminFenix7ProCoordinator.class), GARMIN_FENIX_8(GarminFenix8Coordinator.class), diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index e821358ce..c78e5eee9 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1737,6 +1737,7 @@ Garmin Fenix 6 Garmin Fenix 6 Sapphire Garmin Fenix 6S Sapphire + Garmin Fenix 7 Garmin Fenix 7S Garmin Fenix 7 Pro Garmin Fenix 8