mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-24 17:45:50 +01:00
Garmin: Fix weather temperature conversion to celsius
This commit is contained in:
parent
9d1a57b6c2
commit
6b5c5ae0ac
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user