Moyoung: Support the Viran C29

This commit is contained in:
Arjan Schrijver
2025-06-11 20:58:00 +02:00
parent 072dbbf5ec
commit 7ea8759ec3
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 ViranC29Coordinator extends AbstractMoyoungDeviceCoordinator {
private static final Logger LOG = LoggerFactory.getLogger(ViranC29Coordinator.class);
@Override
protected Pattern getSupportedDeviceName() {
return Pattern.compile("C29");
}
@Override
public int getDeviceNameResource() {
return R.string.devicetype_viran_c29;
}
@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 "Viran";
}
@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;
}
}
@@ -47,6 +47,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.garmin.watches.vivoactive.Ga
import nodomain.freeyourgadget.gadgetbridge.devices.huami.zeppos.watches.AmazfitBip6Coordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.moyoung.ColmiV89Coordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.moyoung.FireBolttTalkCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.moyoung.ViranC29Coordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.onemoresonoflow.OneMoreSonoFlowCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.asteroidos.AsteroidOSDeviceCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.bandwpseries.BandWPSeriesDeviceCoordinator;
@@ -682,6 +683,7 @@ public enum DeviceType {
C20(C20Coordinator.class),
KSIX_VENTURE(KsixVentureCoordinator.class),
FIREBOLTT_TALK(FireBolttTalkCoordinator.class),
VIRAN_C29(ViranC29Coordinator.class),
B_AND_W_P_SERIES(BandWPSeriesDeviceCoordinator.class),
EARFUN_AIR_S(EarFunAirSCoordinator.class),
EARFUN_AIR_PRO_4(EarFunAirPro4Coordinator.class),
+1
View File
@@ -2020,6 +2020,7 @@
<string name="devicetype_c20">C20</string>
<string name="devicetype_ksix_venture">KSIX Venture</string>
<string name="devicetype_fireboltt_talk">Fire-Boltt Talk</string>
<string name="devicetype_viran_c29">Viran C29</string>
<string name="devicetype_ultrahuma_ring_air">Ultrahuman Ring AIR</string>
<string name="devicetype_bandw_pseries">Bowers and Wilkins P series</string>
<string name="devicetype_earfun_air_s">EarFun Air S</string>