From 1e732efb043746487b54092ef467e02a2ab7a1d9 Mon Sep 17 00:00:00 2001 From: Me7c7 Date: Fri, 4 Oct 2024 17:50:10 +0300 Subject: [PATCH] Huawei: Fix altitude in the GPS parser --- .../gadgetbridge/devices/huawei/HuaweiGpsParser.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huawei/HuaweiGpsParser.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huawei/HuaweiGpsParser.java index dc4a04d8d..44cd4dca2 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huawei/HuaweiGpsParser.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huawei/HuaweiGpsParser.java @@ -89,9 +89,8 @@ public class HuaweiGpsParser { point.longitude = (lon / 6383807.0d / Math.cos(lat_start) + lon_start) / 0.017453292519943d; point.altitudeSupported = alt_support; if (alt_support) { - // TODO: not sure about this - float alt_delta = buffer.getFloat(); - alt = alt + alt_delta; + alt = buffer.getShort(); + buffer.getShort(); // Unknown values point.altitude = alt; } retv.add(point);