Skip to content

Commit

Permalink
Update distiller.h
Browse files Browse the repository at this point in the history
  • Loading branch information
LKosoj committed Nov 24, 2022
1 parent 561bc80 commit b53d201
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions distiller.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,17 @@ void distiller_proc() {
if (TankSensor.avgTemp >= SamSetup.DistTemp) {
distiller_finish();
}

//Если Т в кубе больше 90 градусов и включено напряжение, проверяем, что десять минут температура в кубе не меняется от последнего заполненного значения больше, чем на 0.1 градус
if (TankSensor.avgTemp > 90 && PowerOn) {
if (abs(TankSensor.avgTemp - d_s_temp_finish) > 0.1) {
d_s_temp_finish = TankSensor.avgTemp;
d_s_time_min = millis();
} else if ((millis() - d_s_time_min) > 10 * 60 * 1000) {
SendMsg(F("В кубе не осталось спирта"), NOTIFY_MSG);
distiller_finish();
}
}
}

void IRAM_ATTR distiller_finish() {
Expand Down

0 comments on commit b53d201

Please sign in to comment.