Parcourir la source

Host Action: Start (#19398)

InsanityAutomation il y a 3 ans
Parent
révision
62206c0386
Aucun compte lié à l'adresse e-mail de l'auteur

+ 3
- 0
Marlin/src/feature/host_actions.cpp Voir le fichier

@@ -62,6 +62,9 @@ void host_action(PGM_P const pstr, const bool eol) {
62 62
 #ifdef ACTION_ON_CANCEL
63 63
   void host_action_cancel() { host_action(PSTR(ACTION_ON_CANCEL)); }
64 64
 #endif
65
+#ifdef ACTION_ON_START
66
+  void host_action_start() { host_action(PSTR(ACTION_ON_START)); }
67
+#endif
65 68
 
66 69
 #if ENABLED(HOST_PROMPT_SUPPORT)
67 70
 

+ 3
- 0
Marlin/src/feature/host_actions.h Voir le fichier

@@ -44,6 +44,9 @@ void host_action(PGM_P const pstr, const bool eol=true);
44 44
 #ifdef ACTION_ON_CANCEL
45 45
   void host_action_cancel();
46 46
 #endif
47
+#ifdef ACTION_ON_START
48
+  void host_action_start();
49
+#endif
47 50
 
48 51
 #if ENABLED(HOST_PROMPT_SUPPORT)
49 52
 

+ 3
- 0
Marlin/src/inc/Conditionals_adv.h Voir le fichier

@@ -196,6 +196,9 @@
196 196
   #ifndef ACTION_ON_CANCEL
197 197
     #define ACTION_ON_CANCEL  "cancel"
198 198
   #endif
199
+  #ifndef ACTION_ON_START
200
+    #define ACTION_ON_START   "start"
201
+  #endif
199 202
   #ifndef ACTION_ON_KILL
200 203
     #define ACTION_ON_KILL    "poweroff"
201 204
   #endif

+ 1
- 0
Marlin/src/lcd/language/language_en.h Voir le fichier

@@ -366,6 +366,7 @@ namespace Language_en {
366 366
   PROGMEM Language_Str MSG_PAUSING                         = _UxGT("Pausing...");
367 367
   PROGMEM Language_Str MSG_PAUSE_PRINT                     = _UxGT("Pause Print");
368 368
   PROGMEM Language_Str MSG_RESUME_PRINT                    = _UxGT("Resume Print");
369
+  PROGMEM Language_Str MSG_HOST_START_PRINT                = _UxGT("Host Start");
369 370
   PROGMEM Language_Str MSG_STOP_PRINT                      = _UxGT("Stop Print");
370 371
   PROGMEM Language_Str MSG_PRINTING_OBJECT                 = _UxGT("Printing Object");
371 372
   PROGMEM Language_Str MSG_CANCEL_OBJECT                   = _UxGT("Cancel Object");

+ 8
- 0
Marlin/src/lcd/menu/menu_main.cpp Voir le fichier

@@ -54,6 +54,10 @@
54 54
   #include "../../feature/password/password.h"
55 55
 #endif
56 56
 
57
+#ifdef ACTION_ON_START
58
+  #include "../../feature/host_actions.h"
59
+#endif
60
+
57 61
 void menu_tune();
58 62
 void menu_cancelobject();
59 63
 void menu_motion();
@@ -158,6 +162,10 @@ void menu_main() {
158 162
     if (TERN0(MACHINE_CAN_PAUSE, printingIsPaused()))
159 163
       ACTION_ITEM(MSG_RESUME_PRINT, ui.resume_print);
160 164
 
165
+    #ifdef ACTION_ON_START
166
+      ACTION_ITEM(MSG_HOST_START_PRINT, host_action_start);
167
+    #endif
168
+
161 169
     SUBMENU(MSG_MOTION, menu_motion);
162 170
   }
163 171
 

Chargement…
Annuler
Enregistrer