Moyoung: Support the R50Pro

This commit is contained in:
Arjan Schrijver
2025-06-11 20:58:00 +02:00
parent 945b62f9c7
commit 9aab704fe7
3 changed files with 65 additions and 0 deletions
@@ -0,0 +1,62 @@
/* 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;
public class R50ProCoordinator extends AbstractMoyoungDeviceCoordinator {
private static final Logger LOG = LoggerFactory.getLogger(R50ProCoordinator.class);
@Override
protected Pattern getSupportedDeviceName() {
return Pattern.compile("R50Pro");
}
@Override
public int getDeviceNameResource() {
return R.string.devicetype_r50pro;
}
@Override
@DrawableRes
public int getDefaultIconResource() {
return R.drawable.ic_device_banglejs;
}
@Override
@DrawableRes
public int getDisabledIconResource() {
return R.drawable.ic_device_banglejs_disabled;
}
@Override
public String getManufacturer() {
return "Unspecified";
}
@Override
public int getMtu() {
return 508;
}
}
@@ -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.R50ProCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.moyoung.ViranC29Coordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.onemoresonoflow.OneMoreSonoFlowCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.asteroidos.AsteroidOSDeviceCoordinator;
@@ -684,6 +685,7 @@ public enum DeviceType {
KSIX_VENTURE(KsixVentureCoordinator.class),
FIREBOLTT_TALK(FireBolttTalkCoordinator.class),
VIRAN_C29(ViranC29Coordinator.class),
R50PRO(R50ProCoordinator.class),
B_AND_W_P_SERIES(BandWPSeriesDeviceCoordinator.class),
EARFUN_AIR_S(EarFunAirSCoordinator.class),
EARFUN_AIR_PRO_4(EarFunAirPro4Coordinator.class),
+1
View File
@@ -2021,6 +2021,7 @@
<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_r50pro">R50Pro</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>