overworked autotemp, removed one layer of nesting from the ultralcd.

2.0.x
Bernhard 13 years ago
parent 4f909963e4
commit dfd240b260

@ -670,6 +670,7 @@ FORCE_INLINE void process_commands()
SERIAL_ECHO_START;
SERIAL_ECHOLN(time);
LCD_MESSAGE(time);
autotempShutdown();
}
break;
case 42: //M42 -Change pin status via gcode

@ -436,5 +436,6 @@ void CardReader::printingHasFinished()
{
finishAndDisableSteppers();
}
autotempShutdown();
}
#endif //SDSUPPORT

@ -91,7 +91,7 @@ static float previous_nominal_speed; // Nominal speed of previous path line segm
#ifdef AUTOTEMP
float autotemp_max=250;
float autotemp_min=210;
float autotemp_factor=1;
float autotemp_factor=0.1;
bool autotemp_enabled=false;
#endif

@ -108,6 +108,16 @@ FORCE_INLINE float isCoolingHotend(uint8_t extruder){
};
FORCE_INLINE bool isCoolingBed() {return target_raw[TEMPSENSOR_BED] < current_raw[TEMPSENSOR_BED];};
FORCE_INLINE void autotempShutdown(){
#ifdef AUTOTEMP
if(autotemp_enabled)
{
autotemp_enabled=false;
if(degTargetHotend0()>autotemp_min)
setTargetHotend0(0);
}
#endif
}
void disable_heater();
void setWatch();
void updatePID();

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save