mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
Huawei Band 11: Initial support
This commit is contained in:
+1
@@ -73,6 +73,7 @@ public final class HuaweiConstants {
|
||||
public static final String HU_BAND8_NAME = "huawei band 8-";
|
||||
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_BAND11_NAME = "huawei band 11-";
|
||||
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_WATCHGT3SE_NAME = "huawei watch gt 3 se-";
|
||||
|
||||
-5
@@ -27,11 +27,6 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huawei.HuaweiLECoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
|
||||
public class HuaweiBand10Coordinator extends HuaweiLECoordinator {
|
||||
@Override
|
||||
public boolean isExperimental() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Pattern getSupportedDeviceName() {
|
||||
return Pattern.compile(HuaweiConstants.HU_BAND10_NAME + ".*", Pattern.CASE_INSENSITIVE);
|
||||
|
||||
+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.huaweiband11;
|
||||
|
||||
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 HuaweiBand11Coordinator extends HuaweiLECoordinator {
|
||||
@Override
|
||||
protected Pattern getSupportedDeviceName() {
|
||||
return Pattern.compile(HuaweiConstants.HU_BAND11_NAME + ".*", Pattern.CASE_INSENSITIVE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getDeviceNameResource() {
|
||||
return R.string.devicetype_huawei_band11;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DeviceKind getDeviceKind(@NonNull GBDevice device) {
|
||||
return DeviceKind.FITNESS_BAND;
|
||||
}
|
||||
}
|
||||
@@ -272,6 +272,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huawei.honorwatch4.HonorWatc
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.honorwatchgs3.HonorWatchGS3Coordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.honorwatchgspro.HonorWatchGSProCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiband10.HuaweiBand10Coordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiband11.HuaweiBand11Coordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiband2pro.HuaweiBand2ProCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiband3pro.HuaweiBand3ProCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiband4pro.HuaweiBand4ProCoordinator;
|
||||
@@ -809,6 +810,7 @@ public enum DeviceType {
|
||||
HUAWEIBAND8(HuaweiBand8Coordinator.class),
|
||||
HUAWEIBAND9(HuaweiBand9Coordinator.class),
|
||||
HUAWEIBAND10(HuaweiBand10Coordinator.class),
|
||||
HUAWEIBAND11(HuaweiBand11Coordinator.class),
|
||||
HUAWEIWATCHFIT(HuaweiWatchFitCoordinator.class),
|
||||
HUAWEIWATCHFIT2(HuaweiWatchFit2Coordinator.class),
|
||||
HUAWEIWATCHFIT3(HuaweiWatchFit3Coordinator.class),
|
||||
|
||||
@@ -2116,6 +2116,7 @@
|
||||
<string name="devicetype_huawei_band8" translatable="false">Huawei Band 8</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_band11" translatable="false">Huawei Band 11</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_band3pro" translatable="false">Huawei Band 3 (Pro)</string>
|
||||
|
||||
+1
@@ -67,6 +67,7 @@ public class AbstractDeviceCoordinatorTest extends TestBase {
|
||||
put("Redmi Buds 6 Pro", DeviceType.REDMIBUDS6PRO);
|
||||
put("Xiaomi Watch S4 AB01", DeviceType.XIAOMI_WATCH_S4);
|
||||
put("HUAWEI WATCH FIT 4 Pro-CC6", DeviceType.HUAWEIWATCHFIT4PRO);
|
||||
put("HUAWEI Band 11-CEF", DeviceType.HUAWEIBAND11); // #5839
|
||||
put("Edge Explore", DeviceType.GARMIN_EDGE_EXPLORE); // #4855
|
||||
put("Edge Explore 2", DeviceType.GARMIN_EDGE_EXPLORE_2); // #4855
|
||||
put("Redmi Smart Band 3 CCF1", DeviceType.REDMISMARTBAND3);
|
||||
|
||||
Reference in New Issue
Block a user