diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h
index 800bb9b32f61bdafe16191fc8e2ee21871eacc55..f9a1367024ef43320f77374f515ebc997265ddc7 100644
--- a/Marlin/Configuration.h
+++ b/Marlin/Configuration.h
@@ -297,11 +297,10 @@ const bool ENDSTOPS_INVERTING = true; // set to true to invert the logic of the
//automatic temperature: just for testing, this is very dangerous, keep disabled!
// not working yet.
-//Erik: the settings currently depend dramatically on skeinforge39 or 41.
//#define AUTOTEMP
-#define AUTOTEMP_MIN 190
-#define AUTOTEMP_MAX 260
-#define AUTOTEMP_FACTOR 1000. //current target temperature= min+largest buffered espeeds)*FACTOR
+#ifdef AUTOTEMP
+ #define AUTOTEMP_OLDWEIGHT 0.98
+#endif
const int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement
diff --git a/Marlin/Marlin.pde b/Marlin/Marlin.pde
index c0fc8675c18803314ccedde5bc667d62f86fc2fd..f619854da3625a04efdb20ca2fca09dca25514e5 100644
--- a/Marlin/Marlin.pde
+++ b/Marlin/Marlin.pde
@@ -694,8 +694,10 @@ inline void process_commands()
break;
case 109:
{// M109 - Wait for extruder heater to reach target.
- LCD_MESSAGEPGM("Heating...");
- autotemp_enabled=false;
+ LCD_MESSAGEPGM("Heating...");
+ #ifdef AUTOTEMP
+ autotemp_enabled=false;
+ #endif
if (code_seen('S')) setTargetHotend0(code_value());
#ifdef AUTOTEMP
if (code_seen('S')) autotemp_min=code_value();
diff --git a/Marlin/planner.cpp b/Marlin/planner.cpp
index 0a226c66f79a2dedf8bbe75d85bb58480fea6225..b7f98b6d1d2077b17d130267a421e56fecc42576 100644
--- a/Marlin/planner.cpp
+++ b/Marlin/planner.cpp
@@ -382,6 +382,7 @@ block_t *plan_get_current_block() {
#ifdef AUTOTEMP
void getHighESpeed()
{
+ static float oldt=0;
if(!autotemp_enabled)
return;
if(degTargetHotend0()+2<autotemp_min) //probably temperature set to zero.
@@ -401,12 +402,21 @@ void getHighESpeed()
}
float g=autotemp_min+high*autotemp_factor;
- float t=constrain(autotemp_min,g,autotemp_max);
+ float t=g;
+ if(t<autotemp_min)
+ t=autotemp_min;
+ if(t>autotemp_max)
+ t=autotemp_max;
+ if(oldt>t)
+ {
+ t=AUTOTEMP_OLDWEIGHT*oldt+(1-AUTOTEMP_OLDWEIGHT)*t;
+ }
+ oldt=t;
setTargetHotend0(t);
- SERIAL_ECHO_START;
- SERIAL_ECHOPAIR("highe",high);
- SERIAL_ECHOPAIR(" t",t);
- SERIAL_ECHOLN("");
+// SERIAL_ECHO_START;
+// SERIAL_ECHOPAIR("highe",high);
+// SERIAL_ECHOPAIR(" t",t);
+// SERIAL_ECHOLN("");
}
#endif