From 1882ee947e42497d1f6ec5a76404ea85356db440 Mon Sep 17 00:00:00 2001 From: "Martin.JM" Date: Mon, 28 Oct 2024 11:44:17 +0100 Subject: [PATCH] Huawei: Improve distanceCm --- .../freeyourgadget/gadgetbridge/daogen/GBDaoGenerator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GBDaoGenerator/src/nodomain/freeyourgadget/gadgetbridge/daogen/GBDaoGenerator.java b/GBDaoGenerator/src/nodomain/freeyourgadget/gadgetbridge/daogen/GBDaoGenerator.java index d121dfd2f..d29953ac7 100644 --- a/GBDaoGenerator/src/nodomain/freeyourgadget/gadgetbridge/daogen/GBDaoGenerator.java +++ b/GBDaoGenerator/src/nodomain/freeyourgadget/gadgetbridge/daogen/GBDaoGenerator.java @@ -1336,7 +1336,7 @@ public class GBDaoGenerator { activitySample.addIntProperty("distance").notNull().codeBeforeGetter( "@Override\n" + " public int getDistanceCm() {\n" + - " return getDistance() * 100;\n" + + " return getDistance() == HuaweiActivitySample.NOT_MEASURED ? HuaweiActivitySample.NOT_MEASURED : getDistance() * 100;\n" + " }\n" ); activitySample.addIntProperty("spo").notNull();