From 43078c37e0a3149b883813cac163986f961f91dc Mon Sep 17 00:00:00 2001 From: Wolfgang Hottgenroth Date: Thu, 15 Jun 2017 20:17:15 +0200 Subject: [PATCH] hot temperature threshold introduced --- my_src/hmi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/my_src/hmi.c b/my_src/hmi.c index 56f48ab..28b7b82 100644 --- a/my_src/hmi.c +++ b/my_src/hmi.c @@ -18,6 +18,7 @@ const uint32_t STORAGE_MAGIC = 0xaffe000a; const uint8_t COLD_COUNT_THRESHOLD = 40; +const uint32_t HOT_TEMPERATURE_THRESHOLD = 5; @@ -81,7 +82,7 @@ void thermometerEngine(void *handle) { switch (lDisplay->thermometerEngineState) { case TE_IDLE: - if (lDisplay->currentTemperature > lDisplay->targetTemperature) { + if (lDisplay->currentTemperature > (lDisplay->targetTemperature + HOT_TEMPERATURE_THRESHOLD)) { lDisplay->thermometerEngineState = TE_HOT; lDisplay->coldCount = 0; }