From 536ad17c4de92e0c4b0b28f05ea465e8835b9fb4 Mon Sep 17 00:00:00 2001 From: Thomas Kuehne Date: Thu, 9 Apr 2026 17:55:10 +0000 Subject: [PATCH] Garmin HRM 600: Initial support Based on feedback in #5633 --- .../garmin/hrm/GarminHrm600Coordinator.kt | 31 +++++++++++++++++++ .../gadgetbridge/model/DeviceType.java | 2 ++ app/src/main/res/values/strings.xml | 1 + .../AbstractDeviceCoordinatorTest.java | 1 + 4 files changed, 35 insertions(+) create mode 100644 app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/garmin/hrm/GarminHrm600Coordinator.kt diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/garmin/hrm/GarminHrm600Coordinator.kt b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/garmin/hrm/GarminHrm600Coordinator.kt new file mode 100644 index 0000000000..f27bbc1b00 --- /dev/null +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/garmin/hrm/GarminHrm600Coordinator.kt @@ -0,0 +1,31 @@ +/* Copyright (C) 2026 Thomas Kuehne + + 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.hrm + +import nodomain.freeyourgadget.gadgetbridge.R +import java.util.regex.Pattern + +// #5633 +class GarminHrm600Coordinator : GarminHrmProPlusCoordinator() { + override fun getSupportedDeviceName(): Pattern? { + return Pattern.compile("^HRM600:[0-9]+$") + } + + override fun getDeviceNameResource(): Int { + return R.string.devicetype_garmin_hrm_600 + } +} \ No newline at end of file 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 baac13a8ae..8e4c0899c8 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/DeviceType.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/DeviceType.java @@ -74,6 +74,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.garmin.bike.GarminEdge840Coo import nodomain.freeyourgadget.gadgetbridge.devices.garmin.bike.GarminEdgeExplore2Coordinator; import nodomain.freeyourgadget.gadgetbridge.devices.garmin.bike.GarminEdgeExploreCoordinator; import nodomain.freeyourgadget.gadgetbridge.devices.garmin.gps.GarminGpsmap66sCoordinator; +import nodomain.freeyourgadget.gadgetbridge.devices.garmin.hrm.GarminHrm600Coordinator; import nodomain.freeyourgadget.gadgetbridge.devices.garmin.hrm.GarminHrmProPlusCoordinator; import nodomain.freeyourgadget.gadgetbridge.devices.garmin.gps.GarminETrexSeCoordinator; import nodomain.freeyourgadget.gadgetbridge.devices.garmin.gps.GarminInReachMini2; @@ -632,6 +633,7 @@ public enum DeviceType { VIVOMOVE_HR(GarminVivomoveHrCoordinator.class), GARMIN_HRM_PRO_PLUS(GarminHrmProPlusCoordinator.class), GARMIN_HRM_200(GarminHrm200Coordinator.class), + GARMIN_HRM_600(GarminHrm600Coordinator.class), GARMIN_EDGE_25(GarminEdge25Coordinator.class), GARMIN_EDGE_130(GarminEdge130Coordinator.class), GARMIN_EDGE_130_PLUS(GarminEdge130PlusCoordinator.class), diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 491ab34871..378c9cedc8 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -2251,6 +2251,7 @@ Coospo HW9 Coospo HW807 Garmin HRM 200 + Garmin HRM 600 Coospo H9Z SolarFlow Braun iCheck 7 BPW4500 diff --git a/app/src/test/java/nodomain/freeyourgadget/gadgetbridge/devices/AbstractDeviceCoordinatorTest.java b/app/src/test/java/nodomain/freeyourgadget/gadgetbridge/devices/AbstractDeviceCoordinatorTest.java index aa81327d61..e60aec3987 100644 --- a/app/src/test/java/nodomain/freeyourgadget/gadgetbridge/devices/AbstractDeviceCoordinatorTest.java +++ b/app/src/test/java/nodomain/freeyourgadget/gadgetbridge/devices/AbstractDeviceCoordinatorTest.java @@ -167,6 +167,7 @@ public class AbstractDeviceCoordinatorTest extends TestBase { put("CASIO STB-1000", DeviceType.CASIOGB6900); // #1902 put("Amazfit Bip 3 Pro", DeviceType.AMAZFITBIP3PRO); // #3249 put("Redmi Band Pro AB01", DeviceType.REDMISMARTBANDPRO); // #3069 + put("HRM600:1234", DeviceType.GARMIN_HRM_600); // #5633 put("HRMPro+:123456", DeviceType.GARMIN_HRM_PRO_PLUS); // #5364 put("Instinct 2S Solar", DeviceType.GARMIN_INSTINCT_2S_SOLAR); // #3063 put("LE_WH-1000XM5", DeviceType.SONY_WH_1000XM5); // #2969