Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions Marlin/ultralcd.cpp
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -575,18 +575,22 @@ 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));
// 1000 to print 3 Dec Places
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);
}

Expand Down Expand Up @@ -2592,6 +2596,7 @@ char* ftostr41sign(const float& x) {
return conv;
}


// Convert signed float to string with 023.45 / -23.45 format
char *ftostr32(const float& x) {
long xx = abs(x * 100);
Expand Down