Add PID_FAN_SCALING option (#15585)

This commit is contained in:
haschtl
2019-11-26 10:34:43 +01:00
committed by Scott Lahteine
parent 8ccfdaca02
commit ff6518c0a8
112 changed files with 5377 additions and 22 deletions

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;