@@ -894,42 +894,51 @@ namespace ExtUI {
894894
895895 float getFeedrate_percent () { return feedrate_percentage; }
896896
897- #if HAS_PID_HEATING
897+ #if ENABLED(PIDTEMP)
898898 float getPIDValues_Kp (const extruder_t tool) {
899899 return PID_PARAM (Kp, tool);
900900 }
901+
901902 float getPIDValues_Ki (const extruder_t tool) {
902903 return unscalePID_i (PID_PARAM (Ki, tool));
903904 }
905+
904906 float getPIDValues_Kd (const extruder_t tool) {
905907 return unscalePID_d (PID_PARAM (Kd, tool));
906908 }
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)
907923 float getBedPIDValues_Kp () {
908924 return thermalManager.temp_bed .pid .Kp ;
909925 }
926+
910927 float getBedPIDValues_Ki () {
911928 return unscalePID_i (thermalManager.temp_bed .pid .Ki );
912929 }
930+
913931 float getBedPIDValues_Kd () {
914932 return unscalePID_d (thermalManager.temp_bed .pid .Kd );
915933 }
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+
923935 void setBedPIDValues (const float p, const float i, const float d) {
924936 thermalManager.temp_bed .pid .Kp = p;
925937 thermalManager.temp_bed .pid .Ki = scalePID_i (i);
926938 thermalManager.temp_bed .pid .Kd = scalePID_d (d);
927939 thermalManager.updatePID ();
928940 }
929-
930- void startPIDTune (const float temp, extruder_t tool){
931- thermalManager.PID_autotune (temp, (heater_ind_t )tool, 8 , true );
932- }
941+
933942 void startBedPIDTune (const float temp) {
934943 thermalManager.PID_autotune (temp, H_BED, 4 , true );
935944 }
0 commit comments