From ef50599179f23d122d5311297b28388fa550833d Mon Sep 17 00:00:00 2001 From: Hasan Ammar Date: Sun, 23 Oct 2022 23:09:29 -0400 Subject: [PATCH] Skagen Gen 6 Hybrid HR: Add support for 38mm watches. Tested against https://www.watchstation.com/en-ca/products/jorn-38mm-gen-6-hybrid-smartwatch---silver-stainless-steel-mesh/SKT3301.html --- .../devices/qhybrid/adapter/WatchAdapter.java | 1 + .../qhybrid/adapter/WatchAdapterFactory.java | 1 + .../qhybrid/adapter/fossil/FossilWatchAdapter.java | 14 +++++--------- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/qhybrid/adapter/WatchAdapter.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/qhybrid/adapter/WatchAdapter.java index 0c19165e1..c8e90d5d4 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/qhybrid/adapter/WatchAdapter.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/qhybrid/adapter/WatchAdapter.java @@ -84,6 +84,7 @@ public abstract class WatchAdapter { return "Hybrid HR"; case "DN.1.0": return "Hybrid HR Collider"; + case "WA.0.0": case "VA.0.0": return "Fossil Gen. 6 Hybrid"; } diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/qhybrid/adapter/WatchAdapterFactory.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/qhybrid/adapter/WatchAdapterFactory.java index 6905aa8ae..57c2e8597 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/qhybrid/adapter/WatchAdapterFactory.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/qhybrid/adapter/WatchAdapterFactory.java @@ -27,6 +27,7 @@ public final class WatchAdapterFactory { if(hardwareVersion == '1') return new FossilHRWatchAdapter(deviceSupport); if(firmwareVersion.startsWith("IV0")) return new FossilHRWatchAdapter(deviceSupport); if(firmwareVersion.startsWith("VA")) return new FossilHRWatchAdapter(deviceSupport); + if(firmwareVersion.startsWith("WA")) return new FossilHRWatchAdapter(deviceSupport); char major = firmwareVersion.charAt(6); switch (major){ diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/qhybrid/adapter/fossil/FossilWatchAdapter.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/qhybrid/adapter/fossil/FossilWatchAdapter.java index 90f4eb754..27c839fd2 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/qhybrid/adapter/fossil/FossilWatchAdapter.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/qhybrid/adapter/fossil/FossilWatchAdapter.java @@ -503,15 +503,13 @@ public class FossilWatchAdapter extends WatchAdapter { String modelNumber = getDeviceSupport().getDevice().getModel(); switch (modelNumber) { case "HW.0.0": + case "IV.0.0": + case "DN.1.0": + case "WA.0.0": + case "VA.0.0": return true; case "HL.0.0": return false; - case "IV.0.0": - return true; - case "DN.1.0": - return true; - case "VA.0.0": - return true; } throw new UnsupportedOperationException("model " + modelNumber + " not supported"); } @@ -523,11 +521,9 @@ public class FossilWatchAdapter extends WatchAdapter { case "HW.0.0": return true; case "HL.0.0": - return false; case "IV.0.0": - return false; case "DN.1.0": - return false; + case "WA.0.0": case "VA.0.0": return false; }