Treat temperature as integer, when possible

This commit is contained in:
Scott Lahteine committed 2017-05-03 17:27:25 -05:00
1 parent 1b2c7ec20a
commit 2658cc707a
6 files changed
+89 -91

No files matched your search

+1 -4
View File
@@ -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);
}