🎨 Refactor Host Actions as singleton

This commit is contained in:
Scott Lahteine
2021-10-15 00:24:08 -05:00
committed by Scott Lahteine
parent 1ead7ce681
commit f80bcdcc5c
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();

View File

@ -301,7 +301,7 @@ void menu_main() {
ACTION_ITEM(MSG_RESUME_PRINT, ui.resume_print);
#if ENABLED(HOST_START_MENU_ITEM) && defined(ACTION_ON_START)
ACTION_ITEM(MSG_HOST_START_PRINT, host_action_start);
ACTION_ITEM(MSG_HOST_START_PRINT, hostui.start);
#endif
#if ENABLED(PREHEAT_SHORTCUT_MENU_ITEM)