浏览代码

Fixed stop print LCD function on M104

Pablo Clemente 11 年前
父节点
当前提交
c51a6f94e0
共有 3 个文件被更改,包括 9 次插入2 次删除
  1. 4
    2
      Marlin/Marlin_main.cpp
  2. 3
    0
      Marlin/ultralcd.cpp
  3. 2
    0
      Marlin/ultralcd.h

+ 4
- 2
Marlin/Marlin_main.cpp 查看文件

1945
 
1945
 
1946
       /* See if we are heating up or cooling down */
1946
       /* See if we are heating up or cooling down */
1947
       target_direction = isHeatingHotend(tmp_extruder); // true if heating, false if cooling
1947
       target_direction = isHeatingHotend(tmp_extruder); // true if heating, false if cooling
1948
+      
1949
+      forced_heating_stop = true;
1948
 
1950
 
1949
       #ifdef TEMP_RESIDENCY_TIME
1951
       #ifdef TEMP_RESIDENCY_TIME
1950
         long residencyStart;
1952
         long residencyStart;
1951
         residencyStart = -1;
1953
         residencyStart = -1;
1952
         /* continue to loop until we have reached the target temp
1954
         /* continue to loop until we have reached the target temp
1953
           _and_ until TEMP_RESIDENCY_TIME hasn't passed since we reached it */
1955
           _and_ until TEMP_RESIDENCY_TIME hasn't passed since we reached it */
1954
-        while((residencyStart == -1) ||
1955
-              (residencyStart >= 0 && (((unsigned int) (millis() - residencyStart)) < (TEMP_RESIDENCY_TIME * 1000UL))) ) {
1956
+        while((forced_heating_stop == true)&&((residencyStart == -1) ||
1957
+              (residencyStart >= 0 && (((unsigned int) (millis() - residencyStart)) < (TEMP_RESIDENCY_TIME * 1000UL)))) ) {
1956
       #else
1958
       #else
1957
         while ( target_direction ? (isHeatingHotend(tmp_extruder)) : (isCoolingHotend(tmp_extruder)&&(CooldownNoWait==false)) ) {
1959
         while ( target_direction ? (isHeatingHotend(tmp_extruder)) : (isCoolingHotend(tmp_extruder)&&(CooldownNoWait==false)) ) {
1958
       #endif //TEMP_RESIDENCY_TIME
1960
       #endif //TEMP_RESIDENCY_TIME

+ 3
- 0
Marlin/ultralcd.cpp 查看文件

19
 int absPreheatHPBTemp;
19
 int absPreheatHPBTemp;
20
 int absPreheatFanSpeed;
20
 int absPreheatFanSpeed;
21
 
21
 
22
+boolean forced_heating_stop = true ;
22
 
23
 
23
 #ifdef ULTIPANEL
24
 #ifdef ULTIPANEL
24
 static float manual_feedrate[] = MANUAL_FEEDRATE;
25
 static float manual_feedrate[] = MANUAL_FEEDRATE;
256
         enquecommand_P(PSTR(SD_FINISHED_RELEASECOMMAND));
257
         enquecommand_P(PSTR(SD_FINISHED_RELEASECOMMAND));
257
     }
258
     }
258
     autotempShutdown();
259
     autotempShutdown();
260
+    
261
+    forced_heating_stop = false;
259
 }
262
 }
260
 
263
 
261
 /* Menu implementation */
264
 /* Menu implementation */

+ 2
- 0
Marlin/ultralcd.h 查看文件

42
   extern int absPreheatHotendTemp;
42
   extern int absPreheatHotendTemp;
43
   extern int absPreheatHPBTemp;
43
   extern int absPreheatHPBTemp;
44
   extern int absPreheatFanSpeed;
44
   extern int absPreheatFanSpeed;
45
+  
46
+  extern boolean forced_heating_stop;
45
     
47
     
46
   void lcd_buzz(long duration,uint16_t freq);
48
   void lcd_buzz(long duration,uint16_t freq);
47
   bool lcd_clicked();
49
   bool lcd_clicked();

正在加载...
取消
保存