mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-06-02 11:26:09 +02:00
4363f94661
This commit takes aims to bring many new garmin devices up to a working status, with basic functionalities such as: - garmin protocol initialization - basic message exchange - support for some messages in Garmin own format - support for some messages in protobuf format
48 lines
1.4 KiB
Java
48 lines
1.4 KiB
Java
package nodomain.freeyourgadget.gadgetbridge.devices.garmin.instinct2s;
|
|
|
|
import androidx.annotation.NonNull;
|
|
|
|
import java.util.regex.Pattern;
|
|
|
|
import nodomain.freeyourgadget.gadgetbridge.GBException;
|
|
import nodomain.freeyourgadget.gadgetbridge.R;
|
|
import nodomain.freeyourgadget.gadgetbridge.devices.AbstractBLEDeviceCoordinator;
|
|
import nodomain.freeyourgadget.gadgetbridge.entities.DaoSession;
|
|
import nodomain.freeyourgadget.gadgetbridge.entities.Device;
|
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
|
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.GarminSupport;
|
|
|
|
public class GarminInstinct2SCoordinator extends AbstractBLEDeviceCoordinator {
|
|
@Override
|
|
protected void deleteDevice(@NonNull GBDevice gbDevice, @NonNull Device device, @NonNull DaoSession session) throws GBException {
|
|
|
|
}
|
|
|
|
@Override
|
|
protected Pattern getSupportedDeviceName() {
|
|
return Pattern.compile("Instinct 2S");
|
|
}
|
|
|
|
@Override
|
|
public String getManufacturer() {
|
|
return "Garmin";
|
|
}
|
|
|
|
@NonNull
|
|
@Override
|
|
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
|
return GarminSupport.class;
|
|
}
|
|
|
|
@Override
|
|
public int getDeviceNameResource() {
|
|
return R.string.devicetype_garmin_instinct_2s;
|
|
}
|
|
|
|
@Override
|
|
public boolean supportsFindDevice() {
|
|
return true;
|
|
}
|
|
}
|