Skip to content

Commit

Permalink
Fixed display of invalid water temperature
Browse files Browse the repository at this point in the history
  • Loading branch information
matthias-bs committed Nov 13, 2024
1 parent 2962cf3 commit db223f9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/Waveshare_7_5_T7_Sensors/MqttInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ typedef struct MqttHistQData mqtt_hist_t; //!< Shortcut for struct MqttHistQData
#define INV_UINT32 0xFFFFFFFF
#define INV_UINT16 0xFFFF
#define INV_UINT8 0xFF
#define INV_TEMP 327.67
#define INV_TEMP 327.67f

class MqttInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -902,7 +902,7 @@ void DisplayMQTTWeather(const unsigned char *status_bitmap)

#if defined(WATERTEMP_EN)
// Water Temperature Sensor
if (MqttSensors.water_temp_c != WATER_TEMP_INVALID || MqttHistTStamp == 0)
if ((MqttSensors.water_temp_c != WATER_TEMP_INVALID) && (MqttSensors.water_temp_c < INV_TEMP - 1))
{
DisplayLocalTemperatureSection(358, 187, 137, 100, "", true, MqttSensors.water_temp_c, false, 0, 0);
u8g2Fonts.setFont(u8g2_font_helvB18_tf);
Expand Down

0 comments on commit db223f9

Please sign in to comment.