mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
Garmin Edge 1040: Initial support
This commit is contained in:
+23
@@ -0,0 +1,23 @@
|
||||
package nodomain.freeyourgadget.gadgetbridge.devices.garmin.bike;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
|
||||
public class GarminEdge1040Coordinator extends GarminBikeComputerCoordinator {
|
||||
@Override
|
||||
protected Pattern getSupportedDeviceName() {
|
||||
return Pattern.compile("^Edge 1040$");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getDeviceNameResource() {
|
||||
return R.string.devicetype_garmin_edge_1040;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBatteryCount(final GBDevice device) {
|
||||
return 0; // does not seem to report the battery %
|
||||
}
|
||||
}
|
||||
@@ -64,6 +64,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.galaxy_buds.GalaxyBuds3ProDe
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.galaxy_buds.GalaxyBudsDeviceCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.galaxy_buds.GalaxyBudsLiveDeviceCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.galaxy_buds.GalaxyBudsProDeviceCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.garmin.bike.GarminEdge1040Coordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.garmin.bike.GarminEdge130Coordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.garmin.bike.GarminEdge130PlusCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.garmin.bike.GarminEdge540Coordinator;
|
||||
@@ -608,6 +609,7 @@ public enum DeviceType {
|
||||
GARMIN_EDGE_130_PLUS(GarminEdge130PlusCoordinator.class),
|
||||
GARMIN_EDGE_540(GarminEdge540Coordinator.class),
|
||||
GARMIN_EDGE_840(GarminEdge840Coordinator.class),
|
||||
GARMIN_EDGE_1040(GarminEdge1040Coordinator.class),
|
||||
GARMIN_EDGE_EXPLORE(GarminEdgeExploreCoordinator.class),
|
||||
GARMIN_EDGE_EXPLORE_2(GarminEdgeExplore2Coordinator.class),
|
||||
GARMIN_ETREX_SE(GarminETrexSeCoordinator.class),
|
||||
|
||||
@@ -1922,6 +1922,7 @@
|
||||
<string name="devicetype_garmin_edge_130_plus" translatable="false">Garmin Edge 130 Plus</string>
|
||||
<string name="devicetype_garmin_edge_540" translatable="false">Garmin Edge 540</string>
|
||||
<string name="devicetype_garmin_edge_840" translatable="false">Garmin Edge 840</string>
|
||||
<string name="devicetype_garmin_edge_1040" translatable="false">Garmin Edge 1040</string>
|
||||
<string name="devicetype_garmin_edge_explore" translatable="false">Garmin Edge Explore</string>
|
||||
<string name="devicetype_garmin_edge_explore_2" translatable="false">Garmin Edge Explore 2</string>
|
||||
<string name="devicetype_garmin_etrex_se" translatable="false">Garmin eTrex SE</string>
|
||||
|
||||
+1
@@ -74,6 +74,7 @@ public class AbstractDeviceCoordinatorTest extends TestBase {
|
||||
put("R11_0500", DeviceType.YAWELL_R11); // #4711
|
||||
put("Edge 130", DeviceType.GARMIN_EDGE_130); // matrix
|
||||
put("Edge 840", DeviceType.GARMIN_EDGE_840); // matrix
|
||||
put("Edge 1040", DeviceType.GARMIN_EDGE_1040); // matrix
|
||||
put("Lily 2 Active", DeviceType.GARMIN_LILY_2_ACTIVE);
|
||||
put("Instinct 3 - 45mm", DeviceType.GARMIN_INSTINCT_3); // #4923
|
||||
put("Instinct E - 45mm", DeviceType.GARMIN_INSTINCT_E); // #4526
|
||||
|
||||
Reference in New Issue
Block a user