diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/moyoung/MisirunC17Coordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/moyoung/MisirunC17Coordinator.java new file mode 100644 index 000000000..48397c4b6 --- /dev/null +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/moyoung/MisirunC17Coordinator.java @@ -0,0 +1,63 @@ +/* Copyright (C) 2024 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 . */ +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 MisirunC17Coordinator extends AbstractMoyoungDeviceCoordinator { + private static final Logger LOG = LoggerFactory.getLogger(MisirunC17Coordinator.class); + + @Override + protected Pattern getSupportedDeviceName() { + return Pattern.compile("C17"); + } + + @Override + public int getDeviceNameResource() { + return R.string.devicetype_misirun_c17; + } + + + @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 "Misirun"; + } + + @Override + public int getMtu() { + return 508; + } +} \ No newline at end of file diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/DeviceType.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/DeviceType.java index 7860627b6..6cfb76957 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/DeviceType.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/DeviceType.java @@ -229,6 +229,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.miscale.MiCompositionScaleCo import nodomain.freeyourgadget.gadgetbridge.devices.miscale.MiSmartScaleCoordinator; import nodomain.freeyourgadget.gadgetbridge.devices.moondrop.MoondropSpaceTravelCoordinator; import nodomain.freeyourgadget.gadgetbridge.devices.moyoung.ColmiI28UltraCoordinator; +import nodomain.freeyourgadget.gadgetbridge.devices.moyoung.MisirunC17Coordinator; import nodomain.freeyourgadget.gadgetbridge.devices.no1f1.No1F1Coordinator; import nodomain.freeyourgadget.gadgetbridge.devices.nothing.CmfBudsPro2Coordinator; import nodomain.freeyourgadget.gadgetbridge.devices.nothing.Ear1Coordinator; @@ -588,6 +589,7 @@ public enum DeviceType { COLMI_R09(ColmiR09Coordinator.class), COLMI_R10(ColmiR10Coordinator.class), COLMI_I28_ULTRA(ColmiI28UltraCoordinator.class), + MISIRUN_C17(MisirunC17Coordinator.class), B_AND_W_P_SERIES(BandWPSeriesDeviceCoordinator.class), SCANNABLE(ScannableDeviceCoordinator.class), CYCLING_SENSOR(CyclingSensorCoordinator.class), diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 9dcd08f64..2c4419dcd 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1918,6 +1918,7 @@ Colmi R09 Colmi R10 Colmi i28 Ultra + Misirun C17 Bowers and Wilkins P series Choose export location General