Moyoung: Support the Colmi V72

This commit is contained in:
Arjan Schrijver
2025-06-11 20:58:00 +02:00
parent 4e1cb5fbc9
commit 09ac4d3884
3 changed files with 86 additions and 0 deletions
@@ -0,0 +1,83 @@
/* Copyright (C) 2025 Arjan Schrijver
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.moyoung;
import androidx.annotation.DrawableRes;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.regex.Pattern;
import nodomain.freeyourgadget.gadgetbridge.R;
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
public class ColmiV72Coordinator extends AbstractMoyoungDeviceCoordinator {
private static final Logger LOG = LoggerFactory.getLogger(ColmiV72Coordinator.class);
@Override
protected Pattern getSupportedDeviceName() {
return Pattern.compile("^V72$");
}
@Override
public int getDeviceNameResource() {
return R.string.devicetype_colmi_v72;
}
@Override
@DrawableRes
public int getDefaultIconResource() {
return R.drawable.ic_device_miwatch;
}
@Override
@DrawableRes
public int getDisabledIconResource() {
return R.drawable.ic_device_miwatch_disabled;
}
@Override
public String getManufacturer() {
return "Colmi";
}
@Override
public int getMtu() {
return 508;
}
@Override
public int getAlarmSlotCount(GBDevice device) {
return 8;
}
@Override
public int getWorldClocksSlotCount() {
return 6;
}
@Override
public int getWorldClocksLabelLength() {
return 30;
}
@Override
public boolean supportsRemSleep() {
return true;
}
}
@@ -36,6 +36,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huawei.freebuds6.HuaweiFreeb
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiwatch5.HuaweiWatch5Coordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiwatchfit4pro.HuaweiWatchFit4ProCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.moyoung.AdvanWatchSE1AICoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.moyoung.ColmiV72Coordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.oppo.OppoEncoBuds2Coordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.pixel.PixelBudsACoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.polar.PolarH10DeviceCoordinator;
@@ -682,6 +683,7 @@ public enum DeviceType {
COLMI_R10(ColmiR10Coordinator.class),
COLMI_R12(ColmiR12Coordinator.class),
COLMI_I28_ULTRA(ColmiI28UltraCoordinator.class),
COLMI_V72(ColmiV72Coordinator.class),
COLMI_V89(ColmiV89Coordinator.class),
MISIRUN_C17(MisirunC17Coordinator.class),
C20(C20Coordinator.class),
+1
View File
@@ -2015,6 +2015,7 @@
<string name="devicetype_colmi_r10">Colmi R10</string>
<string name="devicetype_colmi_r12">Colmi R12</string>
<string name="devicetype_colmi_i28_ultra">Colmi i28 Ultra</string>
<string name="devicetype_colmi_v72">Colmi V72</string>
<string name="devicetype_colmi_v89">Colmi V89</string>
<string name="devicetype_misirun_c17">Misirun C17</string>
<string name="devicetype_c20">C20</string>