Browse Source

Add option to move Z on double-click when idle

pull/1/head
dot-bob 6 years ago
committed by Scott Lahteine
parent
commit
b0fd8f2d74
  1. 5
      Marlin/Configuration_adv.h
  2. 5
      Marlin/src/config/default/Configuration_adv.h
  3. 32
      Marlin/src/lcd/ultralcd.cpp

5
Marlin/Configuration_adv.h

@ -777,6 +777,11 @@
// Note: Extra time may be added to mitigate controller latency.
#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
#if ENABLED(BABYSTEP_ZPROBE_OFFSET)
//#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets

5
Marlin/src/config/default/Configuration_adv.h

@ -777,6 +777,11 @@
// Note: Extra time may be added to mitigate controller latency.
#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
#if ENABLED(BABYSTEP_ZPROBE_OFFSET)
//#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets

32
Marlin/src/lcd/ultralcd.cpp

@ -509,6 +509,9 @@ uint16_t max_display_update_time = 0;
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
*/
@ -528,14 +531,23 @@ uint16_t max_display_update_time = 0;
if (currentScreen == lcd_status_screen)
doubleclick_expire_ms = millis() + DOUBLECLICK_MAX_INTERVAL;
}
else if (screen == lcd_status_screen && currentScreen == lcd_main_menu && PENDING(millis(), doubleclick_expire_ms)/* && printer_busy()*/)
screen =
#if ENABLED(BABYSTEP_ZPROBE_OFFSET)
lcd_babystep_zoffset
#else
lcd_babystep_z
#endif
;
else if (screen == lcd_status_screen && currentScreen == lcd_main_menu && PENDING(millis(), doubleclick_expire_ms)) {
if (printer_busy()) {
screen =
#if ENABLED(BABYSTEP_ZPROBE_OFFSET)
lcd_babystep_zoffset
#else
lcd_babystep_z
#endif
;
}
#if ENABLED(MOVE_Z_WHEN_IDLE)
else {
move_menu_scale = MOVE_Z_IDLE_MULTIPLICATOR;
screen = lcd_move_z;
}
#endif
}
#endif
currentScreen = screen;
@ -2850,12 +2862,8 @@ void lcd_quick_feedback(const bool clear_buttons) {
END_MENU();
}
float move_menu_scale;
#if ENABLED(DELTA_CALIBRATION_MENU) || ENABLED(DELTA_AUTO_CALIBRATION)
void lcd_move_z();
void _man_probe_pt(const float &rx, const float &ry) {
do_blocking_move_to_z(Z_CLEARANCE_BETWEEN_PROBES);
do_blocking_move_to_xy(rx, ry);

Loading…
Cancel
Save