|
@@ -88,7 +88,7 @@ static unsigned long previous_millis_bed_heater;
|
88
|
88
|
#endif //PIDTEMP
|
89
|
89
|
|
90
|
90
|
#ifdef WATCHPERIOD
|
91
|
|
- static int watch_raw[3] = {-1000,-1000,-1000};
|
|
91
|
+ static int watch_oldtemp[3] = {0,0,0};
|
92
|
92
|
static unsigned long watchmillis = 0;
|
93
|
93
|
#endif //WATCHPERIOD
|
94
|
94
|
|
|
@@ -186,7 +186,20 @@ void manage_heater()
|
186
|
186
|
WRITE(HEATER_0_PIN,LOW);
|
187
|
187
|
}
|
188
|
188
|
#endif
|
189
|
|
-
|
|
189
|
+
|
|
190
|
+ #ifdef WATCHPERIOD
|
|
191
|
+ if(watchmillis && millis() - watchmillis > WATCHPERIOD){
|
|
192
|
+ if(watch_oldtemp[TEMPSENSOR_HOTEND_0] >= degHotend(active_extruder)){
|
|
193
|
+ setTargetHotend(0,active_extruder);
|
|
194
|
+ LCD_MESSAGEPGM("Heating failed");
|
|
195
|
+ SERIAL_ECHO_START;
|
|
196
|
+ SERIAL_ECHOLN("Heating failed");
|
|
197
|
+ }else{
|
|
198
|
+ watchmillis = 0;
|
|
199
|
+ }
|
|
200
|
+ }
|
|
201
|
+ #endif
|
|
202
|
+
|
190
|
203
|
if(millis() - previous_millis_bed_heater < BED_CHECK_INTERVAL)
|
191
|
204
|
return;
|
192
|
205
|
previous_millis_bed_heater = millis();
|
|
@@ -426,7 +439,7 @@ void setWatch()
|
426
|
439
|
if(isHeatingHotend0())
|
427
|
440
|
{
|
428
|
441
|
watchmillis = max(1,millis());
|
429
|
|
- watch_raw[TEMPSENSOR_HOTEND_0] = current_raw[TEMPSENSOR_HOTEND_0];
|
|
442
|
+ watch_oldtemp[TEMPSENSOR_HOTEND_0] = degHotend(0);
|
430
|
443
|
}
|
431
|
444
|
else
|
432
|
445
|
{
|