|
@@ -894,42 +894,51 @@ namespace ExtUI {
|
894
|
894
|
|
895
|
895
|
float getFeedrate_percent() { return feedrate_percentage; }
|
896
|
896
|
|
897
|
|
- #if HAS_PID_HEATING
|
|
897
|
+ #if ENABLED(PIDTEMP)
|
898
|
898
|
float getPIDValues_Kp(const extruder_t tool) {
|
899
|
899
|
return PID_PARAM(Kp, tool);
|
900
|
900
|
}
|
|
901
|
+
|
901
|
902
|
float getPIDValues_Ki(const extruder_t tool) {
|
902
|
903
|
return unscalePID_i(PID_PARAM(Ki, tool));
|
903
|
904
|
}
|
|
905
|
+
|
904
|
906
|
float getPIDValues_Kd(const extruder_t tool) {
|
905
|
907
|
return unscalePID_d(PID_PARAM(Kd, tool));
|
906
|
908
|
}
|
|
909
|
+
|
|
910
|
+ void setPIDValues(const float p, const float i, const float d, extruder_t tool) {
|
|
911
|
+ thermalManager.temp_hotend[tool].pid.Kp = p;
|
|
912
|
+ thermalManager.temp_hotend[tool].pid.Ki = scalePID_i(i);
|
|
913
|
+ thermalManager.temp_hotend[tool].pid.Kd = scalePID_d(d);
|
|
914
|
+ thermalManager.updatePID();
|
|
915
|
+ }
|
|
916
|
+
|
|
917
|
+ void startPIDTune(const float temp, extruder_t tool){
|
|
918
|
+ thermalManager.PID_autotune(temp, (heater_ind_t)tool, 8, true);
|
|
919
|
+ }
|
|
920
|
+ #endif
|
|
921
|
+
|
|
922
|
+ #if ENABLED(PIDTEMPBED)
|
907
|
923
|
float getBedPIDValues_Kp() {
|
908
|
924
|
return thermalManager.temp_bed.pid.Kp;
|
909
|
925
|
}
|
|
926
|
+
|
910
|
927
|
float getBedPIDValues_Ki() {
|
911
|
928
|
return unscalePID_i(thermalManager.temp_bed.pid.Ki);
|
912
|
929
|
}
|
|
930
|
+
|
913
|
931
|
float getBedPIDValues_Kd() {
|
914
|
932
|
return unscalePID_d(thermalManager.temp_bed.pid.Kd);
|
915
|
933
|
}
|
916
|
|
-
|
917
|
|
- void setPIDValues(const float p, const float i, const float d, extruder_t tool) {
|
918
|
|
- thermalManager.temp_hotend[tool].pid.Kp = p;
|
919
|
|
- thermalManager.temp_hotend[tool].pid.Ki = scalePID_i(i);
|
920
|
|
- thermalManager.temp_hotend[tool].pid.Kd = scalePID_d(d);
|
921
|
|
- thermalManager.updatePID();
|
922
|
|
- }
|
|
934
|
+
|
923
|
935
|
void setBedPIDValues(const float p, const float i, const float d) {
|
924
|
936
|
thermalManager.temp_bed.pid.Kp = p;
|
925
|
937
|
thermalManager.temp_bed.pid.Ki = scalePID_i(i);
|
926
|
938
|
thermalManager.temp_bed.pid.Kd = scalePID_d(d);
|
927
|
939
|
thermalManager.updatePID();
|
928
|
940
|
}
|
929
|
|
-
|
930
|
|
- void startPIDTune(const float temp, extruder_t tool){
|
931
|
|
- thermalManager.PID_autotune(temp, (heater_ind_t)tool, 8, true);
|
932
|
|
- }
|
|
941
|
+
|
933
|
942
|
void startBedPIDTune(const float temp) {
|
934
|
943
|
thermalManager.PID_autotune(temp, H_BED, 4, true);
|
935
|
944
|
}
|