Y6 (GloryFit): Initial support

This commit is contained in:
José Rebelo
2026-03-16 23:12:44 +00:00
parent fde8563b4a
commit 66d1cd34f8
4 changed files with 45 additions and 0 deletions
@@ -0,0 +1,41 @@
/* Copyright (C) 2026 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.gloryfit.watches
import nodomain.freeyourgadget.gadgetbridge.R
import nodomain.freeyourgadget.gadgetbridge.devices.gloryfit.GloryFitCoordinator
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice
import java.util.regex.Pattern
class Y6Coordinator : GloryFitCoordinator() {
override fun getManufacturer(): String {
return "GloryFit"
}
override fun getSupportedDeviceName(): Pattern? {
return Pattern.compile("^Y6\\(ID-[0-9A-F]{4}\\)$")
}
override fun getDeviceNameResource(): Int {
return R.string.devicetype_y6
}
override fun getAlarmSlotCount(device: GBDevice): Int {
// 8 slots, but alarms from app are not supported
return 0
}
}
@@ -187,6 +187,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.gloryfit.watches.R1Coordinat
import nodomain.freeyourgadget.gadgetbridge.devices.gloryfit.watches.QecnatoS10Coordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.gloryfit.watches.S52Coordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.gloryfit.watches.Y66Coordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.gloryfit.watches.Y6Coordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.gree.GreeAcCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.hama.fit6900.HamaFit6900DeviceCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.hplus.EXRIZUK8Coordinator;
@@ -843,6 +844,7 @@ public enum DeviceType {
HAYLOU_WATCH_2_PRO(HaylouWatch2ProCoordinator.class),
S52(S52Coordinator.class),
D3(D3Coordinator.class),
Y6(Y6Coordinator.class),
Y66(Y66Coordinator.class),
REALME_BUDS_T110(RealmeBudsT110Coordinator.class),
REALME_BUDS_T100(RealmeBudsT100Coordinator.class),
+1
View File
@@ -4437,6 +4437,7 @@
<string name="service_notification_collector_service_text">Monitoring notifications in background</string>
<string name="devicetype_imiki_frame_2" translatable="false">IMIKI Frame 2</string>
<string name="devicetype_oukitel_bt103" translatable="false">Oukitel BT103</string>
<string name="devicetype_y6" translatable="false">Y6</string>
<string name="devicetype_y66" translatable="false">Y66</string>
<string name="devicetype_d3" translatable="false">D3</string>
<string name="devicetype_s52" translatable="false">S52</string>
@@ -41,6 +41,7 @@ public class AbstractDeviceCoordinatorTest extends TestBase {
put("R1(ID-10B5)", DeviceType.R1); // #5621
put("IMIKI FRAME 2", DeviceType.IMIKI_FRAME_2);
put("HAYLOU Watch 2 Pro", DeviceType.HAYLOU_WATCH_2_PRO);
put("Y6(ID-28A8)", DeviceType.Y6); // #3949
put("Y66(ID-AB01)", DeviceType.Y66);
put("D3(ID-417F)", DeviceType.D3);
put("S10", DeviceType.QECNATO_S10);