mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
Garmin GPSMAP 66s: Initial support
This commit is contained in:
+48
@@ -0,0 +1,48 @@
|
||||
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 GarminGpsmap66sCoordinator extends GarminCoordinator {
|
||||
@Override
|
||||
public boolean supportsActivityDataFetching(@NonNull final GBDevice device) {
|
||||
// for gps tracks
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsActivityTracks(@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 66S( #\\d+)?");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getDeviceNameResource() {
|
||||
return R.string.devicetype_garmin_gpsmap_66s;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DeviceKind getDeviceKind(@NonNull GBDevice device) {
|
||||
return DeviceKind.UNKNOWN;
|
||||
}
|
||||
}
|
||||
@@ -71,6 +71,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.garmin.bike.GarminEdge540Coo
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.garmin.bike.GarminEdge840Coordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.garmin.bike.GarminEdgeExplore2Coordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.garmin.bike.GarminEdgeExploreCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.garmin.gps.GarminGpsmap66sCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.garmin.hrm.GarminHrmProPlusCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.garmin.gps.GarminETrexSeCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.garmin.gps.GarminInReachMini2;
|
||||
@@ -612,6 +613,7 @@ public enum DeviceType {
|
||||
GARMIN_EDGE_1040(GarminEdge1040Coordinator.class),
|
||||
GARMIN_EDGE_EXPLORE(GarminEdgeExploreCoordinator.class),
|
||||
GARMIN_EDGE_EXPLORE_2(GarminEdgeExplore2Coordinator.class),
|
||||
GARMIN_GPSMAP_66S(GarminGpsmap66sCoordinator.class),
|
||||
GARMIN_ETREX_SE(GarminETrexSeCoordinator.class),
|
||||
GARMIN_ENDURO(GarminEnduroCoordinator.class),
|
||||
GARMIN_ENDURO_3(GarminEnduro3Coordinator.class),
|
||||
|
||||
@@ -1925,6 +1925,7 @@
|
||||
<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_gpsmap_66s" translatable="false">Garmin GPSMAP 66s</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_3" translatable="false">Garmin Enduro 3</string>
|
||||
|
||||
+2
@@ -52,6 +52,8 @@ public class AbstractDeviceCoordinatorTest extends TestBase {
|
||||
put("Forerunner 165 Music", DeviceType.GARMIN_FORERUNNER_165_MUSIC);
|
||||
put("R60", DeviceType.BLACKVIEW_R60);
|
||||
put("eTrex SE", DeviceType.GARMIN_ETREX_SE);
|
||||
put("GPSMAP 66S", DeviceType.GARMIN_GPSMAP_66S); // matrix
|
||||
put("GPSMAP 66S #1234512345", DeviceType.GARMIN_GPSMAP_66S); // matrix
|
||||
put("Instinct Tactical", DeviceType.GARMIN_INSTINCT_TACTICAL);
|
||||
put("Xiaomi Smart Band 10 8C9F", DeviceType.MIBAND10);
|
||||
put("Venu X1", DeviceType.GARMIN_VENU_X1);
|
||||
|
||||
Reference in New Issue
Block a user