Don't start watching heaters when target is 0 (#12453)
This commit is contained in:
parent
93e958f695
commit
d3605cfc26
1 changed files with 2 additions and 2 deletions
|
@ -1436,7 +1436,7 @@ void Temperature::init() {
|
||||||
#if HOTENDS == 1
|
#if HOTENDS == 1
|
||||||
UNUSED(e);
|
UNUSED(e);
|
||||||
#endif
|
#endif
|
||||||
if (degHotend(HOTEND_INDEX) < degTargetHotend(HOTEND_INDEX) - (WATCH_TEMP_INCREASE + TEMP_HYSTERESIS + 1)) {
|
if (degTargetHotend(HOTEND_INDEX) && degHotend(HOTEND_INDEX) < degTargetHotend(HOTEND_INDEX) - (WATCH_TEMP_INCREASE + TEMP_HYSTERESIS + 1)) {
|
||||||
watch_target_temp[HOTEND_INDEX] = degHotend(HOTEND_INDEX) + WATCH_TEMP_INCREASE;
|
watch_target_temp[HOTEND_INDEX] = degHotend(HOTEND_INDEX) + WATCH_TEMP_INCREASE;
|
||||||
watch_heater_next_ms[HOTEND_INDEX] = millis() + (WATCH_TEMP_PERIOD) * 1000UL;
|
watch_heater_next_ms[HOTEND_INDEX] = millis() + (WATCH_TEMP_PERIOD) * 1000UL;
|
||||||
}
|
}
|
||||||
|
@ -1452,7 +1452,7 @@ void Temperature::init() {
|
||||||
* This is called when the temperature is set. (M140, M190)
|
* This is called when the temperature is set. (M140, M190)
|
||||||
*/
|
*/
|
||||||
void Temperature::start_watching_bed() {
|
void Temperature::start_watching_bed() {
|
||||||
if (degBed() < degTargetBed() - (WATCH_BED_TEMP_INCREASE + TEMP_BED_HYSTERESIS + 1)) {
|
if (degTargetBed() && degBed() < degTargetBed() - (WATCH_BED_TEMP_INCREASE + TEMP_BED_HYSTERESIS + 1)) {
|
||||||
watch_target_bed_temp = degBed() + WATCH_BED_TEMP_INCREASE;
|
watch_target_bed_temp = degBed() + WATCH_BED_TEMP_INCREASE;
|
||||||
watch_bed_next_ms = millis() + (WATCH_BED_TEMP_PERIOD) * 1000UL;
|
watch_bed_next_ms = millis() + (WATCH_BED_TEMP_PERIOD) * 1000UL;
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue