Treat temperature as integer, when possible
This commit is contained in:
@ -387,10 +387,7 @@ void Planner::recalculate() {
|
||||
|
||||
float t = autotemp_min + high * autotemp_factor;
|
||||
t = constrain(t, autotemp_min, autotemp_max);
|
||||
if (oldt > t) {
|
||||
t *= (1 - (AUTOTEMP_OLDWEIGHT));
|
||||
t += (AUTOTEMP_OLDWEIGHT) * oldt;
|
||||
}
|
||||
if (t < oldt) t = t * (1 - (AUTOTEMP_OLDWEIGHT)) + oldt * (AUTOTEMP_OLDWEIGHT);
|
||||
oldt = t;
|
||||
thermalManager.setTargetHotend(t, 0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user