From: Bernhard Kubicek Date: Sat, 19 Nov 2011 16:07:44 +0000 (+0100) Subject: autotemp working, default=disabled. X-Git-Tag: iwj-success-2012-07-29~222^2~2 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=f52e1a957111e6bcf33f8ac375bfeb9ba261d5a0;p=marlin.git autotemp working, default=disabled. --- diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 800bb9b..f9a1367 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/planner.cpp b/Marlin/planner.cpp index 0a226c6..b7f98b6 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()+2autotemp_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