hot temperature threshold introduced

This commit is contained in:
Wolfgang Hottgenroth 2017-06-15 20:17:15 +02:00
parent 2e6b4b7503
commit 43078c37e0

View File

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