瀏覽代碼

Fix DUAL_X_CARRIAGE manual move

Addressing #7745
Scott Lahteine 7 年之前
父節點
當前提交
bcb8722513
共有 1 個文件被更改,包括 8 次插入4 次删除
  1. 8
    4
      Marlin/ultralcd.cpp

+ 8
- 4
Marlin/ultralcd.cpp 查看文件

@@ -137,6 +137,7 @@ uint16_t max_display_update_time = 0;
137 137
 
138 138
   // Function pointer to menu functions.
139 139
   typedef void (*screenFunc_t)();
140
+  typedef void (*menuAction_t)();
140 141
 
141 142
   #if HAS_POWER_SWITCH
142 143
     extern bool powersupply_on;
@@ -206,7 +207,7 @@ uint16_t max_display_update_time = 0;
206 207
   void _menu_action_back();
207 208
   void menu_action_submenu(screenFunc_t data);
208 209
   void menu_action_gcode(const char* pgcode);
209
-  void menu_action_function(screenFunc_t data);
210
+  void menu_action_function(menuAction_t data);
210 211
 
211 212
   #define DECLARE_MENU_EDIT_TYPE(_type, _name) \
212 213
     bool _menu_edit_ ## _name(); \
@@ -2751,8 +2752,11 @@ void kill_screen(const char* lcd_msg) {
2751 2752
       , int8_t eindex=-1
2752 2753
     #endif
2753 2754
   ) {
2754
-    #if E_MANUAL > 1
2755
-      if (axis == E_AXIS) manual_move_e_index = eindex >= 0 ? eindex : active_extruder;
2755
+    #if ENABLED(DUAL_X_CARRIAGE) || E_MANUAL > 1
2756
+      #if E_MANUAL > 1
2757
+        if (axis == E_AXIS)
2758
+      #endif
2759
+          manual_move_e_index = eindex >= 0 ? eindex : active_extruder;
2756 2760
     #endif
2757 2761
     manual_move_start_time = millis() + (move_menu_scale < 0.99 ? 0UL : 250UL); // delay for bigger moves
2758 2762
     manual_move_axis = (int8_t)axis;
@@ -2964,7 +2968,7 @@ void kill_screen(const char* lcd_msg) {
2964 2968
     else
2965 2969
       MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28"));
2966 2970
 
2967
-    #if ENABLED(SWITCHING_EXTRUDER)
2971
+    #if ENABLED(SWITCHING_EXTRUDER) || ENABLED(DUAL_X_CARRIAGE)
2968 2972
       if (active_extruder)
2969 2973
         MENU_ITEM(gcode, MSG_SELECT " " MSG_E1, PSTR("T0"));
2970 2974
       else

Loading…
取消
儲存