From 4654a2dc6301cbf6ff2b7da59d94c0caccf8e31c Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 11 Sep 2021 02:15:05 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9=20Warn=20about=20user=20feedback?= =?UTF-8?q?=20requirement?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/feature/mmu/mmu2.cpp | 2 +- Marlin/src/feature/pause.cpp | 2 +- Marlin/src/gcode/lcd/M0_M1.cpp | 2 +- Marlin/src/gcode/sd/M1001.cpp | 2 +- Marlin/src/inc/SanityCheck.h | 4 ++++ Marlin/src/lcd/menu/menu_delta_calibrate.cpp | 8 ++++---- Marlin/src/module/probe.cpp | 4 ++-- 7 files changed, 14 insertions(+), 10 deletions(-) diff --git a/Marlin/src/feature/mmu/mmu2.cpp b/Marlin/src/feature/mmu/mmu2.cpp index 31e64f49537b9..cf03eaf7f6578 100644 --- a/Marlin/src/feature/mmu/mmu2.cpp +++ b/Marlin/src/feature/mmu/mmu2.cpp @@ -962,7 +962,7 @@ bool MMU2::eject_filament(const uint8_t index, const bool recover) { BUZZ(200, 404); TERN_(HOST_PROMPT_SUPPORT, host_prompt_do(PROMPT_USER_CONTINUE, PSTR("MMU2 Eject Recover"), CONTINUE_STR)); TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired_P(PSTR("MMU2 Eject Recover"))); - wait_for_user_response(); + TERN_(HAS_RESUME_CONTINUE, wait_for_user_response()); BUZZ(200, 404); BUZZ(200, 404); diff --git a/Marlin/src/feature/pause.cpp b/Marlin/src/feature/pause.cpp index d9b2521403300..f9e3d1b9c2642 100644 --- a/Marlin/src/feature/pause.cpp +++ b/Marlin/src/feature/pause.cpp @@ -522,7 +522,7 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_HEATER_TIMEOUT))); - wait_for_user_response(0, true); // Wait for LCD click or M108 + TERN_(HAS_RESUME_CONTINUE, wait_for_user_response(0, true)); // Wait for LCD click or M108 TERN_(HOST_PROMPT_SUPPORT, host_prompt_do(PROMPT_INFO, GET_TEXT(MSG_REHEATING))); diff --git a/Marlin/src/gcode/lcd/M0_M1.cpp b/Marlin/src/gcode/lcd/M0_M1.cpp index cb37bfec24844..9ba6ed5fc73b3 100644 --- a/Marlin/src/gcode/lcd/M0_M1.cpp +++ b/Marlin/src/gcode/lcd/M0_M1.cpp @@ -83,7 +83,7 @@ void GcodeSuite::M0_M1() { TERN_(HOST_PROMPT_SUPPORT, host_prompt_do(PROMPT_USER_CONTINUE, parser.codenum ? PSTR("M1 Stop") : PSTR("M0 Stop"), CONTINUE_STR)); - wait_for_user_response(ms); + TERN_(HAS_RESUME_CONTINUE, wait_for_user_response(ms)); TERN_(HAS_LCD_MENU, ui.reset_status()); } diff --git a/Marlin/src/gcode/sd/M1001.cpp b/Marlin/src/gcode/sd/M1001.cpp index 14bd712d272e9..f5ee6a94d15be 100644 --- a/Marlin/src/gcode/sd/M1001.cpp +++ b/Marlin/src/gcode/sd/M1001.cpp @@ -97,7 +97,7 @@ void GcodeSuite::M1001() { printerEventLEDs.onPrintCompleted(); TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_PRINT_DONE))); TERN_(HOST_PROMPT_SUPPORT, host_prompt_do(PROMPT_USER_CONTINUE, GET_TEXT(MSG_PRINT_DONE), CONTINUE_STR)); - wait_for_user_response(SEC_TO_MS(TERN(HAS_LCD_MENU, PE_LEDS_COMPLETED_TIME, 30))); + TERN_(HAS_RESUME_CONTINUE, wait_for_user_response(SEC_TO_MS(TERN(HAS_LCD_MENU, PE_LEDS_COMPLETED_TIME, 30)))); printerEventLEDs.onResumeAfterWait(); } #endif diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 3c00d84142e70..35ee74b5aab01 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -999,6 +999,10 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS static_assert(WITHIN(npp_xyz.z, Z_MIN_POS, Z_MAX_POS), "NOZZLE_PARK_POINT.Z is out of bounds (Z_MIN_POS, Z_MAX_POS)."); #endif +#if !HAS_RESUME_CONTINUE && DISABLED(HOST_PROMPT_SUPPORT) && DISABLED(EXTENSIBLE_UI) + #warning "Your Configuration provides no method to acquire user feedback!" +#endif + /** * Instant Freeze */ diff --git a/Marlin/src/lcd/menu/menu_delta_calibrate.cpp b/Marlin/src/lcd/menu/menu_delta_calibrate.cpp index 810f376f827bb..ba119abc37be2 100644 --- a/Marlin/src/lcd/menu/menu_delta_calibrate.cpp +++ b/Marlin/src/lcd/menu/menu_delta_calibrate.cpp @@ -54,9 +54,9 @@ void _man_probe_pt(const xy_pos_t &xy) { #if ENABLED(DELTA_AUTO_CALIBRATION) - #include "../../MarlinCore.h" // for wait_for_user_response() - #include "../../gcode/gcode.h" - + #if HAS_RESUME_CONTINUE + #include "../../MarlinCore.h" // for wait_for_user_response() + #endif #if ENABLED(HOST_PROMPT_SUPPORT) #include "../../feature/host_actions.h" // for host_prompt_do #endif @@ -66,7 +66,7 @@ void _man_probe_pt(const xy_pos_t &xy) { ui.defer_status_screen(); TERN_(HOST_PROMPT_SUPPORT, host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Delta Calibration in progress"), CONTINUE_STR)); TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired_P(PSTR("Delta Calibration in progress"))); - wait_for_user_response(); + TERN_(HAS_RESUME_CONTINUE, wait_for_user_response()); ui.goto_previous_screen_no_defer(); return current_position.z; } diff --git a/Marlin/src/module/probe.cpp b/Marlin/src/module/probe.cpp index 16ff166493edb..3b8a4a520f9d6 100644 --- a/Marlin/src/module/probe.cpp +++ b/Marlin/src/module/probe.cpp @@ -141,7 +141,7 @@ xyz_pos_t Probe::offset; // Initialized by settings.load() ui.return_to_status(); TERN_(HOST_PROMPT_SUPPORT, host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Deploy TouchMI"), CONTINUE_STR)); - wait_for_user_response(); + TERN_(HAS_RESUME_CONTINUE, wait_for_user_response()); ui.reset_status(); ui.goto_screen(prev_screen); @@ -298,7 +298,7 @@ FORCE_INLINE void probe_specific_action(const bool deploy) { TERN_(HOST_PROMPT_SUPPORT, host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Stow Probe"), CONTINUE_STR)); TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired_P(PSTR("Stow Probe"))); TERN_(DWIN_CREALITY_LCD_ENHANCED, DWIN_Popup_Confirm(ICON_BLTouch, PSTR("Stow Probe"), CONTINUE_STR)); - wait_for_user_response(); + TERN_(HAS_RESUME_CONTINUE, wait_for_user_response()); ui.reset_status(); } while (ENABLED(PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED));