Browse Source

Restore Host Prompt Info (#15387)

InsanityAutomation 5 years ago
parent
commit
5221e2d991

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

414
 
414
 
415
   void event_probe_recover() {
415
   void event_probe_recover() {
416
     #if ENABLED(HOST_PROMPT_SUPPORT)
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
     #endif
418
     #endif
419
     #ifdef ACTION_ON_G29_RECOVER
419
     #ifdef ACTION_ON_G29_RECOVER
420
       host_action(PSTR(ACTION_ON_G29_RECOVER));
420
       host_action(PSTR(ACTION_ON_G29_RECOVER));
1155
     card.beginautostart();
1155
     card.beginautostart();
1156
   #endif
1156
   #endif
1157
 
1157
 
1158
+  #if ENABLED(HOST_PROMPT_SUPPORT)
1159
+    host_action_prompt_end();
1160
+  #endif
1161
+
1158
   #if HAS_TRINAMIC && DISABLED(PS_DEFAULT_OFF)
1162
   #if HAS_TRINAMIC && DISABLED(PS_DEFAULT_OFF)
1159
     test_tmc_connection(true, true, true, true);
1163
     test_tmc_connection(true, true, true, true);
1160
   #endif
1164
   #endif

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

154
           queue.inject_P(PSTR("M24"));
154
           queue.inject_P(PSTR("M24"));
155
         #endif
155
         #endif
156
         break;
156
         break;
157
+      case PROMPT_INFO:
158
+        msg = PSTR("GCODE_INFO");
159
+        break;
157
       default: break;
160
       default: break;
158
     }
161
     }
159
     say_m876_response(msg);
162
     say_m876_response(msg);

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

51
     PROMPT_FILAMENT_RUNOUT,
51
     PROMPT_FILAMENT_RUNOUT,
52
     PROMPT_USER_CONTINUE,
52
     PROMPT_USER_CONTINUE,
53
     PROMPT_FILAMENT_RUNOUT_REHEAT,
53
     PROMPT_FILAMENT_RUNOUT_REHEAT,
54
-    PROMPT_PAUSE_RESUME
54
+    PROMPT_PAUSE_RESUME,
55
+    PROMPT_INFO
55
   };
56
   };
56
 
57
 
57
   extern PromptReason host_prompt_reason;
58
   extern PromptReason host_prompt_reason;

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

401
     #endif
401
     #endif
402
   #endif
402
   #endif
403
 
403
 
404
+  #if ENABLED(HOST_PROMPT_SUPPORT)
405
+    host_prompt_open(PROMPT_INFO, PSTR("Pause"), PSTR("Dismiss"));
406
+  #endif
407
+
404
   if (!DEBUGGING(DRYRUN) && unload_length && thermalManager.targetTooColdToExtrude(active_extruder)) {
408
   if (!DEBUGGING(DRYRUN) && unload_length && thermalManager.targetTooColdToExtrude(active_extruder)) {
405
     SERIAL_ECHO_MSG(MSG_ERR_HOTEND_TOO_COLD);
409
     SERIAL_ECHO_MSG(MSG_ERR_HOTEND_TOO_COLD);
406
 
410
 
554
       while (wait_for_user) idle(true);
558
       while (wait_for_user) idle(true);
555
 
559
 
556
       #if ENABLED(HOST_PROMPT_SUPPORT)
560
       #if ENABLED(HOST_PROMPT_SUPPORT)
557
-        host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Reheating"));
561
+        host_prompt_do(PROMPT_INFO, PSTR("Reheating"));
558
       #endif
562
       #endif
559
       #if ENABLED(EXTENSIBLE_UI)
563
       #if ENABLED(EXTENSIBLE_UI)
560
         ExtUI::onStatusChanged(PSTR("Reheating..."));
564
         ExtUI::onStatusChanged(PSTR("Reheating..."));
676
 
680
 
677
   --did_pause_print;
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
   #if ENABLED(SDSUPPORT)
687
   #if ENABLED(SDSUPPORT)
680
     if (did_pause_print) {
688
     if (did_pause_print) {
681
       card.startFileprint();
689
       card.startFileprint();

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

71
     #ifdef ACTION_ON_RESUME
71
     #ifdef ACTION_ON_RESUME
72
       host_action_resume();
72
       host_action_resume();
73
     #endif
73
     #endif
74
+    #if ENABLED(HOST_PROMPT_SUPPORT)
75
+      host_prompt_open(PROMPT_INFO, PSTR("Resuming SD"), PSTR("Dismiss"));
76
+    #endif
74
   #endif
77
   #endif
75
 
78
 
76
   ui.reset_status();
79
   ui.reset_status();

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

1481
     #ifdef ACTION_ON_CANCEL
1481
     #ifdef ACTION_ON_CANCEL
1482
       host_action_cancel();
1482
       host_action_cancel();
1483
     #endif
1483
     #endif
1484
+    #if ENABLED(HOST_PROMPT_SUPPORT)
1485
+      host_prompt_open(PROMPT_INFO, PSTR("UI Aborted"), PSTR("Dismiss"));
1486
+    #endif
1484
     print_job_timer.stop();
1487
     print_job_timer.stop();
1485
     set_status_P(PSTR(MSG_PRINT_ABORTED));
1488
     set_status_P(PSTR(MSG_PRINT_ABORTED));
1486
     #if HAS_LCD_MENU
1489
     #if HAS_LCD_MENU

Loading…
Cancel
Save