From 810df3055c1b2a1697b4ee1f40569d324f1abbb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Rebelo?= Date: Sun, 10 Nov 2024 22:33:48 +0000 Subject: [PATCH] Garmin Forerunner 55/620: Initial support --- .../GarminForerunner55Coordinator.java | 34 +++++++++++++++++++ .../GarminForerunner620Coordinator.java | 34 +++++++++++++++++++ .../gadgetbridge/model/DeviceType.java | 4 +++ app/src/main/res/values/strings.xml | 2 ++ 4 files changed, 74 insertions(+) create mode 100644 app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/garmin/watches/forerunner/GarminForerunner55Coordinator.java create mode 100644 app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/garmin/watches/forerunner/GarminForerunner620Coordinator.java diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/garmin/watches/forerunner/GarminForerunner55Coordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/garmin/watches/forerunner/GarminForerunner55Coordinator.java new file mode 100644 index 000000000..090c9aec5 --- /dev/null +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/garmin/watches/forerunner/GarminForerunner55Coordinator.java @@ -0,0 +1,34 @@ +/* Copyright (C) 2024 José Rebelo + + This file is part of Gadgetbridge. + + Gadgetbridge is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Gadgetbridge is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . */ +package nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.forerunner; + +import java.util.regex.Pattern; + +import nodomain.freeyourgadget.gadgetbridge.R; +import nodomain.freeyourgadget.gadgetbridge.devices.garmin.GarminCoordinator; + +public class GarminForerunner55Coordinator extends GarminCoordinator { + @Override + protected Pattern getSupportedDeviceName() { + return Pattern.compile("^Forerunner 55$"); + } + + @Override + public int getDeviceNameResource() { + return R.string.devicetype_garmin_forerunner_55; + } +} diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/garmin/watches/forerunner/GarminForerunner620Coordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/garmin/watches/forerunner/GarminForerunner620Coordinator.java new file mode 100644 index 000000000..c679bb503 --- /dev/null +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/garmin/watches/forerunner/GarminForerunner620Coordinator.java @@ -0,0 +1,34 @@ +/* Copyright (C) 2024 José Rebelo + + This file is part of Gadgetbridge. + + Gadgetbridge is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Gadgetbridge is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . */ +package nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.forerunner; + +import java.util.regex.Pattern; + +import nodomain.freeyourgadget.gadgetbridge.R; +import nodomain.freeyourgadget.gadgetbridge.devices.garmin.GarminCoordinator; + +public class GarminForerunner620Coordinator extends GarminCoordinator { + @Override + protected Pattern getSupportedDeviceName() { + return Pattern.compile("^Forerunner 620$"); + } + + @Override + public int getDeviceNameResource() { + return R.string.devicetype_garmin_forerunner_620; + } +} 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 fc98d6621..c97a90d52 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/DeviceType.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/DeviceType.java @@ -79,6 +79,8 @@ import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.forerunner.Ga import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.forerunner.GarminForerunner255SMusicCoordinator; import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.forerunner.GarminForerunner265Coordinator; import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.forerunner.GarminForerunner265SCoordinator; +import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.forerunner.GarminForerunner55Coordinator; +import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.forerunner.GarminForerunner620Coordinator; import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.forerunner.GarminForerunner955Coordinator; import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.forerunner.GarminForerunner965Coordinator; import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.instinct.GarminInstinct2SCoordinator; @@ -430,6 +432,7 @@ public enum DeviceType { GARMIN_FENIX_7S(GarminFenix7SCoordinator.class), GARMIN_FENIX_7_PRO(GarminFenix7ProCoordinator.class), GARMIN_FENIX_8(GarminFenix8Coordinator.class), + GARMIN_FORERUNNER_55(GarminForerunner55Coordinator.class), GARMIN_FORERUNNER_165(GarminForerunner165Coordinator.class), GARMIN_FORERUNNER_235(GarminForerunner235Coordinator.class), GARMIN_FORERUNNER_245(GarminForerunner245Coordinator.class), @@ -440,6 +443,7 @@ public enum DeviceType { GARMIN_FORERUNNER_255S_MUSIC(GarminForerunner255SMusicCoordinator.class), GARMIN_FORERUNNER_265(GarminForerunner265Coordinator.class), GARMIN_FORERUNNER_265S(GarminForerunner265SCoordinator.class), + GARMIN_FORERUNNER_620(GarminForerunner620Coordinator.class), GARMIN_FORERUNNER_955(GarminForerunner955Coordinator.class), GARMIN_FORERUNNER_965(GarminForerunner965Coordinator.class), GARMIN_SWIM_2(GarminSwim2Coordinator.class), diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 74f941a89..e71d47f23 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1751,6 +1751,7 @@ Garmin Instinct 2 Solar Garmin Instinct 2 SolTac Garmin Instinct Crossover + Garmin Forerunner 55 Garmin Forerunner 165 Garmin Forerunner 235 Garmin Forerunner 245 @@ -1761,6 +1762,7 @@ Garmin Forerunner 255S Music Garmin Forerunner 265 Garmin Forerunner 265S + Garmin Forerunner 620 Garmin Forerunner 955 Garmin Forerunner 965 Garmin Swim 2