From 5a025d8d99c426a74061b958017480d1ada10c71 Mon Sep 17 00:00:00 2001 From: Me7c7 Date: Tue, 26 Nov 2024 18:16:36 +0200 Subject: [PATCH] Huawei: Display maximum oxygen uptake if available --- .../service/devices/huawei/HuaweiWorkoutGbParser.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huawei/HuaweiWorkoutGbParser.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huawei/HuaweiWorkoutGbParser.java index 2323c0485..09e8266fe 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huawei/HuaweiWorkoutGbParser.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huawei/HuaweiWorkoutGbParser.java @@ -430,6 +430,12 @@ public class HuaweiWorkoutGbParser implements ActivitySummaryParser { summaryData.add(ActivitySummaryEntries.SWIM_STYLE, getSwimStyle(summary.getSwimType())); } + if(summary.getMaxMET() > 0) { + int value = (int) (((float) summary.getMaxMET() * 3.5f)) / 65536; + summaryData.add(ActivitySummaryEntries.MAXIMUM_OXYGEN_UPTAKE, value, ActivitySummaryEntries.UNIT_ML_KG_MIN); + } + + Integer summaryMinAltitude = summary.getMinAltitude(); Integer summaryMaxAltitude = summary.getMaxAltitude(); Integer elevationGain = summary.getElevationGain();