1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-23 17:17:46 +01:00

Huawei: Add Huawei Watch GT Cyber gadget

This commit is contained in:
Vitaliy Tomin 2024-10-04 23:36:45 +08:00 committed by José Rebelo
parent 1e732efb04
commit feb7b36b3e
4 changed files with 45 additions and 0 deletions

View File

@ -69,6 +69,7 @@ public final class HuaweiConstants {
public static final String HU_WATCHGT3SE_NAME = "huawei watch gt 3 se-";
public static final String HU_WATCHGT3PRO_NAME = "huawei watch gt 3 pro-";
public static final String HU_WATCHGTRUNNER_NAME = "huawei watch gt runner-";
public static final String HU_WATCHGTCYBER_NAME = "huawei watch gt cyber-";
public static final String HU_WATCH3_NAME = "huawei watch 3-";
public static final String HU_WATCH3PRO_NAME = "huawei watch 3 pro-";
public static final String HU_WATCHGT4_NAME = "huawei watch gt 4-";

View File

@ -0,0 +1,41 @@
/* Copyright (C) 2024 Vitalii Tomin
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.huaweiwatchgtcyber;
import java.util.regex.Pattern;
import nodomain.freeyourgadget.gadgetbridge.R;
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.HuaweiBRCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.HuaweiConstants;
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
public class HuaweiWatchGTCyberCoordinator extends HuaweiBRCoordinator {
@Override
public DeviceType getDeviceType() {
return DeviceType.HUAWEIWATCHGTCYBER;
}
@Override
protected Pattern getSupportedDeviceName() {
return Pattern.compile("(" + HuaweiConstants.HU_WATCHGTCYBER_NAME + ").*", Pattern.CASE_INSENSITIVE);
}
@Override
public int getDeviceNameResource() {
return R.string.devicetype_huawei_watchgtcyber;
}
}

View File

@ -184,6 +184,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiwatchgt2e.Huawe
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiwatchgt3.HuaweiWatchGT3Coordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiwatchgt4.HuaweiWatchGT4Coordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiwatchgt5.HuaweiWatchGT5Coordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiwatchgtcyber.HuaweiWatchGTCyberCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiwatchgtrunner.HuaweiWatchGTRunnerCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiwatchultimate.HuaweiWatchUltimateCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.id115.ID115Coordinator;
@ -499,6 +500,7 @@ public enum DeviceType {
HUAWEIWATCHGT4(HuaweiWatchGT4Coordinator.class),
HUAWEIWATCHGT5(HuaweiWatchGT5Coordinator.class),
HUAWEIWATCHGTRUNNER(HuaweiWatchGTRunnerCoordinator.class),
HUAWEIWATCHGTCYBER(HuaweiWatchGTCyberCoordinator.class),
HUAWEIBAND8(HuaweiBand8Coordinator.class),
HUAWEIBAND9(HuaweiBand9Coordinator.class),
HUAWEIWATCHFIT(HuaweiWatchFitCoordinator.class),

View File

@ -1840,6 +1840,7 @@
<string name="devicetype_huawei_watchgt4">Huawei Watch GT 4</string>
<string name="devicetype_huawei_watchgt5">Huawei Watch GT 5 (Pro)</string>
<string name="devicetype_huawei_watchgtrunner">Huawei Watch GT Runner</string>
<string name="devicetype_huawei_watchgtcyber">Huawei Watch GT Cyber</string>
<string name="devicetype_huawei_watchfit">Huawei Watch Fit</string>
<string name="devicetype_huawei_watchfit2">Huawei Watch Fit 2</string>
<string name="devicetype_huawei_watchfit3">Huawei Watch Fit 3</string>