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

This commit is contained in:
Bernhard 2011-12-04 09:48:53 +01:00
parent 4f909963e4
commit dfd240b260
5 changed files with 470 additions and 431 deletions

View file

@ -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

View file

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

View file

@ -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

View file

@ -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