Fix Babystepping loop (again)

This commit is contained in:
Scott Lahteine
2020-02-24 05:29:13 -06:00
parent 8ba5ef8cae
commit 5e197df89a
8 changed files with 48 additions and 36 deletions

View File

@ -785,7 +785,7 @@ namespace ExtUI {
#if HAS_BED_PROBE
return probe.offset.z;
#elif ENABLED(BABYSTEP_DISPLAY_TOTAL)
return (planner.steps_to_mm[Z_AXIS] * babystep.axis_total[BS_TODO_AXIS(Z_AXIS)]);
return (planner.steps_to_mm[Z_AXIS] * babystep.axis_total[BS_AXIS_IND(Z_AXIS)]);
#else
return 0.0;
#endif
@ -898,11 +898,11 @@ namespace ExtUI {
float getPIDValues_Kp(const extruder_t tool) {
return PID_PARAM(Kp, tool);
}
float getPIDValues_Ki(const extruder_t tool) {
return unscalePID_i(PID_PARAM(Ki, tool));
}
float getPIDValues_Kd(const extruder_t tool) {
return unscalePID_d(PID_PARAM(Kd, tool));
}
@ -918,27 +918,27 @@ namespace ExtUI {
thermalManager.PID_autotune(temp, (heater_ind_t)tool, 8, true);
}
#endif
#if ENABLED(PIDTEMPBED)
float getBedPIDValues_Kp() {
return thermalManager.temp_bed.pid.Kp;
}
float getBedPIDValues_Ki() {
return unscalePID_i(thermalManager.temp_bed.pid.Ki);
}
float getBedPIDValues_Kd() {
return unscalePID_d(thermalManager.temp_bed.pid.Kd);
}
void setBedPIDValues(const float p, const float i, const float d) {
thermalManager.temp_bed.pid.Kp = p;
thermalManager.temp_bed.pid.Ki = scalePID_i(i);
thermalManager.temp_bed.pid.Kd = scalePID_d(d);
thermalManager.updatePID();
}
void startBedPIDTune(const float temp) {
thermalManager.PID_autotune(temp, H_BED, 4, true);
}

View File

@ -256,7 +256,7 @@ namespace ExtUI {
void setPIDValues(const float, const float, const float, extruder_t);
void startPIDTune(const float, extruder_t);
#endif
#if ENABLED(PIDTEMPBED)
float getBedPIDValues_Kp();
float getBedPIDValues_Ki();