Touch-MI Menu and Manual Deploy option (#14290)
This commit is contained in:
committed by
Scott Lahteine
parent
dab2f0c89c
commit
24655a6bf3
@ -839,12 +839,13 @@
|
||||
* on the right, enable and set TOUCH_MI_DEPLOY_XPOS to the deploy position.
|
||||
*
|
||||
* Also requires: BABYSTEPPING, BABYSTEP_ZPROBE_OFFSET, Z_SAFE_HOMING,
|
||||
* MIN_PROBE_EDGE, and a minimum Z_HOMING_HEIGHT of 10.
|
||||
* and a minimum Z_HOMING_HEIGHT of 10.
|
||||
*/
|
||||
//#define TOUCH_MI_PROBE
|
||||
#if ENABLED(TOUCH_MI_PROBE)
|
||||
#define TOUCH_MI_RETRACT_Z 0.5 // Height at which the probe retracts
|
||||
//#define TOUCH_MI_DEPLOY_XPOS (X_MAX_BED + 2) // For a magnet on the right side of the bed
|
||||
//#define TOUCH_MI_MANUAL_DEPLOY // For manual deploy (LCD menu)
|
||||
#endif
|
||||
|
||||
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
|
||||
|
@ -948,6 +948,21 @@
|
||||
#ifndef MSG_BLTOUCH_MODE_CHANGE
|
||||
#define MSG_BLTOUCH_MODE_CHANGE _UxGT("DANGER: Bad settings can cause damage! Proceed anyway?")
|
||||
#endif
|
||||
#ifndef MSG_TOUCHMI_PROBE
|
||||
#define MSG_TOUCHMI_PROBE _UxGT("TouchMI")
|
||||
#endif
|
||||
#ifndef MSG_TOUCHMI_INIT
|
||||
#define MSG_TOUCHMI_INIT _UxGT("Init TouchMI")
|
||||
#endif
|
||||
#ifndef MSG_TOUCHMI_ZTEST
|
||||
#define MSG_TOUCHMI_ZTEST _UxGT("Z offset Test")
|
||||
#endif
|
||||
#ifndef MSG_TOUCHMI_SAVE
|
||||
#define MSG_TOUCHMI_SAVE _UxGT("Save")
|
||||
#endif
|
||||
#ifndef MSG_MANUAL_DEPLOY_TOUCHMI
|
||||
#define MSG_MANUAL_DEPLOY_TOUCHMI _UxGT("Deploy TouchMI")
|
||||
#endif
|
||||
#ifndef MSG_MANUAL_DEPLOY
|
||||
#define MSG_MANUAL_DEPLOY _UxGT("Deploy Z-Probe")
|
||||
#endif
|
||||
|
@ -334,6 +334,11 @@
|
||||
#define MSG_BLTOUCH_MODE_STORE_5V _UxGT("Mise en 5V")
|
||||
#define MSG_BLTOUCH_MODE_STORE_OD _UxGT("Mise en OD")
|
||||
#define MSG_BLTOUCH_MODE_ECHO _UxGT("Afficher Mode")
|
||||
#define MSG_TOUCHMI_PROBE _UxGT("TouchMI")
|
||||
#define MSG_TOUCHMI_INIT _UxGT("Init. TouchMI")
|
||||
#define MSG_TOUCHMI_ZTEST _UxGT("Test décalage Z")
|
||||
#define MSG_TOUCHMI_SAVE _UxGT("Sauvegarde")
|
||||
#define MSG_MANUAL_DEPLOY_TOUCHMI _UxGT("Déployer TouchMI")
|
||||
#define MSG_MANUAL_DEPLOY _UxGT("Déployer Sonde Z")
|
||||
#define MSG_MANUAL_STOW _UxGT("Ranger Sonde Z")
|
||||
#define MSG_HOME _UxGT("Origine") // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST
|
||||
|
@ -219,6 +219,19 @@ static void lcd_factory_settings() {
|
||||
|
||||
#endif
|
||||
|
||||
#if ENABLED(TOUCH_MI_PROBE)
|
||||
void menu_touchmi() {
|
||||
START_MENU();
|
||||
ui.defer_status_screen();
|
||||
MENU_BACK(MSG_CONFIGURATION);
|
||||
MENU_ITEM(gcode, MSG_TOUCHMI_INIT, PSTR("M851 Z0\nG28\nG1 F200 Z0"));
|
||||
MENU_ITEM(submenu, MSG_ZPROBE_ZOFFSET, lcd_babystep_zoffset);
|
||||
MENU_ITEM(gcode, MSG_TOUCHMI_SAVE, PSTR("M500\nG1 F200 Z10"));
|
||||
MENU_ITEM(gcode, MSG_TOUCHMI_ZTEST, PSTR("G28\nG1 F200 Z0"));
|
||||
END_MENU();
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ENABLED(CASE_LIGHT_MENU)
|
||||
|
||||
#include "../../feature/caselight.h"
|
||||
@ -347,6 +360,10 @@ void menu_configuration() {
|
||||
#if ENABLED(BLTOUCH)
|
||||
MENU_ITEM(submenu, MSG_BLTOUCH, menu_bltouch);
|
||||
#endif
|
||||
|
||||
#if ENABLED(TOUCH_MI_PROBE)
|
||||
MENU_ITEM(submenu, MSG_TOUCHMI_PROBE, menu_touchmi);
|
||||
#endif
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user