Browse Source

Restore Host Prompt Info (#15387)

InsanityAutomation 5 years ago
parent
commit
5221e2d991

+ 5
- 1
Marlin/src/Marlin.cpp View File

@@ -414,7 +414,7 @@ void disable_all_steppers() {
414 414
 
415 415
   void event_probe_recover() {
416 416
     #if ENABLED(HOST_PROMPT_SUPPORT)
417
-      host_prompt_do(PROMPT_INFO, PSTR("G29 Retrying"));
417
+      host_prompt_do(PROMPT_INFO, PSTR("G29 Retrying"), PSTR("Dismiss"));
418 418
     #endif
419 419
     #ifdef ACTION_ON_G29_RECOVER
420 420
       host_action(PSTR(ACTION_ON_G29_RECOVER));
@@ -1155,6 +1155,10 @@ void setup() {
1155 1155
     card.beginautostart();
1156 1156
   #endif
1157 1157
 
1158
+  #if ENABLED(HOST_PROMPT_SUPPORT)
1159
+    host_action_prompt_end();
1160
+  #endif
1161
+
1158 1162
   #if HAS_TRINAMIC && DISABLED(PS_DEFAULT_OFF)
1159 1163
     test_tmc_connection(true, true, true, true);
1160 1164
   #endif

+ 3
- 0
Marlin/src/feature/host_actions.cpp View File

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

+ 2
- 1
Marlin/src/feature/host_actions.h View File

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

+ 9
- 1
Marlin/src/feature/pause.cpp View File

@@ -401,6 +401,10 @@ bool pause_print(const float &retract, const point_t &park_point, const float &u
401 401
     #endif
402 402
   #endif
403 403
 
404
+  #if ENABLED(HOST_PROMPT_SUPPORT)
405
+    host_prompt_open(PROMPT_INFO, PSTR("Pause"), PSTR("Dismiss"));
406
+  #endif
407
+
404 408
   if (!DEBUGGING(DRYRUN) && unload_length && thermalManager.targetTooColdToExtrude(active_extruder)) {
405 409
     SERIAL_ECHO_MSG(MSG_ERR_HOTEND_TOO_COLD);
406 410
 
@@ -554,7 +558,7 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep
554 558
       while (wait_for_user) idle(true);
555 559
 
556 560
       #if ENABLED(HOST_PROMPT_SUPPORT)
557
-        host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Reheating"));
561
+        host_prompt_do(PROMPT_INFO, PSTR("Reheating"));
558 562
       #endif
559 563
       #if ENABLED(EXTENSIBLE_UI)
560 564
         ExtUI::onStatusChanged(PSTR("Reheating..."));
@@ -676,6 +680,10 @@ void resume_print(const float &slow_load_length/*=0*/, const float &fast_load_le
676 680
 
677 681
   --did_pause_print;
678 682
 
683
+  #if ENABLED(HOST_PROMPT_SUPPORT)
684
+    host_prompt_open(PROMPT_INFO, PSTR("Resuming"), PSTR("Dismiss"));
685
+  #endif
686
+
679 687
   #if ENABLED(SDSUPPORT)
680 688
     if (did_pause_print) {
681 689
       card.startFileprint();

+ 3
- 0
Marlin/src/gcode/sdcard/M24_M25.cpp View File

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

+ 3
- 0
Marlin/src/lcd/ultralcd.cpp View File

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

Loading…
Cancel
Save