Skip to content

Commit d2b2694

Browse files
committed
Fixed Kelvin to Celsius Conversion
Adjusted conversion to subtract 273.15 instead of 272.15.
1 parent 35d36fb commit d2b2694

File tree

1 file changed

+1
-1
lines changed
  • com.androidthermostat.server/src/com/androidthermostat/server/data

1 file changed

+1
-1
lines changed

com.androidthermostat.server/src/com/androidthermostat/server/data/Conditions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public void updateWeather()
124124
if (resp.main.temp>0)
125125
{
126126
success = true;
127-
double celcius = resp.main.temp - 272.15;
127+
double celcius = resp.main.temp - 273.15;
128128
this.outsideTemperature = Math.round(celcius * 9.0 / 5.0 + 32);
129129
this.weatherForecastUrl = Settings.getCurrent().getForecastUrl().replace("[postalCode]", String.valueOf(Settings.getCurrent().getLocation()) );
130130

0 commit comments

Comments
 (0)