|
@@ -550,10 +550,12 @@ void lcd_set_home_offsets() {
|
550
|
550
|
|
551
|
551
|
#if ENABLED(BABYSTEPPING)
|
552
|
552
|
|
|
553
|
+ int babysteps_done = 0;
|
|
554
|
+
|
553
|
555
|
static void _lcd_babystep(const int axis, const char* msg) {
|
554
|
556
|
ENCODER_DIRECTION_NORMAL();
|
555
|
557
|
if (encoderPosition) {
|
556
|
|
- int distance = (int32_t)encoderPosition * BABYSTEP_MULTIPLICATOR;
|
|
558
|
+ int distance = (int32_t)encoderPosition * BABYSTEP_MULTIPLICATOR;
|
557
|
559
|
encoderPosition = 0;
|
558
|
560
|
lcdDrawUpdate = LCDVIEW_REDRAW_NOW;
|
559
|
561
|
#if ENABLED(COREXY) || ENABLED(COREXZ)
|
|
@@ -580,16 +582,21 @@ void lcd_set_home_offsets() {
|
580
|
582
|
#else
|
581
|
583
|
babystepsTodo[axis] += distance;
|
582
|
584
|
#endif
|
|
585
|
+
|
|
586
|
+ babysteps_done += distance;
|
583
|
587
|
}
|
584
|
|
- if (lcdDrawUpdate) lcd_implementation_drawedit(msg, NULL);
|
|
588
|
+ if (lcdDrawUpdate) lcd_implementation_drawedit(msg, itostr3sign(babysteps_done));
|
585
|
589
|
if (LCD_CLICKED) lcd_goto_previous_menu(true);
|
586
|
590
|
}
|
587
|
591
|
|
588
|
592
|
#if ENABLED(BABYSTEP_XY)
|
589
|
|
- static void lcd_babystep_x() { _lcd_babystep(X_AXIS, PSTR(MSG_BABYSTEPPING_X)); }
|
590
|
|
- static void lcd_babystep_y() { _lcd_babystep(Y_AXIS, PSTR(MSG_BABYSTEPPING_Y)); }
|
|
593
|
+ static void _lcd_babystep_x() { _lcd_babystep(X_AXIS, PSTR(MSG_BABYSTEPPING_X)); }
|
|
594
|
+ static void _lcd_babystep_y() { _lcd_babystep(Y_AXIS, PSTR(MSG_BABYSTEPPING_Y)); }
|
|
595
|
+ static void lcd_babystep_x() { babysteps_done = 0; lcd_goto_menu(_lcd_babystep_x); }
|
|
596
|
+ static void lcd_babystep_y() { babysteps_done = 0; lcd_goto_menu(_lcd_babystep_y); }
|
591
|
597
|
#endif
|
592
|
|
- static void lcd_babystep_z() { _lcd_babystep(Z_AXIS, PSTR(MSG_BABYSTEPPING_Z)); }
|
|
598
|
+ static void _lcd_babystep_z() { _lcd_babystep(Z_AXIS, PSTR(MSG_BABYSTEPPING_Z)); }
|
|
599
|
+ static void lcd_babystep_z() { babysteps_done = 0; lcd_goto_menu(_lcd_babystep_z); }
|
593
|
600
|
|
594
|
601
|
#endif //BABYSTEPPING
|
595
|
602
|
|
|
@@ -2573,8 +2580,8 @@ char* ftostr32sp(const float& x) {
|
2573
|
2580
|
return conv;
|
2574
|
2581
|
}
|
2575
|
2582
|
|
2576
|
|
-// Convert signed int to lj string with +012.0 / -012.0 format
|
2577
|
|
-char* itostr31(const int& x) {
|
|
2583
|
+// Convert signed int to lj string with +012 / -012 format
|
|
2584
|
+char* itostr3sign(const int& x) {
|
2578
|
2585
|
int xx;
|
2579
|
2586
|
if (x >= 0) {
|
2580
|
2587
|
conv[0] = '+';
|