Restore Host Prompt Info (#15387)

This commit is contained in:
InsanityAutomation 2019-09-27 18:06:26 -04:00 committed by Scott Lahteine
parent 02bbc51195
commit 5221e2d991
6 changed files with 25 additions and 3 deletions

View File

@ -414,7 +414,7 @@ void disable_all_steppers() {
void event_probe_recover() {
#if ENABLED(HOST_PROMPT_SUPPORT)
host_prompt_do(PROMPT_INFO, PSTR("G29 Retrying"));
host_prompt_do(PROMPT_INFO, PSTR("G29 Retrying"), PSTR("Dismiss"));
#endif
#ifdef ACTION_ON_G29_RECOVER
host_action(PSTR(ACTION_ON_G29_RECOVER));
@ -1155,6 +1155,10 @@ void setup() {
card.beginautostart();
#endif
#if ENABLED(HOST_PROMPT_SUPPORT)
host_action_prompt_end();
#endif
#if HAS_TRINAMIC && DISABLED(PS_DEFAULT_OFF)
test_tmc_connection(true, true, true, true);
#endif

View File

@ -154,6 +154,9 @@ void host_action(const char * const pstr, const bool eol) {
queue.inject_P(PSTR("M24"));
#endif
break;
case PROMPT_INFO:
msg = PSTR("GCODE_INFO");
break;
default: break;
}
say_m876_response(msg);

View File

@ -51,7 +51,8 @@ void host_action(const char * const pstr, const bool eol=true);
PROMPT_FILAMENT_RUNOUT,
PROMPT_USER_CONTINUE,
PROMPT_FILAMENT_RUNOUT_REHEAT,
PROMPT_PAUSE_RESUME
PROMPT_PAUSE_RESUME,
PROMPT_INFO
};
extern PromptReason host_prompt_reason;

View File

@ -401,6 +401,10 @@ bool pause_print(const float &retract, const point_t &park_point, const float &u
#endif
#endif
#if ENABLED(HOST_PROMPT_SUPPORT)
host_prompt_open(PROMPT_INFO, PSTR("Pause"), PSTR("Dismiss"));
#endif
if (!DEBUGGING(DRYRUN) && unload_length && thermalManager.targetTooColdToExtrude(active_extruder)) {
SERIAL_ECHO_MSG(MSG_ERR_HOTEND_TOO_COLD);
@ -554,7 +558,7 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep
while (wait_for_user) idle(true);
#if ENABLED(HOST_PROMPT_SUPPORT)
host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Reheating"));
host_prompt_do(PROMPT_INFO, PSTR("Reheating"));
#endif
#if ENABLED(EXTENSIBLE_UI)
ExtUI::onStatusChanged(PSTR("Reheating..."));
@ -676,6 +680,10 @@ void resume_print(const float &slow_load_length/*=0*/, const float &fast_load_le
--did_pause_print;
#if ENABLED(HOST_PROMPT_SUPPORT)
host_prompt_open(PROMPT_INFO, PSTR("Resuming"), PSTR("Dismiss"));
#endif
#if ENABLED(SDSUPPORT)
if (did_pause_print) {
card.startFileprint();

View File

@ -71,6 +71,9 @@ void GcodeSuite::M24() {
#ifdef ACTION_ON_RESUME
host_action_resume();
#endif
#if ENABLED(HOST_PROMPT_SUPPORT)
host_prompt_open(PROMPT_INFO, PSTR("Resuming SD"), PSTR("Dismiss"));
#endif
#endif
ui.reset_status();

View File

@ -1481,6 +1481,9 @@ void MarlinUI::update() {
#ifdef ACTION_ON_CANCEL
host_action_cancel();
#endif
#if ENABLED(HOST_PROMPT_SUPPORT)
host_prompt_open(PROMPT_INFO, PSTR("UI Aborted"), PSTR("Dismiss"));
#endif
print_job_timer.stop();
set_status_P(PSTR(MSG_PRINT_ABORTED));
#if HAS_LCD_MENU