Add HOST_PROMPT_SUPPORT (#13039)

This commit is contained in:
InsanityAutomation
2019-02-12 16:55:47 -05:00
committed by Scott Lahteine
parent 0feeef2604
commit 7f1b69b0c8
189 changed files with 2076 additions and 3479 deletions

View File

@ -42,11 +42,19 @@
#include "../../sd/cardreader.h"
#endif
#if ENABLED(HOST_ACTION_COMMANDS)
#include "../../feature/host_actions.h"
#endif
void lcd_pause() {
#if ENABLED(POWER_LOSS_RECOVERY)
if (recovery.enabled) recovery.save(true, false);
#endif
#if ENABLED(HOST_PROMPT_SUPPORT)
host_prompt_open(PROMPT_PAUSE_RESUME, PSTR("UI Pause"), PSTR("Resume"));
#endif
#if ENABLED(PARK_HEAD_ON_PAUSE)
lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_INIT, ADVANCED_PAUSE_MODE_PAUSE_PRINT); // Show message immediately to let user know about pause in progress
enqueue_and_echo_commands_P(PSTR("M25 P\nM24"));
@ -75,6 +83,9 @@ void lcd_stop() {
#ifdef ACTION_ON_CANCEL
host_action_cancel();
#endif
#if ENABLED(HOST_PROMPT_SUPPORT)
host_prompt_open(PROMPT_INFO, PSTR("UI Abort"));
#endif
ui.set_status_P(PSTR(MSG_PRINT_ABORTED), -1);
ui.return_to_status();
}
@ -147,9 +158,9 @@ void menu_main() {
}
#endif // !HAS_ENCODER_WHEEL && SDSUPPORT
#if ENABLED(SDSUPPORT) || defined(ACTION_ON_RESUME)
#if ENABLED(SDSUPPORT)
if (card.isFileOpen() && card.isPaused())
#if ENABLED(SDSUPPORT) || ENABLED(HOST_ACTION_COMMANDS)
#if DISABLED(HOST_ACTION_COMMANDS)
if (card_open && card.isPaused())
#endif
MENU_ITEM(function, MSG_RESUME_PRINT, lcd_resume);
#endif