Option to pause probe deployment only when triggered, for manually-deployed allen-key probe (#13698)

This commit is contained in:
Robby Candra
2019-04-16 13:32:43 +07:00
committed by Scott Lahteine
parent 35160dfb7a
commit 7ca1fea22b
96 changed files with 311 additions and 15 deletions

View File

@ -927,6 +927,9 @@
// Before deploy/stow pause for user confirmation
//#define PAUSE_BEFORE_DEPLOY_STOW
#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW)
//#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe
#endif
/**
* Enable one or more of the following if probing seems unreliable.

View File

@ -310,24 +310,35 @@ inline void do_probe_raise(const float z_raise) {
FORCE_INLINE void probe_specific_action(const bool deploy) {
#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW)
do {
#if ENABLED(PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED)
if (READ(Z_MIN_PROBE_PIN) == (deploy == bool(Z_MIN_PROBE_ENDSTOP_INVERTING))) break;
#endif
BUZZ(100, 659);
BUZZ(100, 698);
BUZZ(100, 659);
BUZZ(100, 698);
PGM_P const ds_str = deploy ? PSTR(MSG_MANUAL_DEPLOY) : PSTR(MSG_MANUAL_STOW);
ui.return_to_status(); // To display the new status message
ui.set_status_P(ds_str, 99);
serialprintPGM(ds_str);
SERIAL_EOL();
PGM_P const ds_str = deploy ? PSTR(MSG_MANUAL_DEPLOY) : PSTR(MSG_MANUAL_STOW);
ui.return_to_status(); // To display the new status message
ui.set_status_P(ds_str, 99);
serialprintPGM(ds_str);
SERIAL_EOL();
KEEPALIVE_STATE(PAUSED_FOR_USER);
wait_for_user = true;
#if ENABLED(HOST_PROMPT_SUPPORT)
host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Stow Probe"), PSTR("Continue"));
#endif
while (wait_for_user) idle();
ui.reset_status();
KEEPALIVE_STATE(IN_HANDLER);
KEEPALIVE_STATE(PAUSED_FOR_USER);
wait_for_user = true;
#if ENABLED(HOST_PROMPT_SUPPORT)
host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Stow Probe"), PSTR("Continue"));
#endif
while (wait_for_user) idle();
ui.reset_status();
KEEPALIVE_STATE(IN_HANDLER);
} while(
#if ENABLED(PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED)
true
#else
false
#endif
);
#endif // PAUSE_BEFORE_DEPLOY_STOW