|
|
@ -88,7 +88,7 @@ static unsigned long previous_millis_bed_heater;
|
|
|
|
#endif //PIDTEMP
|
|
|
|
#endif //PIDTEMP
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef WATCHPERIOD
|
|
|
|
#ifdef WATCHPERIOD
|
|
|
|
static int watch_raw[3] = {-1000,-1000,-1000};
|
|
|
|
static int watch_oldtemp[3] = {0,0,0};
|
|
|
|
static unsigned long watchmillis = 0;
|
|
|
|
static unsigned long watchmillis = 0;
|
|
|
|
#endif //WATCHPERIOD
|
|
|
|
#endif //WATCHPERIOD
|
|
|
|
|
|
|
|
|
|
|
@ -187,6 +187,19 @@ void manage_heater()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef WATCHPERIOD
|
|
|
|
|
|
|
|
if(watchmillis && millis() - watchmillis > WATCHPERIOD){
|
|
|
|
|
|
|
|
if(watch_oldtemp[TEMPSENSOR_HOTEND_0] >= degHotend(active_extruder)){
|
|
|
|
|
|
|
|
setTargetHotend(0,active_extruder);
|
|
|
|
|
|
|
|
LCD_MESSAGEPGM("Heating failed");
|
|
|
|
|
|
|
|
SERIAL_ECHO_START;
|
|
|
|
|
|
|
|
SERIAL_ECHOLN("Heating failed");
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
watchmillis = 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
if(millis() - previous_millis_bed_heater < BED_CHECK_INTERVAL)
|
|
|
|
if(millis() - previous_millis_bed_heater < BED_CHECK_INTERVAL)
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
previous_millis_bed_heater = millis();
|
|
|
|
previous_millis_bed_heater = millis();
|
|
|
@ -426,7 +439,7 @@ void setWatch()
|
|
|
|
if(isHeatingHotend0())
|
|
|
|
if(isHeatingHotend0())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
watchmillis = max(1,millis());
|
|
|
|
watchmillis = max(1,millis());
|
|
|
|
watch_raw[TEMPSENSOR_HOTEND_0] = current_raw[TEMPSENSOR_HOTEND_0];
|
|
|
|
watch_oldtemp[TEMPSENSOR_HOTEND_0] = degHotend(0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|