Colmi P80: Initial support

This commit is contained in:
José Rebelo
2025-08-06 21:39:15 +01:00
parent 912c0f1299
commit dd8e6533ea
3 changed files with 80 additions and 0 deletions
@@ -0,0 +1,77 @@
/* 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 java.util.regex.Pattern;
import nodomain.freeyourgadget.gadgetbridge.R;
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
public class ColmiP80Coordinator extends AbstractMoyoungDeviceCoordinator {
@Override
protected Pattern getSupportedDeviceName() {
return Pattern.compile("^P80$");
}
@Override
public int getDeviceNameResource() {
return R.string.devicetype_colmi_p80;
}
@Override
@DrawableRes
public int getDefaultIconResource() {
return R.drawable.ic_device_amazfit_bip;
}
@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;
}
@Override
public boolean supportsStressMeasurement() {
return true;
}
}
@@ -281,6 +281,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.moyoung.BlackviewR60Coordina
import nodomain.freeyourgadget.gadgetbridge.devices.moyoung.C20Coordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.moyoung.ColmiI28UltraCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.moyoung.ColmiP76Coordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.moyoung.ColmiP80Coordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.moyoung.ColmiV72Coordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.moyoung.ColmiV89Coordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.moyoung.FireBolttTalkCoordinator;
@@ -748,6 +749,7 @@ public enum DeviceType {
H59(H59Coordinator.class),
COLMI_I28_ULTRA(ColmiI28UltraCoordinator.class),
COLMI_P76(ColmiP76Coordinator.class),
COLMI_P80(ColmiP80Coordinator.class),
COLMI_V72(ColmiV72Coordinator.class),
COLMI_V89(ColmiV89Coordinator.class),
BLACKVIEW_R60(BlackviewR60Coordinator.class),
+1
View File
@@ -2089,6 +2089,7 @@
<string name="devicetype_colmi_p76" translatable="false">Colmi P76</string>
<string name="devicetype_colmi_v72" translatable="false">Colmi V72</string>
<string name="devicetype_colmi_v89" translatable="false">Colmi V89</string>
<string name="devicetype_colmi_p80" translatable="false">Colmi P80</string>
<string name="devicetype_blackview_r60" translatable="false">Blackview R60</string>
<string name="devicetype_misirun_c17" translatable="false">Misirun C17</string>
<string name="devicetype_c20" translatable="false">C20</string>