From 880c85abcfd6f30da6fe77ed7cb806227f186fa9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Rebelo?= Date: Tue, 20 Aug 2024 19:08:07 +0100 Subject: [PATCH] Garmin Venu 2S: Initial support --- .../watches/venu/GarminVenu2SCoordinator.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/venu/GarminVenu2SCoordinator.java diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/garmin/watches/venu/GarminVenu2SCoordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/garmin/watches/venu/GarminVenu2SCoordinator.java new file mode 100644 index 000000000..805f4ed1e --- /dev/null +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/garmin/watches/venu/GarminVenu2SCoordinator.java @@ -0,0 +1,18 @@ +package nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.venu; + +import java.util.regex.Pattern; + +import nodomain.freeyourgadget.gadgetbridge.R; +import nodomain.freeyourgadget.gadgetbridge.devices.garmin.GarminCoordinator; + +public class GarminVenu2SCoordinator extends GarminCoordinator { + @Override + protected Pattern getSupportedDeviceName() { + return Pattern.compile("^Venu 2S$"); + } + + @Override + public int getDeviceNameResource() { + return R.string.devicetype_garmin_venu_2s; + } +} 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 deaf79422..5342a9650 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/DeviceType.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/DeviceType.java @@ -76,6 +76,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.instinct.Garm import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.instinct.GarminInstinctCrossoverCoordinator; import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.venu.GarminVenu2Coordinator; import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.venu.GarminVenu2PlusCoordinator; +import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.venu.GarminVenu2SCoordinator; import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.venu.GarminVenu3Coordinator; import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.venu.GarminVenu3SCoordinator; import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.venu.GarminVenuCoordinator; @@ -401,6 +402,7 @@ public enum DeviceType { GARMIN_VIVOMOVE_TREND(GarminVivomoveTrendCoordinator.class), GARMIN_VENU(GarminVenuCoordinator.class), GARMIN_VENU_2(GarminVenu2Coordinator.class), + GARMIN_VENU_2S(GarminVenu2SCoordinator.class), GARMIN_VENU_2_PLUS(GarminVenu2PlusCoordinator.class), GARMIN_VENU_3(GarminVenu3Coordinator.class), GARMIN_VENU_3S(GarminVenu3SCoordinator.class), diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index de513ce79..2e2a41320 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1664,6 +1664,7 @@ Garmin Venu Garmin Venu 2 Garmin Venu 2 Plus + Garmin Venu 2S Garmin Venu 3 Garmin Venu 3S Garmin Epix Pro