|
|
@ -553,7 +553,7 @@ void lcd_set_home_offsets() { |
|
|
|
|
|
|
|
static void _lcd_babystep(const int axis, const char* msg) { |
|
|
|
ENCODER_DIRECTION_NORMAL(); |
|
|
|
if (encoderPosition != 0) { |
|
|
|
if (encoderPosition) { |
|
|
|
int distance = (int)encoderPosition * BABYSTEP_MULTIPLICATOR; |
|
|
|
encoderPosition = 0; |
|
|
|
lcdDrawUpdate = LCD_DRAW_UPDATE_CALL_REDRAW; |
|
|
@ -1124,7 +1124,7 @@ float move_menu_scale; |
|
|
|
|
|
|
|
static void _lcd_move(const char* name, AxisEnum axis, float min, float max) { |
|
|
|
ENCODER_DIRECTION_NORMAL(); |
|
|
|
if ((encoderPosition != 0) && (movesplanned() <= 3)) { |
|
|
|
if (encoderPosition && movesplanned() <= 3) { |
|
|
|
refresh_cmd_timeout(); |
|
|
|
current_position[axis] += float((int)encoderPosition) * move_menu_scale; |
|
|
|
if (min_software_endstops) NOLESS(current_position[axis], min); |
|
|
@ -1156,7 +1156,7 @@ static void lcd_move_e( |
|
|
|
unsigned short original_active_extruder = active_extruder; |
|
|
|
active_extruder = e; |
|
|
|
#endif |
|
|
|
if ((encoderPosition != 0) && (movesplanned() <= 3)) { |
|
|
|
if (encoderPosition && movesplanned() <= 3) { |
|
|
|
current_position[E_AXIS] += float((int)encoderPosition) * move_menu_scale; |
|
|
|
encoderPosition = 0; |
|
|
|
line_to_current(E_AXIS); |
|
|
@ -1203,13 +1203,22 @@ static void lcd_move_e( |
|
|
|
* |
|
|
|
*/ |
|
|
|
|
|
|
|
#if ENABLED(DELTA) || ENABLED(SCARA) |
|
|
|
#define _MOVE_XYZ_ALLOWED (axis_homed[X_AXIS] && axis_homed[Y_AXIS] && axis_homed[Z_AXIS]) |
|
|
|
#else |
|
|
|
#define _MOVE_XYZ_ALLOWED true |
|
|
|
#endif |
|
|
|
|
|
|
|
static void _lcd_move_menu_axis() { |
|
|
|
START_MENU(); |
|
|
|
MENU_ITEM(back, MSG_MOVE_AXIS); |
|
|
|
|
|
|
|
if (_MOVE_XYZ_ALLOWED) { |
|
|
|
MENU_ITEM(submenu, MSG_MOVE_X, lcd_move_x); |
|
|
|
MENU_ITEM(submenu, MSG_MOVE_Y, lcd_move_y); |
|
|
|
} |
|
|
|
if (move_menu_scale < 10.0) { |
|
|
|
MENU_ITEM(submenu, MSG_MOVE_Z, lcd_move_z); |
|
|
|
if (_MOVE_XYZ_ALLOWED) MENU_ITEM(submenu, MSG_MOVE_Z, lcd_move_z); |
|
|
|
#if EXTRUDERS == 1 |
|
|
|
MENU_ITEM(submenu, MSG_MOVE_E, lcd_move_e); |
|
|
|
#else |
|
|
@ -1248,7 +1257,10 @@ static void lcd_move_menu_01mm() { |
|
|
|
static void lcd_move_menu() { |
|
|
|
START_MENU(); |
|
|
|
MENU_ITEM(back, MSG_PREPARE); |
|
|
|
|
|
|
|
if (_MOVE_XYZ_ALLOWED) |
|
|
|
MENU_ITEM(submenu, MSG_MOVE_10MM, lcd_move_menu_10mm); |
|
|
|
|
|
|
|
MENU_ITEM(submenu, MSG_MOVE_1MM, lcd_move_menu_1mm); |
|
|
|
MENU_ITEM(submenu, MSG_MOVE_01MM, lcd_move_menu_01mm); |
|
|
|
//TODO:X,Y,Z,E
|
|
|
@ -1629,7 +1641,7 @@ static void lcd_control_volumetric_menu() { |
|
|
|
#if ENABLED(HAS_LCD_CONTRAST) |
|
|
|
static void lcd_set_contrast() { |
|
|
|
ENCODER_DIRECTION_NORMAL(); |
|
|
|
if (encoderPosition != 0) { |
|
|
|
if (encoderPosition) { |
|
|
|
#if ENABLED(U8GLIB_LM6059_AF) |
|
|
|
lcd_contrast += encoderPosition; |
|
|
|
lcd_contrast &= 0xFF; |
|
|
|