From 114d9db7d0bfcab03b08c79409da52249ba8e369 Mon Sep 17 00:00:00 2001 From: edwilliams16 Date: Sun, 12 Jun 2016 23:28:16 -1000 Subject: [PATCH] Show babysteps on the LCD in mm, not steps --- Marlin/ultralcd.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) mode change 100644 => 100755 Marlin/ultralcd.cpp diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp old mode 100644 new mode 100755 index a9f8aaa58110..add6cb029228 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -575,18 +575,21 @@ static void lcd_status_screen() { #if ENABLED(BABYSTEPPING) - int babysteps_done = 0; + long babysteps_done = 0; static void _lcd_babystep(const AxisEnum axis, const char* msg) { ENCODER_DIRECTION_NORMAL(); if (encoderPosition) { - int distance = (int32_t)encoderPosition * BABYSTEP_MULTIPLICATOR; + int babystep_increment = (int32_t)encoderPosition * BABYSTEP_MULTIPLICATOR; encoderPosition = 0; lcdDrawUpdate = LCDVIEW_REDRAW_NOW; - thermalManager.babystep_axis(axis, distance); - babysteps_done += distance; + thermalManager.babystep_axis(axis, babystep_increment); + babysteps_done += babystep_increment; } - if (lcdDrawUpdate) lcd_implementation_drawedit(msg, itostr3sign(babysteps_done)); + if (lcdDrawUpdate) + lcd_implementation_drawedit(msg, ftostr43sign( + ((1000 * babysteps_done) / planner.axis_steps_per_mm[axis]) * 0.001f + )); if (LCD_CLICKED) lcd_goto_previous_menu(true); }