mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
Huawei Band 11 Pro: Initial support
This commit is contained in:
+1
@@ -75,6 +75,7 @@ public final class HuaweiConstants {
|
|||||||
public static final String HU_BAND9_NAME = "huawei band 9-";
|
public static final String HU_BAND9_NAME = "huawei band 9-";
|
||||||
public static final String HU_BAND10_NAME = "huawei band 10-";
|
public static final String HU_BAND10_NAME = "huawei band 10-";
|
||||||
public static final String HU_BAND11_NAME = "huawei band 11-";
|
public static final String HU_BAND11_NAME = "huawei band 11-";
|
||||||
|
public static final String HU_BAND11PRO_NAME = "huawei band 11 pro-";
|
||||||
public static final String HU_WATCHD2_NAME = "huawei watch d2-";
|
public static final String HU_WATCHD2_NAME = "huawei watch d2-";
|
||||||
public static final String HU_WATCHGT3_NAME = "huawei watch gt 3-";
|
public static final String HU_WATCHGT3_NAME = "huawei watch gt 3-";
|
||||||
public static final String HU_WATCHGT3SE_NAME = "huawei watch gt 3 se-";
|
public static final String HU_WATCHGT3SE_NAME = "huawei watch gt 3 se-";
|
||||||
|
|||||||
+43
@@ -0,0 +1,43 @@
|
|||||||
|
/* Copyright (C) 2024 Damien Gaignon, Martin.JM
|
||||||
|
|
||||||
|
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 <https://www.gnu.org/licenses/>. */
|
||||||
|
package nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiband11pro;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||||
|
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.HuaweiConstants;
|
||||||
|
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.HuaweiLECoordinator;
|
||||||
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||||
|
|
||||||
|
public class HuaweiBand11ProCoordinator extends HuaweiLECoordinator {
|
||||||
|
@Override
|
||||||
|
protected Pattern getSupportedDeviceName() {
|
||||||
|
return Pattern.compile(HuaweiConstants.HU_BAND11PRO_NAME + ".*", Pattern.CASE_INSENSITIVE);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getDeviceNameResource() {
|
||||||
|
return R.string.devicetype_huawei_band11pro;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DeviceKind getDeviceKind(@NonNull GBDevice device) {
|
||||||
|
return DeviceKind.FITNESS_BAND;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -280,6 +280,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huawei.honorwatchgs3.HonorWa
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.honorwatchgspro.HonorWatchGSProCoordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.honorwatchgspro.HonorWatchGSProCoordinator;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiband10.HuaweiBand10Coordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiband10.HuaweiBand10Coordinator;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiband11.HuaweiBand11Coordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiband11.HuaweiBand11Coordinator;
|
||||||
|
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiband11pro.HuaweiBand11ProCoordinator;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiband2pro.HuaweiBand2ProCoordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiband2pro.HuaweiBand2ProCoordinator;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiband3pro.HuaweiBand3ProCoordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiband3pro.HuaweiBand3ProCoordinator;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiband4pro.HuaweiBand4ProCoordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiband4pro.HuaweiBand4ProCoordinator;
|
||||||
@@ -827,6 +828,7 @@ public enum DeviceType {
|
|||||||
HUAWEIBAND9(HuaweiBand9Coordinator.class),
|
HUAWEIBAND9(HuaweiBand9Coordinator.class),
|
||||||
HUAWEIBAND10(HuaweiBand10Coordinator.class),
|
HUAWEIBAND10(HuaweiBand10Coordinator.class),
|
||||||
HUAWEIBAND11(HuaweiBand11Coordinator.class),
|
HUAWEIBAND11(HuaweiBand11Coordinator.class),
|
||||||
|
HUAWEIBAND11PRO(HuaweiBand11ProCoordinator.class),
|
||||||
HUAWEIWATCHFIT(HuaweiWatchFitCoordinator.class),
|
HUAWEIWATCHFIT(HuaweiWatchFitCoordinator.class),
|
||||||
HUAWEIWATCHFIT2(HuaweiWatchFit2Coordinator.class),
|
HUAWEIWATCHFIT2(HuaweiWatchFit2Coordinator.class),
|
||||||
HUAWEIWATCHFIT3(HuaweiWatchFit3Coordinator.class),
|
HUAWEIWATCHFIT3(HuaweiWatchFit3Coordinator.class),
|
||||||
|
|||||||
@@ -2144,6 +2144,7 @@
|
|||||||
<string name="devicetype_huawei_band9" translatable="false">Huawei Band 9</string>
|
<string name="devicetype_huawei_band9" translatable="false">Huawei Band 9</string>
|
||||||
<string name="devicetype_huawei_band10" translatable="false">Huawei Band 10</string>
|
<string name="devicetype_huawei_band10" translatable="false">Huawei Band 10</string>
|
||||||
<string name="devicetype_huawei_band11" translatable="false">Huawei Band 11</string>
|
<string name="devicetype_huawei_band11" translatable="false">Huawei Band 11</string>
|
||||||
|
<string name="devicetype_huawei_band11pro" translatable="false">Huawei Band 11 Pro</string>
|
||||||
<string name="devicetype_huawei_watch_gt" translatable="false">Huawei Watch GT</string>
|
<string name="devicetype_huawei_watch_gt" translatable="false">Huawei Watch GT</string>
|
||||||
<string name="devicetype_huawei_band2pro" translatable="false">Huawei Band 2 (Pro)</string>
|
<string name="devicetype_huawei_band2pro" translatable="false">Huawei Band 2 (Pro)</string>
|
||||||
<string name="devicetype_huawei_band3pro" translatable="false">Huawei Band 3 (Pro)</string>
|
<string name="devicetype_huawei_band3pro" translatable="false">Huawei Band 3 (Pro)</string>
|
||||||
|
|||||||
+1
@@ -72,6 +72,7 @@ public class AbstractDeviceCoordinatorTest extends TestBase {
|
|||||||
put("Xiaomi Watch S4 AB01", DeviceType.XIAOMI_WATCH_S4);
|
put("Xiaomi Watch S4 AB01", DeviceType.XIAOMI_WATCH_S4);
|
||||||
put("HUAWEI WATCH FIT 4 Pro-CC6", DeviceType.HUAWEIWATCHFIT4PRO);
|
put("HUAWEI WATCH FIT 4 Pro-CC6", DeviceType.HUAWEIWATCHFIT4PRO);
|
||||||
put("HUAWEI Band 11-CEF", DeviceType.HUAWEIBAND11); // #5839
|
put("HUAWEI Band 11-CEF", DeviceType.HUAWEIBAND11); // #5839
|
||||||
|
put("HUAWEI Band 11 Pro-C5A", DeviceType.HUAWEIBAND11PRO); // #5989
|
||||||
put("Edge Explore", DeviceType.GARMIN_EDGE_EXPLORE); // #4855
|
put("Edge Explore", DeviceType.GARMIN_EDGE_EXPLORE); // #4855
|
||||||
put("Edge Explore 2", DeviceType.GARMIN_EDGE_EXPLORE_2); // #4855
|
put("Edge Explore 2", DeviceType.GARMIN_EDGE_EXPLORE_2); // #4855
|
||||||
put("Redmi Smart Band 3 CCF1", DeviceType.REDMISMARTBAND3);
|
put("Redmi Smart Band 3 CCF1", DeviceType.REDMISMARTBAND3);
|
||||||
|
|||||||
Reference in New Issue
Block a user