Solved a bug that made the trend arrow disappear.
This commit is contained in:
parent
841d2d6e58
commit
eb8f423dd8
@ -670,10 +670,6 @@ void processmodes() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
printTemperature(readtemp(src),1); // Display the temperature
|
printTemperature(readtemp(src),1); // Display the temperature
|
||||||
if(tempdata[src].failures) // If we failed to receive valid data from the sensor...
|
|
||||||
lcd.write('?'); // ... indicate this with a question mark...
|
|
||||||
else // ... othersiwse...
|
|
||||||
lcd.write(' '); // ... clear any previous error
|
|
||||||
|
|
||||||
lcd.setCursor(0,1);
|
lcd.setCursor(0,1);
|
||||||
pgmLcdPrint(modes[mode]); // Print the current operation mode
|
pgmLcdPrint(modes[mode]); // Print the current operation mode
|
||||||
@ -684,16 +680,20 @@ void processmodes() {
|
|||||||
|
|
||||||
// Update the temperature trend arrow
|
// Update the temperature trend arrow
|
||||||
lcd.setCursor(13,0);
|
lcd.setCursor(13,0);
|
||||||
|
if(tempdata[src].failures) // If we failed to receive valid data from the sensor...
|
||||||
|
lcd.write('?'); // ... indicate this with a question mark...
|
||||||
|
else {
|
||||||
#ifdef SIMTEMP
|
#ifdef SIMTEMP
|
||||||
lcd.write(6); // Simulate upward trend
|
lcd.write(6); // Simulate upward trend
|
||||||
#else
|
#else
|
||||||
if(readtemp(0)-lastTemperature>=TRENDDELTA) {
|
if(readtemp(0)-lastTemperature>=TRENDDELTA) {
|
||||||
lcd.write(6); // Trend is going up
|
lcd.write(6); // Trend is going up
|
||||||
lastTemperature=readtemp(0);
|
lastTemperature=readtemp(0);
|
||||||
} else
|
} else
|
||||||
if(lastTemperature-readtemp(0)>=TRENDDELTA) {
|
if(lastTemperature-readtemp(0)>=TRENDDELTA) {
|
||||||
lcd.write(5); // Trend is going down
|
lcd.write(5); // Trend is going down
|
||||||
lastTemperature=readtemp(0);
|
lastTemperature=readtemp(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
lcd.setCursor(14,0);
|
lcd.setCursor(14,0);
|
||||||
|
Loading…
Reference in New Issue
Block a user