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

@ -38,6 +38,10 @@
*
* C[float] Kc term
* L[int] LPQ length
*
* With PID_FAN_SCALING:
*
* F[float] Kf term
*/
void GcodeSuite::M301() {
@ -56,6 +60,10 @@ void GcodeSuite::M301() {
NOLESS(thermalManager.lpq_len, 0);
#endif
#if ENABLED(PID_FAN_SCALING)
if (parser.seen('F')) PID_PARAM(Kf, e) = parser.value_float();
#endif
thermalManager.updatePID();
SERIAL_ECHO_START();
#if ENABLED(PID_PARAMS_PER_HOTEND)
@ -65,9 +73,12 @@ void GcodeSuite::M301() {
" i:", unscalePID_i(PID_PARAM(Ki, e)),
" d:", unscalePID_d(PID_PARAM(Kd, e)));
#if ENABLED(PID_EXTRUSION_SCALING)
//Kc does not have scaling applied above, or in resetting defaults
SERIAL_ECHOPAIR(" c:", PID_PARAM(Kc, e));
#endif
#if ENABLED(PID_FAN_SCALING)
SERIAL_ECHOPAIR(" f:", PID_PARAM(Kf, e));
#endif
SERIAL_EOL();
}
else