1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-06-18 11:00:09 +02:00

Mijia MHO-C303: Initial support

This commit is contained in:
José Rebelo 2024-01-17 17:55:15 +00:00
parent e6aa0afa7e
commit 9095ffad8b
3 changed files with 51 additions and 0 deletions

View File

@ -0,0 +1,48 @@
/* Copyright (C) 2024 José Rebelo
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.mijia_lywsd;
import java.util.regex.Pattern;
import nodomain.freeyourgadget.gadgetbridge.R;
public class MijiaMhoC303Coordinator extends AbstractMijiaLywsdCoordinator {
@Override
protected Pattern getSupportedDeviceName() {
return Pattern.compile("MHO-C303");
}
@Override
public int getDeviceNameResource() {
return R.string.devicetype_mijia_mho_c303;
}
@Override
public int getDefaultIconResource() {
return R.drawable.ic_device_pebble;
}
@Override
public int getDisabledIconResource() {
return R.drawable.ic_device_pebble_disabled;
}
@Override
public boolean supportsSetTime() {
return true;
}
}

View File

@ -130,6 +130,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.lenovo.watchxplus.WatchXPlus
import nodomain.freeyourgadget.gadgetbridge.devices.liveview.LiveviewCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.makibeshr3.MakibesHR3Coordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.miband.MiBandCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.mijia_lywsd.MijiaMhoC303Coordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.mijia_lywsd.MijiaLywsd02Coordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.mijia_lywsd.MijiaLywsd03Coordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.miscale2.MiScale2DeviceCoordinator;
@ -284,6 +285,7 @@ public enum DeviceType {
PINETIME_JF(PineTimeJFCoordinator.class),
MIJIA_LYWSD02(MijiaLywsd02Coordinator.class),
MIJIA_LYWSD03(MijiaLywsd03Coordinator.class),
MIJIA_MHO_C303(MijiaMhoC303Coordinator.class),
LEFUN(LefunDeviceCoordinator.class),
BOHEMIC_SMART_BRACELET(BohemicSmartBraceletDeviceCoordinator.class),
SMAQ2OSS(SMAQ2OSSCoordinator.class),

View File

@ -1411,6 +1411,7 @@
<string name="devicetype_bfh16">BFH-16</string>
<string name="devicetype_mijia_lywsd02">Mijia Smart Clock</string>
<string name="devicetype_mijia_lywsd03">Mijia Temperature and Humidity Sensor 2</string>
<string name="devicetype_mijia_mho_c303">Mijia MHO-C303</string>
<string name="devicetype_makibes_hr3">Makibes HR3</string>
<string name="devicetype_banglejs">Bangle.js</string>
<string name="devicetype_tlw64">TLW64</string>