|
@ -894,32 +894,44 @@ namespace ExtUI { |
|
|
|
|
|
|
|
|
float getFeedrate_percent() { return feedrate_percentage; } |
|
|
float getFeedrate_percent() { return feedrate_percentage; } |
|
|
|
|
|
|
|
|
#if HAS_PID_HEATING |
|
|
#if ENABLED(PIDTEMP) |
|
|
float getPIDValues_Kp(const extruder_t tool) { |
|
|
float getPIDValues_Kp(const extruder_t tool) { |
|
|
return PID_PARAM(Kp, tool); |
|
|
return PID_PARAM(Kp, tool); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
float getPIDValues_Ki(const extruder_t tool) { |
|
|
float getPIDValues_Ki(const extruder_t tool) { |
|
|
return unscalePID_i(PID_PARAM(Ki, tool)); |
|
|
return unscalePID_i(PID_PARAM(Ki, tool)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
float getPIDValues_Kd(const extruder_t tool) { |
|
|
float getPIDValues_Kd(const extruder_t tool) { |
|
|
return unscalePID_d(PID_PARAM(Kd, tool)); |
|
|
return unscalePID_d(PID_PARAM(Kd, tool)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void setPIDValues(const float p, const float i, const float d, extruder_t tool) { |
|
|
|
|
|
thermalManager.temp_hotend[tool].pid.Kp = p; |
|
|
|
|
|
thermalManager.temp_hotend[tool].pid.Ki = scalePID_i(i); |
|
|
|
|
|
thermalManager.temp_hotend[tool].pid.Kd = scalePID_d(d); |
|
|
|
|
|
thermalManager.updatePID(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void startPIDTune(const float temp, extruder_t tool){ |
|
|
|
|
|
thermalManager.PID_autotune(temp, (heater_ind_t)tool, 8, true); |
|
|
|
|
|
} |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(PIDTEMPBED) |
|
|
float getBedPIDValues_Kp() { |
|
|
float getBedPIDValues_Kp() { |
|
|
return thermalManager.temp_bed.pid.Kp; |
|
|
return thermalManager.temp_bed.pid.Kp; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
float getBedPIDValues_Ki() { |
|
|
float getBedPIDValues_Ki() { |
|
|
return unscalePID_i(thermalManager.temp_bed.pid.Ki); |
|
|
return unscalePID_i(thermalManager.temp_bed.pid.Ki); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
float getBedPIDValues_Kd() { |
|
|
float getBedPIDValues_Kd() { |
|
|
return unscalePID_d(thermalManager.temp_bed.pid.Kd); |
|
|
return unscalePID_d(thermalManager.temp_bed.pid.Kd); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void setPIDValues(const float p, const float i, const float d, extruder_t tool) { |
|
|
|
|
|
thermalManager.temp_hotend[tool].pid.Kp = p; |
|
|
|
|
|
thermalManager.temp_hotend[tool].pid.Ki = scalePID_i(i); |
|
|
|
|
|
thermalManager.temp_hotend[tool].pid.Kd = scalePID_d(d); |
|
|
|
|
|
thermalManager.updatePID(); |
|
|
|
|
|
} |
|
|
|
|
|
void setBedPIDValues(const float p, const float i, const float d) { |
|
|
void setBedPIDValues(const float p, const float i, const float d) { |
|
|
thermalManager.temp_bed.pid.Kp = p; |
|
|
thermalManager.temp_bed.pid.Kp = p; |
|
|
thermalManager.temp_bed.pid.Ki = scalePID_i(i); |
|
|
thermalManager.temp_bed.pid.Ki = scalePID_i(i); |
|
@ -927,9 +939,6 @@ namespace ExtUI { |
|
|
thermalManager.updatePID(); |
|
|
thermalManager.updatePID(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void startPIDTune(const float temp, extruder_t tool){ |
|
|
|
|
|
thermalManager.PID_autotune(temp, (heater_ind_t)tool, 8, true); |
|
|
|
|
|
} |
|
|
|
|
|
void startBedPIDTune(const float temp) { |
|
|
void startBedPIDTune(const float temp) { |
|
|
thermalManager.PID_autotune(temp, H_BED, 4, true); |
|
|
thermalManager.PID_autotune(temp, H_BED, 4, true); |
|
|
} |
|
|
} |
|
|