1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-27 20:36:51 +01:00

Amazfit T-Rex 3: Experimental support

This commit is contained in:
José Rebelo 2024-09-14 13:24:27 +01:00
parent 106f1fcdd6
commit 1f95258e0e
4 changed files with 96 additions and 0 deletions

View File

@ -70,6 +70,7 @@ public class HuamiConst {
public static final String AMAZFIT_GTR4_NAME = "Amazfit GTR 4";
public static final String AMAZFIT_GTR_MINI_NAME = "Amazfit GTR Mini";
public static final String AMAZFIT_TREX_2_NAME = "Amazfit T-Rex 2";
public static final String AMAZFIT_TREX_3_NAME = "Amazfit T-Rex 3";
public static final String AMAZFIT_TREX_ULTRA = "Amazfit T-Rex Ultra";
public static final String AMAZFIT_CHEETAH_PRO_NAME = "Amazfit Cheetah Pro";
public static final String AMAZFIT_CHEETAH_SQUARE_NAME = "Amazfit Cheetah S";

View File

@ -0,0 +1,92 @@
/* 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.huami.amazfittrex3;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
import nodomain.freeyourgadget.gadgetbridge.R;
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
import nodomain.freeyourgadget.gadgetbridge.devices.huami.zeppos.ZeppOsCoordinator;
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
public class AmazfitTRex3Coordinator extends ZeppOsCoordinator {
@Override
public boolean isExperimental() {
// Untested device
return true;
}
@Override
public String getDeviceBluetoothName() {
return HuamiConst.AMAZFIT_TREX_3_NAME;
}
@Override
public Set<Integer> getDeviceSources() {
return new HashSet<>(Arrays.asList(
8716544,
8716545, // chinese mainland version
8716547 // chinese mainland version
));
}
@Override
public int getDeviceNameResource() {
return R.string.devicetype_amazfit_trex_3;
}
@Override
public boolean supportsContinuousFindDevice() {
return true;
}
@Override
public boolean mainMenuHasMoreSection() {
return true;
}
@Override
public boolean supportsGpxUploads() {
return true;
}
@Override
public boolean supportsControlCenter() {
return true;
}
@Override
public boolean supportsToDoList() {
return true;
}
@Override
public boolean supportsWifiHotspot(final GBDevice device) {
return true;
}
@Override
public boolean supportsFtpServer(final GBDevice device) {
return true;
}
public boolean supportsBluetoothPhoneCalls(final GBDevice device) {
return true;
}
}

View File

@ -141,6 +141,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfitpop.AmazfitPopC
import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfitpoppro.AmazfitPopProCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfittrex.AmazfitTRexCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfittrex2.AmazfitTRex2Coordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfittrex3.AmazfitTRex3Coordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfittrexpro.AmazfitTRexProCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfittrexultra.AmazfitTRexUltraCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfitvergel.AmazfitVergeLCoordinator;
@ -333,6 +334,7 @@ public enum DeviceType {
AMAZFITGTS4(AmazfitGTS4Coordinator.class),
AMAZFITGTS4MINI(AmazfitGTS4MiniCoordinator.class),
AMAZFITTREX2(AmazfitTRex2Coordinator.class),
AMAZFITTREX3(AmazfitTRex3Coordinator.class),
AMAZFITGTR3PRO(AmazfitGTR3ProCoordinator.class),
AMAZFITBIP3(AmazfitBip3Coordinator.class),
AMAZFITBIP3PRO(AmazfitBip3ProCoordinator.class),

View File

@ -1677,6 +1677,7 @@
<string name="devicetype_amazfit_bip5_unity">Amazfit Bip 5 Unity</string>
<string name="devicetype_amazfit_gtr4">Amazfit GTR 4</string>
<string name="devicetype_amazfit_trex_2">Amazfit T-Rex 2</string>
<string name="devicetype_amazfit_trex_3">Amazfit T-Rex 3</string>
<string name="devicetype_amazfit_trex_ultra">Amazfit T-Rex Ultra</string>
<string name="devicetype_amazfit_band5">Amazfit Band 5</string>
<string name="devicetype_amazfit_band7">Amazfit Band 7</string>