浏览代码

LCD SD Card items near top when not using wheel (#12926)

InsanityAutomation 6 年前
父节点
当前提交
75f2665f2e

+ 2
- 2
Marlin/src/gcode/sdcard/M20-M30_M32-M34_M524_M928.cpp 查看文件

@@ -103,11 +103,11 @@ void GcodeSuite::M24() {
103 103
     print_job_timer.start();
104 104
   }
105 105
 
106
-  ui.reset_status();
107
-
108 106
   #ifdef ACTION_ON_RESUME
109 107
     SERIAL_ECHOLNPGM("//action:" ACTION_ON_RESUME);
110 108
   #endif
109
+  
110
+  ui.reset_status();
111 111
 }
112 112
 
113 113
 /**

+ 3
- 0
Marlin/src/lcd/language/language_en.h 查看文件

@@ -810,6 +810,9 @@
810 810
 #ifndef MSG_SINGLENOZZLE_RETRACT_SPD
811 811
   #define MSG_SINGLENOZZLE_RETRACT_SPD        _UxGT("Retract Speed")
812 812
 #endif
813
+#ifndef MSG_NOZZLE_STANDBY
814
+  #define MSG_NOZZLE_STANDBY                  _UxGT("Nozzle Standby")
815
+#endif
813 816
 #ifndef MSG_FILAMENTCHANGE
814 817
   #define MSG_FILAMENTCHANGE                  _UxGT("Change filament")
815 818
 #endif

+ 35
- 10
Marlin/src/lcd/menu/menu_main.cpp 查看文件

@@ -104,9 +104,36 @@ void menu_main() {
104 104
       if (card.isFileOpen())
105 105
         MENU_ITEM(submenu, MSG_STOP_PRINT, menu_sdcard_abort_confirm);
106 106
     #endif
107
+    #if !defined(ACTION_ON_RESUME) && ENABLED(SDSUPPORT)
108
+      if (card.isFileOpen())
109
+    #endif
107 110
     MENU_ITEM(submenu, MSG_TUNE, menu_tune);
108 111
   }
109 112
   else {
113
+    #if !HAS_ENCODER_WHEEL && ENABLED(SDSUPPORT)
114
+      //
115
+      // Autostart
116
+      //
117
+      #if ENABLED(MENU_ADDAUTOSTART)
118
+        if (!busy) MENU_ITEM(function, MSG_AUTOSTART, card.beginautostart);
119
+      #endif
120
+
121
+      if (card.isDetected()) {
122
+        if (!card.isFileOpen()) {
123
+          MENU_ITEM(submenu, MSG_CARD_MENU, menu_sdcard);
124
+          #if !PIN_EXISTS(SD_DETECT)
125
+            MENU_ITEM(gcode, MSG_CHANGE_SDCARD, PSTR("M21"));  // SD-card changed by user
126
+          #endif
127
+        }
128
+      }
129
+      else {
130
+        #if !PIN_EXISTS(SD_DETECT)
131
+          MENU_ITEM(gcode, MSG_INIT_SDCARD, PSTR("M21")); // Manually init SD-card
132
+        #endif
133
+        MENU_ITEM(function, MSG_NO_CARD, NULL);
134
+      }
135
+    #endif // !HAS_ENCODER_WHEEL && SDSUPPORT
136
+
110 137
     MENU_ITEM(function, MSG_RESUME_PRINT, lcd_resume);
111 138
     
112 139
     MENU_ITEM(submenu, MSG_MOTION, menu_motion);
@@ -148,22 +175,20 @@ void menu_main() {
148 175
       MENU_ITEM(gcode, MSG_SWITCH_PS_ON, PSTR("M80"));
149 176
   #endif
150 177
 
151
-  #if ENABLED(SDSUPPORT)
152
-
178
+  #if HAS_ENCODER_WHEEL && ENABLED(SDSUPPORT)
153 179
     //
154 180
     // Autostart
155 181
     //
156 182
     #if ENABLED(MENU_ADDAUTOSTART)
157
-      if (!busy)
158
-        MENU_ITEM(function, MSG_AUTOSTART, card.beginautostart);
183
+      if (!busy) MENU_ITEM(function, MSG_AUTOSTART, card.beginautostart);
159 184
     #endif
160 185
 
161 186
     if (card.isDetected()) {
162
-      if(!card.isFileOpen()) {
163
-      MENU_ITEM(submenu, MSG_CARD_MENU, menu_sdcard);
164
-      #if !PIN_EXISTS(SD_DETECT)
165
-        MENU_ITEM(gcode, MSG_CHANGE_SDCARD, PSTR("M21"));  // SD-card changed by user
166
-      #endif
187
+      if (!card.isFileOpen()) {
188
+        MENU_ITEM(submenu, MSG_CARD_MENU, menu_sdcard);
189
+        #if !PIN_EXISTS(SD_DETECT)
190
+          MENU_ITEM(gcode, MSG_CHANGE_SDCARD, PSTR("M21"));  // SD-card changed by user
191
+        #endif
167 192
       }
168 193
     }
169 194
     else {
@@ -172,7 +197,7 @@ void menu_main() {
172 197
       #endif
173 198
       MENU_ITEM(function, MSG_NO_CARD, NULL);
174 199
     }
175
-  #endif // SDSUPPORT
200
+  #endif // HAS_ENCODER_WHEEL && SDSUPPORT
176 201
 
177 202
   END_MENU();
178 203
 }

+ 9
- 1
Marlin/src/lcd/menu/menu_temperature.cpp 查看文件

@@ -31,10 +31,14 @@
31 31
 #include "menu.h"
32 32
 #include "../../module/temperature.h"
33 33
 
34
-#if FAN_COUNT > 1
34
+#if FAN_COUNT > 1 || ENABLED(SINGLENOZZLE)
35 35
   #include "../../module/motion.h"
36 36
 #endif
37 37
 
38
+#if ENABLED(SINGLENOZZLE)
39
+  #include "../../module/tool_change.h"
40
+#endif
41
+
38 42
 // Initialized by settings.load()
39 43
 int16_t MarlinUI::preheat_hotend_temp[2], MarlinUI::preheat_bed_temp[2];
40 44
 uint8_t MarlinUI::preheat_fan_speed[2];
@@ -327,6 +331,10 @@ void menu_temperature() {
327 331
     #endif // HOTENDS > 2
328 332
   #endif // HOTENDS > 1
329 333
 
334
+  #if ENABLED(SINGLENOZZLE)
335
+    MENU_MULTIPLIER_ITEM_EDIT(uint16_3, MSG_NOZZLE_STANDBY, &singlenozzle_temp[active_extruder ? 0 : 1], 0, HEATER_0_MAXTEMP - 15);
336
+  #endif
337
+
330 338
   //
331 339
   // Bed:
332 340
   //

+ 8
- 0
Marlin/src/lcd/menu/menu_tune.cpp 查看文件

@@ -38,6 +38,10 @@
38 38
   #include "../../feature/bedlevel/bedlevel.h"
39 39
 #endif
40 40
 
41
+#if ENABLED(SINGLENOZZLE)
42
+  #include "../../module/tool_change.h"
43
+#endif
44
+
41 45
 // Refresh the E factor after changing flow
42 46
 void _lcd_refresh_e_factor_0() { planner.refresh_e_factor(0); }
43 47
 #if EXTRUDERS > 1
@@ -129,6 +133,10 @@ void menu_tune() {
129 133
     #endif // HOTENDS > 2
130 134
   #endif // HOTENDS > 1
131 135
 
136
+  #if ENABLED(SINGLENOZZLE)
137
+    MENU_MULTIPLIER_ITEM_EDIT(uint16_3, MSG_NOZZLE_STANDBY, &singlenozzle_temp[active_extruder ? 0 : 1], 0, HEATER_0_MAXTEMP - 15);
138
+  #endif
139
+
132 140
   //
133 141
   // Bed:
134 142
   //

正在加载...
取消
保存