|
|
@ -390,7 +390,7 @@ uint8_t lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; // Set when the LCD needs to |
|
|
|
bool screen_changed; |
|
|
|
|
|
|
|
// LCD and menu clicks
|
|
|
|
bool lcd_clicked, wait_for_unclick, defer_return_to_status; |
|
|
|
bool lcd_clicked, wait_for_unclick, defer_return_to_status, no_reentrance; |
|
|
|
|
|
|
|
// Variables used when editing values.
|
|
|
|
const char* editLabel; |
|
|
@ -422,6 +422,27 @@ uint8_t lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; // Set when the LCD needs to |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/**
|
|
|
|
* Synchronize safely while holding the current screen |
|
|
|
* This blocks all further screen or stripe updates once called |
|
|
|
*/ |
|
|
|
inline void lcd_synchronize() { |
|
|
|
lcd_implementation_drawmenu_static(LCD_HEIGHT >= 4 ? 1 : 0, PSTR(MSG_MOVING)); |
|
|
|
if (no_reentrance) return; |
|
|
|
no_reentrance = true; |
|
|
|
screenFunc_t old_screen = currentScreen; |
|
|
|
lcd_goto_screen(lcd_synchronize); |
|
|
|
stepper.synchronize(); |
|
|
|
no_reentrance = false; |
|
|
|
lcd_goto_screen(old_screen); |
|
|
|
} |
|
|
|
|
|
|
|
inline void lcd_wait_for_homing() { |
|
|
|
no_reentrance = true; |
|
|
|
while (!axis_homed[X_AXIS] || !axis_homed[Y_AXIS] || !axis_homed[Z_AXIS]) idle(); |
|
|
|
no_reentrance = true; |
|
|
|
} |
|
|
|
|
|
|
|
void lcd_return_to_status() { lcd_goto_screen(lcd_status_screen); } |
|
|
|
|
|
|
|
void lcd_save_previous_screen() { |
|
|
@ -1063,6 +1084,7 @@ void kill_screen(const char* lcd_msg) { |
|
|
|
// Note: During Manual Bed Leveling the homed Z position is MESH_HOME_SEARCH_Z
|
|
|
|
// Z position will be restored with the final action, a G28
|
|
|
|
inline void _mbl_goto_xy(float x, float y) { |
|
|
|
if (no_reentrance) return; |
|
|
|
current_position[Z_AXIS] = LOGICAL_Z_POSITION(MESH_HOME_SEARCH_Z + Z_HOMING_HEIGHT); |
|
|
|
line_to_current(Z_AXIS); |
|
|
|
current_position[X_AXIS] = LOGICAL_X_POSITION(x); |
|
|
@ -1072,7 +1094,7 @@ void kill_screen(const char* lcd_msg) { |
|
|
|
current_position[Z_AXIS] = LOGICAL_Z_POSITION(MESH_HOME_SEARCH_Z); |
|
|
|
line_to_current(Z_AXIS); |
|
|
|
#endif |
|
|
|
stepper.synchronize(); |
|
|
|
lcd_synchronize(); |
|
|
|
} |
|
|
|
|
|
|
|
void _lcd_level_goto_next_point(); |
|
|
@ -1094,6 +1116,8 @@ void kill_screen(const char* lcd_msg) { |
|
|
|
void _lcd_level_bed_get_z() { |
|
|
|
ENCODER_DIRECTION_NORMAL(); |
|
|
|
|
|
|
|
if (no_reentrance) goto KeepDrawing; |
|
|
|
|
|
|
|
// Encoder wheel adjusts the Z position
|
|
|
|
if (encoderPosition) { |
|
|
|
refresh_cmd_timeout(); |
|
|
@ -1121,7 +1145,7 @@ void kill_screen(const char* lcd_msg) { |
|
|
|
|
|
|
|
current_position[Z_AXIS] = MESH_HOME_SEARCH_Z + Z_HOMING_HEIGHT; |
|
|
|
line_to_current(Z_AXIS); |
|
|
|
stepper.synchronize(); |
|
|
|
lcd_synchronize(); |
|
|
|
|
|
|
|
mbl.set_has_mesh(true); |
|
|
|
enqueue_and_echo_commands_P(PSTR("G28")); |
|
|
@ -1141,6 +1165,7 @@ void kill_screen(const char* lcd_msg) { |
|
|
|
debounce_click = false; |
|
|
|
} |
|
|
|
|
|
|
|
KeepDrawing: |
|
|
|
// Update on first display, then only on updates to Z position
|
|
|
|
// Show message above on clicks instead
|
|
|
|
if (lcdDrawUpdate) { |
|
|
@ -1215,8 +1240,9 @@ void kill_screen(const char* lcd_msg) { |
|
|
|
LCDVIEW_CALL_NO_REDRAW |
|
|
|
#endif |
|
|
|
; |
|
|
|
if (axis_homed[X_AXIS] && axis_homed[Y_AXIS] && axis_homed[Z_AXIS]) |
|
|
|
lcd_goto_screen(_lcd_level_bed_homing_done); |
|
|
|
if (no_reentrance) return; |
|
|
|
lcd_wait_for_homing(); |
|
|
|
lcd_goto_screen(_lcd_level_bed_homing_done); |
|
|
|
} |
|
|
|
|
|
|
|
/**
|
|
|
@ -1256,6 +1282,14 @@ void kill_screen(const char* lcd_msg) { |
|
|
|
//
|
|
|
|
MENU_BACK(MSG_MAIN); |
|
|
|
|
|
|
|
//
|
|
|
|
// Move Axis
|
|
|
|
//
|
|
|
|
#if ENABLED(DELTA) |
|
|
|
if (axis_homed[Z_AXIS]) |
|
|
|
#endif |
|
|
|
MENU_ITEM(submenu, MSG_MOVE_AXIS, lcd_move_menu); |
|
|
|
|
|
|
|
//
|
|
|
|
// Auto Home
|
|
|
|
//
|
|
|
@ -1283,11 +1317,6 @@ void kill_screen(const char* lcd_msg) { |
|
|
|
MENU_ITEM(submenu, MSG_LEVEL_BED, lcd_level_bed); |
|
|
|
#endif |
|
|
|
|
|
|
|
//
|
|
|
|
// Move Axis
|
|
|
|
//
|
|
|
|
MENU_ITEM(submenu, MSG_MOVE_AXIS, lcd_move_menu); |
|
|
|
|
|
|
|
//
|
|
|
|
// Disable Steppers
|
|
|
|
//
|
|
|
@ -1341,14 +1370,50 @@ void kill_screen(const char* lcd_msg) { |
|
|
|
END_MENU(); |
|
|
|
} |
|
|
|
|
|
|
|
float move_menu_scale; |
|
|
|
|
|
|
|
#if ENABLED(DELTA_CALIBRATION_MENU) |
|
|
|
|
|
|
|
void lcd_move_z(); |
|
|
|
void lcd_delta_calibrate_menu(); |
|
|
|
|
|
|
|
void _lcd_calibrate_homing() { |
|
|
|
if (lcdDrawUpdate) lcd_implementation_drawmenu_static(LCD_HEIGHT >= 4 ? 1 : 0, PSTR(MSG_LEVEL_BED_HOMING)); |
|
|
|
lcdDrawUpdate = |
|
|
|
#if ENABLED(DOGLCD) |
|
|
|
LCDVIEW_CALL_REDRAW_NEXT |
|
|
|
#else |
|
|
|
LCDVIEW_CALL_NO_REDRAW |
|
|
|
#endif |
|
|
|
; |
|
|
|
if (axis_homed[X_AXIS] && axis_homed[Y_AXIS] && axis_homed[Z_AXIS]) |
|
|
|
lcd_goto_previous_menu(); |
|
|
|
} |
|
|
|
|
|
|
|
void _lcd_delta_calibrate_home() { |
|
|
|
enqueue_and_echo_commands_P(PSTR("G28")); |
|
|
|
lcd_goto_screen(_lcd_calibrate_homing); |
|
|
|
} |
|
|
|
|
|
|
|
// Move directly to the tower position with uninterpolated moves
|
|
|
|
// If we used interpolated moves it would cause this to become re-entrant
|
|
|
|
void _goto_tower_pos(const float &a) { |
|
|
|
do_blocking_move_to( |
|
|
|
a < 0 ? X_HOME_POS : sin(a) * -(DELTA_PRINTABLE_RADIUS), |
|
|
|
a < 0 ? Y_HOME_POS : cos(a) * (DELTA_PRINTABLE_RADIUS), |
|
|
|
4 |
|
|
|
); |
|
|
|
if (no_reentrance) return; |
|
|
|
|
|
|
|
current_position[Z_AXIS] = max(Z_HOMING_HEIGHT, Z_CLEARANCE_BETWEEN_PROBES) + (DELTA_PRINTABLE_RADIUS) / 5; |
|
|
|
line_to_current(Z_AXIS); |
|
|
|
|
|
|
|
current_position[X_AXIS] = a < 0 ? X_HOME_POS : sin(a) * -(DELTA_PRINTABLE_RADIUS); |
|
|
|
current_position[Y_AXIS] = a < 0 ? Y_HOME_POS : cos(a) * (DELTA_PRINTABLE_RADIUS); |
|
|
|
line_to_current(Z_AXIS); |
|
|
|
|
|
|
|
current_position[Z_AXIS] = 4.0; |
|
|
|
line_to_current(Z_AXIS); |
|
|
|
|
|
|
|
lcd_synchronize(); |
|
|
|
|
|
|
|
move_menu_scale = 0.1; |
|
|
|
lcd_goto_screen(lcd_move_z); |
|
|
|
} |
|
|
|
|
|
|
|
void _goto_tower_x() { _goto_tower_pos(RADIANS(120)); } |
|
|
@ -1359,18 +1424,18 @@ void kill_screen(const char* lcd_msg) { |
|
|
|
void lcd_delta_calibrate_menu() { |
|
|
|
START_MENU(); |
|
|
|
MENU_BACK(MSG_MAIN); |
|
|
|
MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28")); |
|
|
|
MENU_ITEM(function, MSG_DELTA_CALIBRATE_X, _goto_tower_x); |
|
|
|
MENU_ITEM(function, MSG_DELTA_CALIBRATE_Y, _goto_tower_y); |
|
|
|
MENU_ITEM(function, MSG_DELTA_CALIBRATE_Z, _goto_tower_z); |
|
|
|
MENU_ITEM(function, MSG_DELTA_CALIBRATE_CENTER, _goto_center); |
|
|
|
MENU_ITEM(submenu, MSG_AUTO_HOME, _lcd_delta_calibrate_home); |
|
|
|
if (axis_homed[Z_AXIS]) { |
|
|
|
MENU_ITEM(submenu, MSG_DELTA_CALIBRATE_X, _goto_tower_x); |
|
|
|
MENU_ITEM(submenu, MSG_DELTA_CALIBRATE_Y, _goto_tower_y); |
|
|
|
MENU_ITEM(submenu, MSG_DELTA_CALIBRATE_Z, _goto_tower_z); |
|
|
|
MENU_ITEM(submenu, MSG_DELTA_CALIBRATE_CENTER, _goto_center); |
|
|
|
} |
|
|
|
END_MENU(); |
|
|
|
} |
|
|
|
|
|
|
|
#endif // DELTA_CALIBRATION_MENU
|
|
|
|
|
|
|
|
float move_menu_scale; |
|
|
|
|
|
|
|
/**
|
|
|
|
* If the most recent manual move hasn't been fed to the planner yet, |
|
|
|
* and the planner can accept one, send immediately |
|
|
@ -1495,58 +1560,48 @@ void kill_screen(const char* lcd_msg) { |
|
|
|
* |
|
|
|
*/ |
|
|
|
|
|
|
|
#if IS_KINEMATIC |
|
|
|
#define _MOVE_XYZ_ALLOWED (axis_homed[X_AXIS] && axis_homed[Y_AXIS] && axis_homed[Z_AXIS]) |
|
|
|
#else |
|
|
|
#define _MOVE_XYZ_ALLOWED true |
|
|
|
#endif |
|
|
|
screenFunc_t _manual_move_func_ptr; |
|
|
|
|
|
|
|
void _lcd_move_menu_axis() { |
|
|
|
START_MENU(); |
|
|
|
MENU_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) { |
|
|
|
if (_MOVE_XYZ_ALLOWED) MENU_ITEM(submenu, MSG_MOVE_Z, lcd_move_z); |
|
|
|
|
|
|
|
#if ENABLED(SWITCHING_EXTRUDER) |
|
|
|
if (active_extruder) |
|
|
|
MENU_ITEM(gcode, MSG_SELECT " " MSG_E1, PSTR("T0")); |
|
|
|
else |
|
|
|
MENU_ITEM(gcode, MSG_SELECT " " MSG_E2, PSTR("T1")); |
|
|
|
#endif |
|
|
|
void lcd_move_menu_10mm() { move_menu_scale = 10.0; lcd_goto_screen(_manual_move_func_ptr); } |
|
|
|
void lcd_move_menu_1mm() { move_menu_scale = 1.0; lcd_goto_screen(_manual_move_func_ptr); } |
|
|
|
void lcd_move_menu_01mm() { move_menu_scale = 0.1; lcd_goto_screen(_manual_move_func_ptr); } |
|
|
|
|
|
|
|
MENU_ITEM(submenu, MSG_MOVE_E, lcd_move_e); |
|
|
|
#if E_MANUAL > 1 |
|
|
|
MENU_ITEM(submenu, MSG_MOVE_E MSG_MOVE_E1, lcd_move_e0); |
|
|
|
MENU_ITEM(submenu, MSG_MOVE_E MSG_MOVE_E2, lcd_move_e1); |
|
|
|
#if E_MANUAL > 2 |
|
|
|
MENU_ITEM(submenu, MSG_MOVE_E MSG_MOVE_E3, lcd_move_e2); |
|
|
|
#if E_MANUAL > 3 |
|
|
|
MENU_ITEM(submenu, MSG_MOVE_E MSG_MOVE_E4, lcd_move_e3); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
void _lcd_move_distance_menu(AxisEnum axis, screenFunc_t func) { |
|
|
|
_manual_move_func_ptr = func; |
|
|
|
START_MENU(); |
|
|
|
if (LCD_HEIGHT >= 4) { |
|
|
|
switch(axis) { |
|
|
|
case X_AXIS: |
|
|
|
STATIC_ITEM(MSG_MOVE_X, true, true); break; |
|
|
|
case Y_AXIS: |
|
|
|
STATIC_ITEM(MSG_MOVE_Y, true, true); break; |
|
|
|
case Z_AXIS: |
|
|
|
STATIC_ITEM(MSG_MOVE_Z, true, true); break; |
|
|
|
default: |
|
|
|
STATIC_ITEM(MSG_MOVE_E, true, true); break; |
|
|
|
} |
|
|
|
} |
|
|
|
MENU_BACK(MSG_MOVE_AXIS); |
|
|
|
if (axis == X_AXIS || axis == Y_AXIS) |
|
|
|
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); |
|
|
|
END_MENU(); |
|
|
|
} |
|
|
|
|
|
|
|
void lcd_move_menu_10mm() { |
|
|
|
move_menu_scale = 10.0; |
|
|
|
_lcd_move_menu_axis(); |
|
|
|
} |
|
|
|
void lcd_move_menu_1mm() { |
|
|
|
move_menu_scale = 1.0; |
|
|
|
_lcd_move_menu_axis(); |
|
|
|
} |
|
|
|
void lcd_move_menu_01mm() { |
|
|
|
move_menu_scale = 0.1; |
|
|
|
_lcd_move_menu_axis(); |
|
|
|
} |
|
|
|
void lcd_move_get_x_amount() { _lcd_move_distance_menu(X_AXIS, lcd_move_x); } |
|
|
|
void lcd_move_get_y_amount() { _lcd_move_distance_menu(Y_AXIS, lcd_move_y); } |
|
|
|
void lcd_move_get_z_amount() { _lcd_move_distance_menu(Z_AXIS, lcd_move_z); } |
|
|
|
void lcd_move_get_e_amount() { _lcd_move_distance_menu(E_AXIS, lcd_move_e); } |
|
|
|
#if E_MANUAL > 1 |
|
|
|
void lcd_move_get_e0_amount() { _lcd_move_distance_menu(E_AXIS, lcd_move_e0); } |
|
|
|
void lcd_move_get_e1_amount() { _lcd_move_distance_menu(E_AXIS, lcd_move_e1); } |
|
|
|
#if E_MANUAL > 2 |
|
|
|
void lcd_move_get_e2_amount() { _lcd_move_distance_menu(E_AXIS, lcd_move_e2); } |
|
|
|
#if E_MANUAL > 3 |
|
|
|
void lcd_move_get_e3_amount() { _lcd_move_distance_menu(E_AXIS, lcd_move_e3); } |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
/**
|
|
|
|
* |
|
|
@ -1554,16 +1609,63 @@ void kill_screen(const char* lcd_msg) { |
|
|
|
* |
|
|
|
*/ |
|
|
|
|
|
|
|
#if IS_KINEMATIC |
|
|
|
#define _MOVE_XYZ_ALLOWED (axis_homed[X_AXIS] && axis_homed[Y_AXIS] && axis_homed[Z_AXIS]) |
|
|
|
#if ENABLED(DELTA) |
|
|
|
#define _MOVE_XY_ALLOWED (current_position[Z_AXIS] <= delta_clip_start_height) |
|
|
|
void lcd_lower_z_to_clip_height() { |
|
|
|
if (!no_reentrance) { |
|
|
|
current_position[Z_AXIS] = delta_clip_start_height; |
|
|
|
line_to_current(Z_AXIS); |
|
|
|
lcd_synchronize(); |
|
|
|
} |
|
|
|
} |
|
|
|
#else |
|
|
|
#define _MOVE_XY_ALLOWED true |
|
|
|
#endif |
|
|
|
#else |
|
|
|
#define _MOVE_XYZ_ALLOWED true |
|
|
|
#define _MOVE_XY_ALLOWED true |
|
|
|
#endif |
|
|
|
|
|
|
|
void lcd_move_menu() { |
|
|
|
START_MENU(); |
|
|
|
MENU_BACK(MSG_PREPARE); |
|
|
|
|
|
|
|
if (_MOVE_XYZ_ALLOWED) |
|
|
|
MENU_ITEM(submenu, MSG_MOVE_10MM, lcd_move_menu_10mm); |
|
|
|
if (_MOVE_XYZ_ALLOWED) { |
|
|
|
if (_MOVE_XY_ALLOWED) { |
|
|
|
MENU_ITEM(submenu, MSG_MOVE_X, lcd_move_get_x_amount); |
|
|
|
MENU_ITEM(submenu, MSG_MOVE_Y, lcd_move_get_y_amount); |
|
|
|
} |
|
|
|
#if ENABLED(DELTA) |
|
|
|
else |
|
|
|
MENU_ITEM(function, MSG_FREE_XY, lcd_lower_z_to_clip_height); |
|
|
|
#endif |
|
|
|
|
|
|
|
MENU_ITEM(submenu, MSG_MOVE_Z, lcd_move_get_z_amount); |
|
|
|
} |
|
|
|
else |
|
|
|
MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28")); |
|
|
|
|
|
|
|
#if ENABLED(SWITCHING_EXTRUDER) |
|
|
|
if (active_extruder) |
|
|
|
MENU_ITEM(gcode, MSG_SELECT " " MSG_E1, PSTR("T0")); |
|
|
|
else |
|
|
|
MENU_ITEM(gcode, MSG_SELECT " " MSG_E2, PSTR("T1")); |
|
|
|
#endif |
|
|
|
|
|
|
|
MENU_ITEM(submenu, MSG_MOVE_E, lcd_move_get_e_amount); |
|
|
|
#if E_MANUAL > 1 |
|
|
|
MENU_ITEM(submenu, MSG_MOVE_E MSG_MOVE_E1, lcd_move_get_e0_amount); |
|
|
|
MENU_ITEM(submenu, MSG_MOVE_E MSG_MOVE_E2, lcd_move_get_e1_amount); |
|
|
|
#if E_MANUAL > 2 |
|
|
|
MENU_ITEM(submenu, MSG_MOVE_E MSG_MOVE_E3, lcd_move_get_e2_amount); |
|
|
|
#if E_MANUAL > 3 |
|
|
|
MENU_ITEM(submenu, MSG_MOVE_E MSG_MOVE_E4, lcd_move_get_e3_amount); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
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
|
|
|
|
END_MENU(); |
|
|
|
} |
|
|
|
|
|
|
@ -2502,6 +2604,39 @@ void kill_screen(const char* lcd_msg) { |
|
|
|
void reprapworld_keypad_move_y_down() { _reprapworld_keypad_move(Y_AXIS, 1); } |
|
|
|
void reprapworld_keypad_move_home() { enqueue_and_echo_commands_P(PSTR("G28")); } // move all axes home and wait
|
|
|
|
void reprapworld_keypad_move_menu() { lcd_goto_screen(lcd_move_menu); } |
|
|
|
|
|
|
|
inline void handle_reprapworld_keypad() { |
|
|
|
|
|
|
|
static uint8_t keypad_debounce = 0; |
|
|
|
|
|
|
|
if (!REPRAPWORLD_KEYPAD_PRESSED) { |
|
|
|
if (keypad_debounce > 0) keypad_debounce--; |
|
|
|
} |
|
|
|
else if (!keypad_debounce) { |
|
|
|
keypad_debounce = 2; |
|
|
|
|
|
|
|
if (REPRAPWORLD_KEYPAD_MOVE_MENU) reprapworld_keypad_move_menu(); |
|
|
|
|
|
|
|
#if DISABLED(DELTA) && Z_HOME_DIR == -1 |
|
|
|
if (REPRAPWORLD_KEYPAD_MOVE_Z_UP) reprapworld_keypad_move_z_up(); |
|
|
|
#endif |
|
|
|
|
|
|
|
if (axis_homed[X_AXIS] && axis_homed[Y_AXIS] && axis_homed[Z_AXIS]) { |
|
|
|
#if ENABLED(DELTA) || Z_HOME_DIR != -1 |
|
|
|
if (REPRAPWORLD_KEYPAD_MOVE_Z_UP) reprapworld_keypad_move_z_up(); |
|
|
|
#endif |
|
|
|
if (REPRAPWORLD_KEYPAD_MOVE_Z_DOWN) reprapworld_keypad_move_z_down(); |
|
|
|
if (REPRAPWORLD_KEYPAD_MOVE_X_LEFT) reprapworld_keypad_move_x_left(); |
|
|
|
if (REPRAPWORLD_KEYPAD_MOVE_X_RIGHT) reprapworld_keypad_move_x_right(); |
|
|
|
if (REPRAPWORLD_KEYPAD_MOVE_Y_DOWN) reprapworld_keypad_move_y_down(); |
|
|
|
if (REPRAPWORLD_KEYPAD_MOVE_Y_UP) reprapworld_keypad_move_y_up(); |
|
|
|
} |
|
|
|
else { |
|
|
|
if (REPRAPWORLD_KEYPAD_MOVE_HOME) reprapworld_keypad_move_home(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
#endif // REPRAPWORLD_KEYPAD
|
|
|
|
|
|
|
|
/**
|
|
|
@ -2773,36 +2908,8 @@ void lcd_update() { |
|
|
|
#endif |
|
|
|
|
|
|
|
#if ENABLED(REPRAPWORLD_KEYPAD) |
|
|
|
|
|
|
|
static uint8_t keypad_debounce = 0; |
|
|
|
|
|
|
|
if (!REPRAPWORLD_KEYPAD_PRESSED) { |
|
|
|
if (keypad_debounce > 0) keypad_debounce--; |
|
|
|
} |
|
|
|
else if (!keypad_debounce) { |
|
|
|
keypad_debounce = 2; |
|
|
|
|
|
|
|
if (REPRAPWORLD_KEYPAD_MOVE_MENU) reprapworld_keypad_move_menu(); |
|
|
|
|
|
|
|
#if DISABLED(DELTA) && Z_HOME_DIR == -1 |
|
|
|
if (REPRAPWORLD_KEYPAD_MOVE_Z_UP) reprapworld_keypad_move_z_up(); |
|
|
|
#endif |
|
|
|
|
|
|
|
if (axis_homed[X_AXIS] && axis_homed[Y_AXIS] && axis_homed[Z_AXIS]) { |
|
|
|
#if ENABLED(DELTA) || Z_HOME_DIR != -1 |
|
|
|
if (REPRAPWORLD_KEYPAD_MOVE_Z_UP) reprapworld_keypad_move_z_up(); |
|
|
|
#endif |
|
|
|
if (REPRAPWORLD_KEYPAD_MOVE_Z_DOWN) reprapworld_keypad_move_z_down(); |
|
|
|
if (REPRAPWORLD_KEYPAD_MOVE_X_LEFT) reprapworld_keypad_move_x_left(); |
|
|
|
if (REPRAPWORLD_KEYPAD_MOVE_X_RIGHT) reprapworld_keypad_move_x_right(); |
|
|
|
if (REPRAPWORLD_KEYPAD_MOVE_Y_DOWN) reprapworld_keypad_move_y_down(); |
|
|
|
if (REPRAPWORLD_KEYPAD_MOVE_Y_UP) reprapworld_keypad_move_y_up(); |
|
|
|
} |
|
|
|
else { |
|
|
|
if (REPRAPWORLD_KEYPAD_MOVE_HOME) reprapworld_keypad_move_home(); |
|
|
|
} |
|
|
|
} |
|
|
|
#endif // REPRAPWORLD_KEYPAD
|
|
|
|
handle_reprapworld_keypad(); |
|
|
|
#endif |
|
|
|
|
|
|
|
bool encoderPastThreshold = (abs(encoderDiff) >= ENCODER_PULSES_PER_STEP); |
|
|
|
if (encoderPastThreshold || lcd_clicked) { |
|
|
|