Pre-heat termal runaway check adjusted

This commit is contained in:
akukan 2016-10-25 17:06:28 +02:00
parent 54bcd2022d
commit 2f13563c18
1 changed files with 17 additions and 14 deletions

View File

@ -1105,23 +1105,26 @@ void temp_runaway_check(int _heater_id, float _target_temperature, float _curren
if (temp_runaway_status[_heater_id] == TempRunaway_PREHEAT) if (temp_runaway_status[_heater_id] == TempRunaway_PREHEAT)
{ {
__preheat_counter++; if (_current_temperature < 150)
if (__preheat_counter > 4)
{ {
__preheat_counter++;
if (_current_temperature - __preheat_start < 2){ if (__preheat_counter > 8)
__preheat_errors++;}
else{
__preheat_errors = 0;}
if (__preheat_errors > 5)
{ {
temp_runaway_stop(true); if (_current_temperature - __preheat_start < 2) {
} __preheat_errors++;
__preheat_start = _current_temperature; }
__preheat_counter = 0; else {
} __preheat_errors = 0;
}
if (__preheat_errors > 5)
{
temp_runaway_stop(true);
}
__preheat_start = _current_temperature;
__preheat_counter = 0;
}
}
} }
if (_current_temperature >= _target_temperature && temp_runaway_status[_heater_id] == TempRunaway_PREHEAT) if (_current_temperature >= _target_temperature && temp_runaway_status[_heater_id] == TempRunaway_PREHEAT)