1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-23 02:16:48 +01:00

Garmin: Fix weather temperature conversion to celsius

This commit is contained in:
José Rebelo 2024-11-19 20:57:04 +00:00
parent 9d1a57b6c2
commit 6b5c5ae0ac
2 changed files with 3 additions and 1 deletions

View File

@ -6,6 +6,7 @@ import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit.baseTypes
public class FieldDefinitionTemperature extends FieldDefinition {
public FieldDefinitionTemperature(int localNumber, int size, BaseType baseType, String name) {
// #4313 - We do a "wrong" conversion to celsius on purpose
super(localNumber, size, baseType, name, 1, -273);
}

View File

@ -273,7 +273,8 @@ public class WeatherHandler {
return new WeatherValue(kelvin, "KELVIN");
case "CELSIUS":
default:
return new WeatherValue(kelvin - 273.15, "CELSIUS");
// #4313 - We do a "wrong" conversion to celsius on purpose
return new WeatherValue(kelvin - 273, "CELSIUS");
}
}