Explorar el Código

Show babysteps on the LCD in mm, not steps

edwilliams16 hace 9 años
padre
commit
114d9db7d0
Se han modificado 1 ficheros con 8 adiciones y 5 borrados
  1. 8
    5
      Marlin/ultralcd.cpp

+ 8
- 5
Marlin/ultralcd.cpp Ver fichero

575
 
575
 
576
   #if ENABLED(BABYSTEPPING)
576
   #if ENABLED(BABYSTEPPING)
577
 
577
 
578
-    int babysteps_done = 0;
578
+    long babysteps_done = 0;
579
 
579
 
580
     static void _lcd_babystep(const AxisEnum axis, const char* msg) {
580
     static void _lcd_babystep(const AxisEnum axis, const char* msg) {
581
       ENCODER_DIRECTION_NORMAL();
581
       ENCODER_DIRECTION_NORMAL();
582
       if (encoderPosition) {
582
       if (encoderPosition) {
583
-        int distance = (int32_t)encoderPosition * BABYSTEP_MULTIPLICATOR;
583
+        int babystep_increment = (int32_t)encoderPosition * BABYSTEP_MULTIPLICATOR;
584
         encoderPosition = 0;
584
         encoderPosition = 0;
585
         lcdDrawUpdate = LCDVIEW_REDRAW_NOW;
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
       if (LCD_CLICKED) lcd_goto_previous_menu(true);
593
       if (LCD_CLICKED) lcd_goto_previous_menu(true);
591
     }
594
     }
592
 
595
 

Loading…
Cancelar
Guardar