🎨 Refactor Host Actions as singleton

This commit is contained in:
Scott Lahteine
2021-10-15 00:24:08 -05:00
parent de5aefd09e
commit ee28a14e8e
26 changed files with 208 additions and 150 deletions

View File

@@ -58,13 +58,13 @@ void _man_probe_pt(const xy_pos_t &xy) {
#include "../../MarlinCore.h" // for wait_for_user_response()
#endif
#if ENABLED(HOST_PROMPT_SUPPORT)
#include "../../feature/host_actions.h" // for host_prompt_do
#include "../../feature/host_actions.h" // for hostui.prompt_do
#endif
float lcd_probe_pt(const xy_pos_t &xy) {
_man_probe_pt(xy);
ui.defer_status_screen();
TERN_(HOST_PROMPT_SUPPORT, host_prompt_do(PROMPT_USER_CONTINUE, F("Delta Calibration in progress"), FPSTR(CONTINUE_STR)));
TERN_(HOST_PROMPT_SUPPORT, hostui.prompt_do(PROMPT_USER_CONTINUE, F("Delta Calibration in progress"), FPSTR(CONTINUE_STR)));
TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(F("Delta Calibration in progress")));
TERN_(HAS_RESUME_CONTINUE, wait_for_user_response());
ui.goto_previous_screen_no_defer();