🎨 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

@@ -315,7 +315,7 @@ void scroll_screen(const uint8_t limit, const bool is_menu) {
const int16_t babystep_increment = int16_t(ui.encoderPosition) * (BABYSTEP_SIZE_Z);
ui.encoderPosition = 0;
const float diff = planner.steps_to_mm[Z_AXIS] * babystep_increment,
const float diff = planner.mm_per_step[Z_AXIS] * babystep_increment,
new_probe_offset = probe.offset.z + diff,
new_offs = TERN(BABYSTEP_HOTEND_Z_OFFSET
, do_probe ? new_probe_offset : hotend_offset[active_extruder].z - diff

View File

@@ -532,7 +532,7 @@ void menu_advanced_steps_per_mm() {
if (e == active_extruder)
planner.refresh_positioning();
else
planner.steps_to_mm[E_AXIS_N(e)] = 1.0f / planner.settings.axis_steps_per_mm[E_AXIS_N(e)];
planner.mm_per_step[E_AXIS_N(e)] = 1.0f / planner.settings.axis_steps_per_mm[E_AXIS_N(e)];
});
#elif E_STEPPERS
EDIT_ITEM_FAST(float51, MSG_E_STEPS, &planner.settings.axis_steps_per_mm[E_AXIS], 5, 9999, []{ planner.refresh_positioning(); });

View File

@@ -65,8 +65,8 @@
babystep.add_steps(axis, steps);
}
if (ui.should_draw()) {
const float spm = planner.steps_to_mm[axis];
MenuEditItemBase::draw_edit_screen(msg, BABYSTEP_TO_STR(spm * babystep.accum));
const float mps = planner.mm_per_step[axis];
MenuEditItemBase::draw_edit_screen(msg, BABYSTEP_TO_STR(mps * babystep.accum));
#if ENABLED(BABYSTEP_DISPLAY_TOTAL)
const bool in_view = TERN1(HAS_MARLINUI_U8GLIB, PAGE_CONTAINS(LCD_PIXEL_HEIGHT - MENU_FONT_HEIGHT, LCD_PIXEL_HEIGHT - 1));
if (in_view) {
@@ -81,7 +81,7 @@
lcd_put_u8str_P(GET_TEXT(MSG_BABYSTEP_TOTAL));
lcd_put_wchar(':');
#endif
lcd_put_u8str(BABYSTEP_TO_STR(spm * babystep.axis_total[BS_TOTAL_IND(axis)]));
lcd_put_u8str(BABYSTEP_TO_STR(mps * babystep.axis_total[BS_TOTAL_IND(axis)]));
}
#endif
}