Add PID_FAN_SCALING option (#15585)

This commit is contained in:
haschtl authored and Scott Lahteine committed 2019-11-26 03:34:43 -06:00
1 parent 8ccfdaca02
commit ff6518c0a8
112 files changed
+5377 -22

No files matched your search

+9
View File
@@ -872,6 +872,15 @@ void Temperature::min_temp_error(const heater_ind_t heater) {
}
#endif // PID_EXTRUSION_SCALING
#if ENABLED(PID_FAN_SCALING)
if (thermalManager.fan_speed[active_extruder] > PID_FAN_SCALING_MIN_SPEED) {
work_pid[ee].Kf = PID_PARAM(Kf, ee) + (PID_FAN_SCALING_LIN_FACTOR) * thermalManager.fan_speed[active_extruder];
pid_output += work_pid[ee].Kf;
}
//pid_output -= work_pid[ee].Ki;
//pid_output += work_pid[ee].Ki * work_pid[ee].Kf
#endif // PID_FAN_SCALING
LIMIT(pid_output, 0, PID_MAX);
}
temp_dState[ee] = temp_hotend[ee].celsius;