Merge pull request 'Solved a bug that made the trend arrow disappear.' (#6) from Version_1.1 into main

Reviewed-on: #6
This commit is contained in:
Frans Veldman 2025-04-02 09:08:32 +00:00
commit 3e2d41cc23

View File

@ -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);