1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-08 19:27:04 +01:00

Huawei: Fixed min and max attitude values in workouts #4044

This commit is contained in:
Me7c7 2024-08-30 18:59:40 +03:00
parent 95fdee3cbe
commit f983060cb2

View File

@ -412,11 +412,12 @@ public class HuaweiWorkoutGbParser {
int cyclingPowerCount = 0;
int avgAltitude = 0;
int altitudeCount = 0;
int minAltitude = 0;
int maxAltitude = 0;
int minAltitude = Integer.MAX_VALUE;
int maxAltitude = Integer.MIN_VALUE;
Integer previousAlt = null;
int sumAltitudeUp = 0;
int sumAltitudeDown = 0;
for (HuaweiWorkoutDataSample dataSample : dataSamples) {
if (dataSample.getSpeed() != -1) {
speed += dataSample.getSpeed();