Add option to move Z on double-click when idle

2.0.x
dot-bob 6 years ago committed by Scott Lahteine
parent 389376c40e
commit b0fd8f2d74

@ -777,6 +777,11 @@
// Note: Extra time may be added to mitigate controller latency. // Note: Extra time may be added to mitigate controller latency.
#endif #endif
//#define MOVE_Z_WHEN_IDLE // Jump to the move Z menu on doubleclick when printer is idle.
#if ENABLED(MOVE_Z_WHEN_IDLE)
#define MOVE_Z_IDLE_MULTIPLICATOR 1 // Multiply 1mm by this factor for the move step size.
#endif
//#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping
#if ENABLED(BABYSTEP_ZPROBE_OFFSET) #if ENABLED(BABYSTEP_ZPROBE_OFFSET)
//#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets

@ -777,6 +777,11 @@
// Note: Extra time may be added to mitigate controller latency. // Note: Extra time may be added to mitigate controller latency.
#endif #endif
//#define MOVE_Z_WHEN_IDLE // Jump to the move Z menu on doubleclick when printer is idle.
#if ENABLED(MOVE_Z_WHEN_IDLE)
#define MOVE_Z_IDLE_MULTIPLICATOR 1 // Multiply 1mm by this factor for the move step size.
#endif
//#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping
#if ENABLED(BABYSTEP_ZPROBE_OFFSET) #if ENABLED(BABYSTEP_ZPROBE_OFFSET)
//#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets

@ -509,6 +509,9 @@ uint16_t max_display_update_time = 0;
inline bool printer_busy() { return planner.movesplanned() || IS_SD_PRINTING; } inline bool printer_busy() { return planner.movesplanned() || IS_SD_PRINTING; }
void lcd_move_z();
float move_menu_scale;
/** /**
* General function to go directly to a screen * General function to go directly to a screen
*/ */
@ -528,7 +531,8 @@ uint16_t max_display_update_time = 0;
if (currentScreen == lcd_status_screen) if (currentScreen == lcd_status_screen)
doubleclick_expire_ms = millis() + DOUBLECLICK_MAX_INTERVAL; doubleclick_expire_ms = millis() + DOUBLECLICK_MAX_INTERVAL;
} }
else if (screen == lcd_status_screen && currentScreen == lcd_main_menu && PENDING(millis(), doubleclick_expire_ms)/* && printer_busy()*/) else if (screen == lcd_status_screen && currentScreen == lcd_main_menu && PENDING(millis(), doubleclick_expire_ms)) {
if (printer_busy()) {
screen = screen =
#if ENABLED(BABYSTEP_ZPROBE_OFFSET) #if ENABLED(BABYSTEP_ZPROBE_OFFSET)
lcd_babystep_zoffset lcd_babystep_zoffset
@ -536,6 +540,14 @@ uint16_t max_display_update_time = 0;
lcd_babystep_z lcd_babystep_z
#endif #endif
; ;
}
#if ENABLED(MOVE_Z_WHEN_IDLE)
else {
move_menu_scale = MOVE_Z_IDLE_MULTIPLICATOR;
screen = lcd_move_z;
}
#endif
}
#endif #endif
currentScreen = screen; currentScreen = screen;
@ -2850,12 +2862,8 @@ void lcd_quick_feedback(const bool clear_buttons) {
END_MENU(); END_MENU();
} }
float move_menu_scale;
#if ENABLED(DELTA_CALIBRATION_MENU) || ENABLED(DELTA_AUTO_CALIBRATION) #if ENABLED(DELTA_CALIBRATION_MENU) || ENABLED(DELTA_AUTO_CALIBRATION)
void lcd_move_z();
void _man_probe_pt(const float &rx, const float &ry) { void _man_probe_pt(const float &rx, const float &ry) {
do_blocking_move_to_z(Z_CLEARANCE_BETWEEN_PROBES); do_blocking_move_to_z(Z_CLEARANCE_BETWEEN_PROBES);
do_blocking_move_to_xy(rx, ry); do_blocking_move_to_xy(rx, ry);

Loading…
Cancel
Save