浏览代码

Don't start watching heaters when target is 0 (#12453)

Giuliano Zaro 6 年前
父节点
当前提交
d3605cfc26
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2
    2
      Marlin/src/module/temperature.cpp

+ 2
- 2
Marlin/src/module/temperature.cpp 查看文件

1436
     #if HOTENDS == 1
1436
     #if HOTENDS == 1
1437
       UNUSED(e);
1437
       UNUSED(e);
1438
     #endif
1438
     #endif
1439
-    if (degHotend(HOTEND_INDEX) < degTargetHotend(HOTEND_INDEX) - (WATCH_TEMP_INCREASE + TEMP_HYSTERESIS + 1)) {
1439
+    if (degTargetHotend(HOTEND_INDEX) && degHotend(HOTEND_INDEX) < degTargetHotend(HOTEND_INDEX) - (WATCH_TEMP_INCREASE + TEMP_HYSTERESIS + 1)) {
1440
       watch_target_temp[HOTEND_INDEX] = degHotend(HOTEND_INDEX) + WATCH_TEMP_INCREASE;
1440
       watch_target_temp[HOTEND_INDEX] = degHotend(HOTEND_INDEX) + WATCH_TEMP_INCREASE;
1441
       watch_heater_next_ms[HOTEND_INDEX] = millis() + (WATCH_TEMP_PERIOD) * 1000UL;
1441
       watch_heater_next_ms[HOTEND_INDEX] = millis() + (WATCH_TEMP_PERIOD) * 1000UL;
1442
     }
1442
     }
1452
    * This is called when the temperature is set. (M140, M190)
1452
    * This is called when the temperature is set. (M140, M190)
1453
    */
1453
    */
1454
   void Temperature::start_watching_bed() {
1454
   void Temperature::start_watching_bed() {
1455
-    if (degBed() < degTargetBed() - (WATCH_BED_TEMP_INCREASE + TEMP_BED_HYSTERESIS + 1)) {
1455
+    if (degTargetBed() && degBed() < degTargetBed() - (WATCH_BED_TEMP_INCREASE + TEMP_BED_HYSTERESIS + 1)) {
1456
       watch_target_bed_temp = degBed() + WATCH_BED_TEMP_INCREASE;
1456
       watch_target_bed_temp = degBed() + WATCH_BED_TEMP_INCREASE;
1457
       watch_bed_next_ms = millis() + (WATCH_BED_TEMP_PERIOD) * 1000UL;
1457
       watch_bed_next_ms = millis() + (WATCH_BED_TEMP_PERIOD) * 1000UL;
1458
     }
1458
     }

正在加载...
取消
保存