@@ -33,6 +33,9 @@ public class Conditions {
33
33
34
34
private Bitmap weatherImage = null ;
35
35
public int insideTempRaw =0 ;
36
+ public double lastLoggedInsideTemp = 0 ;
37
+
38
+
36
39
public String debugMessage = "" ;
37
40
38
41
private Context context ;
@@ -124,7 +127,6 @@ public void updateWeather()
124
127
//this.weatherImageUrl = resp.img;
125
128
//this.weatherImage = BitmapFactory.decodeStream((InputStream)new URL(weatherImageUrl).getContent());
126
129
//this.weatherForecastUrl = "http://www.weather.com/weather/right-now/" + Settings.getCurrent().getZipCode();
127
-
128
130
}
129
131
130
132
if (previousTemp !=Conditions .getCurrent ().getOutsideTemperature () && success )
@@ -147,7 +149,7 @@ public void updateArduino()
147
149
Settings s = Settings .getCurrent ();
148
150
FurnaceController fc = FurnaceController .getCurrent ();
149
151
150
- double previousTemp = Conditions .getCurrent ().insideTemperature ;
152
+ // double previousTemp = Conditions.getCurrent().insideTemperature;
151
153
double temp = fc .getTemperature ();
152
154
153
155
int effectiveHigh = s .getTargetHigh ();
@@ -177,8 +179,9 @@ public void updateArduino()
177
179
if (s .getMode ().equals ("Off" )) fc .setMode ("Off" );
178
180
179
181
//Make sure there's a full 1 degree difference in temperature so it isn't too chatty.
180
- if (previousTemp - temp > 1 || previousTemp - temp < -1 )
182
+ if (lastLoggedInsideTemp - temp > 1 || lastLoggedInsideTemp - temp < -1 )
181
183
{
184
+ lastLoggedInsideTemp = temp ;
182
185
try {
183
186
if (s .getPingOutUrl ()!=null && s .getPingOutUrl ()!="" && s .getInsideTempChangeParams ()!=null && s .getInsideTempChangeParams ()!="" ) Utils .pingOut (s .getPingOutUrl () + s .getInsideTempChangeParams ());
184
187
} catch (Exception e ) {
0 commit comments