mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
Garmin GPSMAP H1: Initial support
This commit is contained in:
-5
@@ -50,9 +50,4 @@ public class GarminGpsmap66sCoordinator extends GarminCoordinator {
|
|||||||
public boolean supportsTrainingLoad(@NonNull final GBDevice device) {
|
public boolean supportsTrainingLoad(@NonNull final GBDevice device) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean supportsVO2Max(@NonNull final GBDevice device) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
+53
@@ -0,0 +1,53 @@
|
|||||||
|
package nodomain.freeyourgadget.gadgetbridge.devices.garmin.gps;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||||
|
import nodomain.freeyourgadget.gadgetbridge.devices.garmin.GarminCoordinator;
|
||||||
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||||
|
|
||||||
|
public class GarminGpsmapH1Coordinator extends GarminCoordinator {
|
||||||
|
@Override
|
||||||
|
public boolean supportsDataFetching(@NonNull final GBDevice device) {
|
||||||
|
// for gps tracks
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean supportsRecordedActivities(@NonNull final GBDevice device) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean supportsWeather(@NonNull final GBDevice device) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getBatteryCount(final GBDevice device) {
|
||||||
|
// does not seem to report the battery %
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Pattern getSupportedDeviceName() {
|
||||||
|
return Pattern.compile("^GPSMAP H1$");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getDeviceNameResource() {
|
||||||
|
return R.string.devicetype_garmin_gpsmap_h1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DeviceKind getDeviceKind(@NonNull GBDevice device) {
|
||||||
|
return DeviceKind.UNKNOWN;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean supportsTrainingLoad(@NonNull final GBDevice device) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -75,6 +75,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.garmin.bike.GarminEdge840Coo
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.devices.garmin.bike.GarminEdgeExplore2Coordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.garmin.bike.GarminEdgeExplore2Coordinator;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.garmin.bike.GarminEdgeExploreCoordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.garmin.bike.GarminEdgeExploreCoordinator;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.garmin.gps.GarminGpsmap66sCoordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.garmin.gps.GarminGpsmap66sCoordinator;
|
||||||
|
import nodomain.freeyourgadget.gadgetbridge.devices.garmin.gps.GarminGpsmapH1Coordinator;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.garmin.hrm.GarminHrm600Coordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.garmin.hrm.GarminHrm600Coordinator;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.garmin.hrm.GarminHrmProPlusCoordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.garmin.hrm.GarminHrmProPlusCoordinator;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.garmin.gps.GarminETrexSeCoordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.garmin.gps.GarminETrexSeCoordinator;
|
||||||
@@ -672,6 +673,7 @@ public enum DeviceType {
|
|||||||
GARMIN_EDGE_EXPLORE(GarminEdgeExploreCoordinator.class),
|
GARMIN_EDGE_EXPLORE(GarminEdgeExploreCoordinator.class),
|
||||||
GARMIN_EDGE_EXPLORE_2(GarminEdgeExplore2Coordinator.class),
|
GARMIN_EDGE_EXPLORE_2(GarminEdgeExplore2Coordinator.class),
|
||||||
GARMIN_GPSMAP_66S(GarminGpsmap66sCoordinator.class),
|
GARMIN_GPSMAP_66S(GarminGpsmap66sCoordinator.class),
|
||||||
|
GARMIN_GPSMAP_H1(GarminGpsmapH1Coordinator.class),
|
||||||
GARMIN_ETREX_SE(GarminETrexSeCoordinator.class),
|
GARMIN_ETREX_SE(GarminETrexSeCoordinator.class),
|
||||||
GARMIN_ENDURO(GarminEnduroCoordinator.class),
|
GARMIN_ENDURO(GarminEnduroCoordinator.class),
|
||||||
GARMIN_ENDURO_3(GarminEnduro3Coordinator.class),
|
GARMIN_ENDURO_3(GarminEnduro3Coordinator.class),
|
||||||
|
|||||||
@@ -1985,6 +1985,7 @@
|
|||||||
<string name="devicetype_garmin_edge_explore" translatable="false">Garmin Edge Explore</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_edge_explore_2" translatable="false">Garmin Edge Explore 2</string>
|
||||||
<string name="devicetype_garmin_gpsmap_66s" translatable="false">Garmin GPSMAP 66s</string>
|
<string name="devicetype_garmin_gpsmap_66s" translatable="false">Garmin GPSMAP 66s</string>
|
||||||
|
<string name="devicetype_garmin_gpsmap_h1" translatable="false">Garmin GPSMAP H1</string>
|
||||||
<string name="devicetype_garmin_etrex_se" translatable="false">Garmin eTrex SE</string>
|
<string name="devicetype_garmin_etrex_se" translatable="false">Garmin eTrex SE</string>
|
||||||
<string name="devicetype_garmin_enduro" translatable="false">Garmin Enduro</string>
|
<string name="devicetype_garmin_enduro" translatable="false">Garmin Enduro</string>
|
||||||
<string name="devicetype_garmin_enduro_3" translatable="false">Garmin Enduro 3</string>
|
<string name="devicetype_garmin_enduro_3" translatable="false">Garmin Enduro 3</string>
|
||||||
|
|||||||
+1
@@ -57,6 +57,7 @@ public class AbstractDeviceCoordinatorTest extends TestBase {
|
|||||||
put("Forerunner 165 Music", DeviceType.GARMIN_FORERUNNER_165_MUSIC);
|
put("Forerunner 165 Music", DeviceType.GARMIN_FORERUNNER_165_MUSIC);
|
||||||
put("R60", DeviceType.BLACKVIEW_R60);
|
put("R60", DeviceType.BLACKVIEW_R60);
|
||||||
put("eTrex SE", DeviceType.GARMIN_ETREX_SE);
|
put("eTrex SE", DeviceType.GARMIN_ETREX_SE);
|
||||||
|
put("GPSMAP H1", DeviceType.GARMIN_GPSMAP_H1); // #6122
|
||||||
put("GPSMAP 66S", DeviceType.GARMIN_GPSMAP_66S); // matrix
|
put("GPSMAP 66S", DeviceType.GARMIN_GPSMAP_66S); // matrix
|
||||||
put("GPSMAP 66S #1234512345", DeviceType.GARMIN_GPSMAP_66S); // matrix
|
put("GPSMAP 66S #1234512345", DeviceType.GARMIN_GPSMAP_66S); // matrix
|
||||||
put("Instinct Tactical", DeviceType.GARMIN_INSTINCT_TACTICAL);
|
put("Instinct Tactical", DeviceType.GARMIN_INSTINCT_TACTICAL);
|
||||||
|
|||||||
Reference in New Issue
Block a user