Browse Source

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

pull/1/head
Bernhard 13 years ago
parent
commit
dfd240b260
  1. 1
      Marlin/Marlin.pde
  2. 1
      Marlin/cardreader.pde
  3. 2
      Marlin/planner.cpp
  4. 10
      Marlin/temperature.h
  5. 845
      Marlin/ultralcd.pde

1
Marlin/Marlin.pde

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

1
Marlin/cardreader.pde

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

2
Marlin/planner.cpp

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

10
Marlin/temperature.h

@ -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 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 disable_heater();
void setWatch(); void setWatch();
void updatePID(); void updatePID();

845
Marlin/ultralcd.pde

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