Browse Source

Merge pull request #4057 from thinkyhead/rc_babysteps_mm

Babystepping show millimeters on LCD
Scott Lahteine 8 years ago
parent
commit
cd9ecfdcb1
1 changed files with 8 additions and 5 deletions
  1. 8
    5
      Marlin/ultralcd.cpp

+ 8
- 5
Marlin/ultralcd.cpp View File

@@ -575,18 +575,21 @@ static void lcd_status_screen() {
575 575
 
576 576
   #if ENABLED(BABYSTEPPING)
577 577
 
578
-    int babysteps_done = 0;
578
+    long babysteps_done = 0;
579 579
 
580 580
     static void _lcd_babystep(const AxisEnum axis, const char* msg) {
581 581
       ENCODER_DIRECTION_NORMAL();
582 582
       if (encoderPosition) {
583
-        int distance = (int32_t)encoderPosition * BABYSTEP_MULTIPLICATOR;
583
+        int babystep_increment = (int32_t)encoderPosition * BABYSTEP_MULTIPLICATOR;
584 584
         encoderPosition = 0;
585 585
         lcdDrawUpdate = LCDVIEW_REDRAW_NOW;
586
-        thermalManager.babystep_axis(axis, distance);
587
-        babysteps_done += distance;
586
+        thermalManager.babystep_axis(axis, babystep_increment);
587
+        babysteps_done += babystep_increment;
588 588
       }
589
-      if (lcdDrawUpdate) lcd_implementation_drawedit(msg, itostr3sign(babysteps_done));
589
+      if (lcdDrawUpdate)
590
+        lcd_implementation_drawedit(msg, ftostr43sign(
591
+          ((1000 * babysteps_done) / planner.axis_steps_per_mm[axis]) * 0.001f
592
+        ));
590 593
       if (LCD_CLICKED) lcd_goto_previous_menu(true);
591 594
     }
592 595
 

Loading…
Cancel
Save