mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-27 20:36:51 +01:00
ColaCao 2021 / 2023: Initial support
Reports in #3455 and #2955 mention that everything works, except HR, which crashes the devices (they do not have an HR sensor), so we just disable HR support.
This commit is contained in:
parent
730841e9a1
commit
48e1bc1a8a
@ -67,6 +67,9 @@ vendor's servers.
|
||||
- Casio GBD-100
|
||||
- Casio GBD-200
|
||||
- Casio GBD-H1000
|
||||
- ColaCao (FitPro devices)
|
||||
- ColaCao 2023
|
||||
- ColaCao 2021
|
||||
- [Femometer Vinca II](https://codeberg.org/Freeyourgadget/Gadgetbridge/wiki/Femometer-Vinca-II)
|
||||
- [FitPro](https://codeberg.org/Freeyourgadget/Gadgetbridge/wiki/FitPro)
|
||||
- Fossil
|
||||
|
@ -40,9 +40,7 @@ import nodomain.freeyourgadget.gadgetbridge.entities.DaoSession;
|
||||
import nodomain.freeyourgadget.gadgetbridge.entities.Device;
|
||||
import nodomain.freeyourgadget.gadgetbridge.entities.FitProActivitySampleDao;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.ServiceDeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.fitpro.FitProDeviceSupport;
|
||||
|
@ -0,0 +1,56 @@
|
||||
/* Copyright (C) 2016-2023 Petr Vaněk, 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 <http://www.gnu.org/licenses/>. */
|
||||
|
||||
package nodomain.freeyourgadget.gadgetbridge.devices.fitpro.colacao;
|
||||
|
||||
import androidx.annotation.DrawableRes;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.fitpro.FitProDeviceCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
|
||||
public class ColaCao21Coordinator extends FitProDeviceCoordinator {
|
||||
@Override
|
||||
protected Pattern getSupportedDeviceName() {
|
||||
return Pattern.compile("ColaCao21");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsHeartRateMeasurement(final GBDevice device) {
|
||||
// HR requests crash the device
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@DrawableRes
|
||||
public int getDefaultIconResource() {
|
||||
return R.drawable.ic_device_amazfit_bip;
|
||||
}
|
||||
|
||||
@Override
|
||||
@DrawableRes
|
||||
public int getDisabledIconResource() {
|
||||
return R.drawable.ic_device_amazfit_bip_disabled;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getDeviceNameResource() {
|
||||
return R.string.devicetype_colacao21;
|
||||
}
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
/* Copyright (C) 2016-2023 Petr Vaněk, 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 <http://www.gnu.org/licenses/>. */
|
||||
|
||||
package nodomain.freeyourgadget.gadgetbridge.devices.fitpro.colacao;
|
||||
|
||||
import androidx.annotation.DrawableRes;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.fitpro.FitProDeviceCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
|
||||
public class ColaCao23Coordinator extends FitProDeviceCoordinator {
|
||||
@Override
|
||||
protected Pattern getSupportedDeviceName() {
|
||||
return Pattern.compile("ColaCao23");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsHeartRateMeasurement(final GBDevice device) {
|
||||
// HR requests crash the device
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@DrawableRes
|
||||
public int getDefaultIconResource() {
|
||||
return R.drawable.ic_device_amazfit_bip;
|
||||
}
|
||||
|
||||
@Override
|
||||
@DrawableRes
|
||||
public int getDisabledIconResource() {
|
||||
return R.drawable.ic_device_amazfit_bip_disabled;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getDeviceNameResource() {
|
||||
return R.string.devicetype_colacao23;
|
||||
}
|
||||
}
|
@ -34,6 +34,8 @@ import nodomain.freeyourgadget.gadgetbridge.devices.divoom.PixooCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.domyos.DomyosT540Coordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.femometer.FemometerVinca2DeviceCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.fitpro.FitProDeviceCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.fitpro.colacao.ColaCao21Coordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.fitpro.colacao.ColaCao23Coordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.flipper.zero.FlipperZeroCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.galaxy_buds.GalaxyBuds2DeviceCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.galaxy_buds.GalaxyBuds2ProDeviceCoordinator;
|
||||
@ -257,6 +259,8 @@ public enum DeviceType {
|
||||
BOHEMIC_SMART_BRACELET(BohemicSmartBraceletDeviceCoordinator.class),
|
||||
SMAQ2OSS(SMAQ2OSSCoordinator.class),
|
||||
FITPRO(FitProDeviceCoordinator.class),
|
||||
COLACAO21(ColaCao21Coordinator.class),
|
||||
COLACAO23(ColaCao23Coordinator.class),
|
||||
ITAG(ITagCoordinator.class),
|
||||
NUTMINI(NutCoordinator.class),
|
||||
VIVOMOVE_HR(VivomoveHrCoordinator.class),
|
||||
|
@ -1404,6 +1404,8 @@
|
||||
<string name="devicetype_waspos">Wasp-os</string>
|
||||
<string name="devicetype_smaq2oss">SMA-Q2 OSS</string>
|
||||
<string name="devicetype_fitpro">FitPro</string>
|
||||
<string name="devicetype_colacao21">ColaCao 2021</string>
|
||||
<string name="devicetype_colacao23">ColaCao 2023</string>
|
||||
<string name="devicetype_domyos_t540">Domyos T540</string>
|
||||
<string name="devicetype_sony_wh_1000xm2">Sony WH-1000XM2</string>
|
||||
<string name="devicetype_sony_wh_1000xm3">Sony WH-1000XM3</string>
|
||||
|
Loading…
Reference in New Issue
Block a user