From 9e1bf07cd20a5d47ee6556777b0b433147bf0d64 Mon Sep 17 00:00:00 2001 From: Daniele Gobbetti Date: Fri, 26 Apr 2024 08:22:39 +0200 Subject: [PATCH] Garmin: add coordinator for Instinct 2 Solar Tactical confirmed working in https://codeberg.org/Freeyourgadget/Gadgetbridge/issues/3063#issuecomment-1787762 --- .../GarminInstinct2SolTacCoordinator.java | 18 ++++++++++++++++++ .../gadgetbridge/model/DeviceType.java | 4 +++- app/src/main/res/values/strings.xml | 1 + 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/garmin/instinct2soltac/GarminInstinct2SolTacCoordinator.java diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/garmin/instinct2soltac/GarminInstinct2SolTacCoordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/garmin/instinct2soltac/GarminInstinct2SolTacCoordinator.java new file mode 100644 index 000000000..15973ab05 --- /dev/null +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/garmin/instinct2soltac/GarminInstinct2SolTacCoordinator.java @@ -0,0 +1,18 @@ +package nodomain.freeyourgadget.gadgetbridge.devices.garmin.instinct2soltac; + +import java.util.regex.Pattern; + +import nodomain.freeyourgadget.gadgetbridge.R; +import nodomain.freeyourgadget.gadgetbridge.devices.garmin.GarminCoordinator; + +public class GarminInstinct2SolTacCoordinator extends GarminCoordinator { + @Override + protected Pattern getSupportedDeviceName() { + return Pattern.compile("Instinct 2 SolTac"); + } + + @Override + public int getDeviceNameResource() { + return R.string.devicetype_garmin_instinct_2_soltac; + } +} 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 256f35cb4..73731d590 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/DeviceType.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/DeviceType.java @@ -53,6 +53,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.galaxy_buds.GalaxyBudsProDev import nodomain.freeyourgadget.gadgetbridge.devices.garmin.forerunner245.GarminForerunner245Coordinator; 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.venu3.GarminVenu3Coordinator; import nodomain.freeyourgadget.gadgetbridge.devices.garmin.vivoactive4s.GarminVivoActive4SCoordinator; import nodomain.freeyourgadget.gadgetbridge.devices.garmin.vivoactive5.GarminVivoActive5Coordinator; @@ -202,6 +203,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.xiaomi.redmismartbandpro.Red import nodomain.freeyourgadget.gadgetbridge.devices.xiaomi.redmiwatch2.RedmiWatch2Coordinator; import nodomain.freeyourgadget.gadgetbridge.devices.xiaomi.redmiwatch2lite.RedmiWatch2LiteCoordinator; import nodomain.freeyourgadget.gadgetbridge.devices.xiaomi.redmiwatch3.RedmiWatch3Coordinator; +import nodomain.freeyourgadget.gadgetbridge.devices.xiaomi.redmiwatch3active.RedmiWatch3ActiveCoordinator; import nodomain.freeyourgadget.gadgetbridge.devices.xiaomi.redmiwatch4.RedmiWatch4Coordinator; import nodomain.freeyourgadget.gadgetbridge.devices.xiaomi.watchs1.XiaomiWatchS1Coordinator; import nodomain.freeyourgadget.gadgetbridge.devices.xiaomi.watchs1active.XiaomiWatchS1ActiveCoordinator; @@ -209,7 +211,6 @@ import nodomain.freeyourgadget.gadgetbridge.devices.xiaomi.watchs1pro.XiaomiWatc import nodomain.freeyourgadget.gadgetbridge.devices.xiaomi.watchs3.XiaomiWatchS3Coordinator; import nodomain.freeyourgadget.gadgetbridge.devices.xwatch.XWatchCoordinator; import nodomain.freeyourgadget.gadgetbridge.devices.zetime.ZeTimeCoordinator; -import nodomain.freeyourgadget.gadgetbridge.devices.xiaomi.redmiwatch3active.RedmiWatch3ActiveCoordinator; /** * For every supported device, a device type constant must exist. @@ -339,6 +340,7 @@ public enum DeviceType { GARMIN_FORERUNNER_245(GarminForerunner245Coordinator.class), GARMIN_INSTINCT_2S(GarminInstinct2SCoordinator.class), GARMIN_INSTINCT_2_SOLAR(GarminInstinct2SolarCoordinator.class), + GARMIN_INSTINCT_2_SOLTAC(GarminInstinct2SolTacCoordinator.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 43968ac98..30d163da8 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1490,6 +1490,7 @@ VĂ­vomove Style Garmin Instinct 2S Garmin Instinct 2 Solar + Instinct 2 SolTac Garmin Forerunner 245 VĂ­voactive 4S Vivoactive 5