Moyoung: Initial support for HC96

This commit is contained in:
José Rebelo
2025-09-05 23:23:59 +01:00
parent cb97c37a31
commit 8e69a0645b
4 changed files with 77 additions and 0 deletions
@@ -0,0 +1,73 @@
/* 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 androidx.annotation.NonNull;
import java.util.regex.Pattern;
import nodomain.freeyourgadget.gadgetbridge.R;
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
public class HC96Coordinator extends AbstractMoyoungDeviceCoordinator {
@Override
protected Pattern getSupportedDeviceName() {
return Pattern.compile("^HC96$");
}
@Override
public int getDeviceNameResource() {
return R.string.devicetype_hc96;
}
@Override
@DrawableRes
public int getDefaultIconResource() {
return R.drawable.ic_device_miwatch;
}
@Override
public String getManufacturer() {
return "Unspecified";
}
@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(@NonNull GBDevice device) {
return true;
}
}
@@ -288,6 +288,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.moyoung.ColmiV72Coordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.moyoung.ColmiV76Coordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.moyoung.ColmiV89Coordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.moyoung.FireBolttTalkCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.moyoung.HC96Coordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.moyoung.KT80Coordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.moyoung.KsixVentureCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.moyoung.MisirunC17Coordinator;
@@ -766,6 +767,7 @@ public enum DeviceType {
BLACKVIEW_R60(BlackviewR60Coordinator.class),
MISIRUN_C17(MisirunC17Coordinator.class),
C20(C20Coordinator.class),
HC96(HC96Coordinator.class),
KT80(KT80Coordinator.class),
KSIX_VENTURE(KsixVentureCoordinator.class),
FIREBOLTT_TALK(FireBolttTalkCoordinator.class),
+1
View File
@@ -2096,6 +2096,7 @@
<string name="devicetype_misirun_c17" translatable="false">Misirun C17</string>
<string name="devicetype_c20" translatable="false">C20</string>
<string name="devicetype_kt80" translatable="false">KT80</string>
<string name="devicetype_hc96" translatable="false">HC96</string>
<string name="devicetype_ksix_venture" translatable="false">KSIX Venture</string>
<string name="devicetype_fireboltt_talk" translatable="false">Fire-Boltt Talk</string>
<string name="devicetype_viran_c29" translatable="false">Viran C29</string>
@@ -47,6 +47,7 @@ public class AbstractDeviceCoordinatorTest extends TestBase {
put("Amazfit T-Rex Ultra", DeviceType.AMAZFITTREXULTRA);
put("Xiaomi Smart Band 7", DeviceType.MIBAND7);
put("Xiaomi Band 9 Active AB01", DeviceType.MIBAND9ACTIVE);
put("HC96", DeviceType.HC96);
put("P8", DeviceType.WASPOS);
put("P8DFU", DeviceType.WASPOS);
put("P80", DeviceType.COLMI_P80);