Touch-MI Menu and Manual Deploy option (#14290)

This commit is contained in:
Tanguy Pruvot
2019-07-01 06:55:27 +02:00
committed by Scott Lahteine
parent dab2f0c89c
commit 24655a6bf3
111 changed files with 269 additions and 109 deletions

View File

@ -109,10 +109,26 @@ float zprobe_zoffset; // Initialized by settings.load()
void run_deploy_moves_script() {
#ifndef TOUCH_MI_DEPLOY_XPOS
#define TOUCH_MI_DEPLOY_XPOS 0
#elif X_HOME_DIR > 0 && TOUCH_MI_DEPLOY_XPOS > X_MAX_BED
#elif TOUCH_MI_DEPLOY_XPOS > X_MAX_BED
TemporaryGlobalEndstopsState unlock_x(false);
#endif
do_blocking_move_to_x(TOUCH_MI_DEPLOY_XPOS);
#if ENABLED(TOUCH_MI_MANUAL_DEPLOY)
const screenFunc_t prev_screen = ui.currentScreen;
LCD_MESSAGEPGM(MSG_MANUAL_DEPLOY_TOUCHMI);
ui.return_to_status();
KEEPALIVE_STATE(PAUSED_FOR_USER);
wait_for_user = true; // LCD click or M108 will clear this
#if ENABLED(HOST_PROMPT_SUPPORT)
host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Deploy TouchMI probe."), PSTR("Continue"));
#endif
while (wait_for_user) idle();
ui.reset_status();
ui.goto_screen(prev_screen);
#else
do_blocking_move_to_x(TOUCH_MI_DEPLOY_XPOS);
#endif
}
// Move down to the bed to stow the probe