|
@@ -382,6 +382,7 @@ block_t *plan_get_current_block() {
|
382
|
382
|
#ifdef AUTOTEMP
|
383
|
383
|
void getHighESpeed()
|
384
|
384
|
{
|
|
385
|
+ static float oldt=0;
|
385
|
386
|
if(!autotemp_enabled)
|
386
|
387
|
return;
|
387
|
388
|
if(degTargetHotend0()+2<autotemp_min) //probably temperature set to zero.
|
|
@@ -401,12 +402,21 @@ void getHighESpeed()
|
401
|
402
|
}
|
402
|
403
|
|
403
|
404
|
float g=autotemp_min+high*autotemp_factor;
|
404
|
|
- float t=constrain(autotemp_min,g,autotemp_max);
|
|
405
|
+ float t=g;
|
|
406
|
+ if(t<autotemp_min)
|
|
407
|
+ t=autotemp_min;
|
|
408
|
+ if(t>autotemp_max)
|
|
409
|
+ t=autotemp_max;
|
|
410
|
+ if(oldt>t)
|
|
411
|
+ {
|
|
412
|
+ t=AUTOTEMP_OLDWEIGHT*oldt+(1-AUTOTEMP_OLDWEIGHT)*t;
|
|
413
|
+ }
|
|
414
|
+ oldt=t;
|
405
|
415
|
setTargetHotend0(t);
|
406
|
|
- SERIAL_ECHO_START;
|
407
|
|
- SERIAL_ECHOPAIR("highe",high);
|
408
|
|
- SERIAL_ECHOPAIR(" t",t);
|
409
|
|
- SERIAL_ECHOLN("");
|
|
416
|
+// SERIAL_ECHO_START;
|
|
417
|
+// SERIAL_ECHOPAIR("highe",high);
|
|
418
|
+// SERIAL_ECHOPAIR(" t",t);
|
|
419
|
+// SERIAL_ECHOLN("");
|
410
|
420
|
}
|
411
|
421
|
#endif
|
412
|
422
|
|