🎨 steps_to_mm => mm_per_step (#22847)

This commit is contained in:
espr14
2021-09-27 21:05:52 +02:00
committed by Scott Lahteine
parent 064f91e9b0
commit 604a01cd1a
15 changed files with 58 additions and 58 deletions

View File

@ -755,7 +755,7 @@ namespace ExtUI {
* what nozzle is printing.
*/
void smartAdjustAxis_steps(const int16_t steps, const axis_t axis, bool linked_nozzles) {
const float mm = steps * planner.steps_to_mm[axis];
const float mm = steps * planner.mm_per_step[axis];
UNUSED(mm);
if (!babystepAxis_steps(steps, axis)) return;
@ -791,12 +791,12 @@ namespace ExtUI {
* steps that is at least mm long.
*/
int16_t mmToWholeSteps(const_float_t mm, const axis_t axis) {
const float steps = mm / planner.steps_to_mm[axis];
const float steps = mm / planner.mm_per_step[axis];
return steps > 0 ? CEIL(steps) : FLOOR(steps);
}
float mmFromWholeSteps(int16_t steps, const axis_t axis) {
return steps * planner.steps_to_mm[axis];
return steps * planner.mm_per_step[axis];
}
#endif // BABYSTEPPING
@ -806,7 +806,7 @@ namespace ExtUI {
#if HAS_BED_PROBE
+ probe.offset.z
#elif ENABLED(BABYSTEP_DISPLAY_TOTAL)
+ planner.steps_to_mm[Z_AXIS] * babystep.axis_total[BS_AXIS_IND(Z_AXIS)]
+ planner.mm_per_step[Z_AXIS] * babystep.axis_total[BS_AXIS_IND(Z_AXIS)]
#endif
);
}