Kaynağa Gözat

Fix DUAL_X_CARRIAGE manual move

Addressing #7745
Scott Lahteine 7 yıl önce
ebeveyn
işleme
bcb8722513
1 değiştirilmiş dosya ile 8 ekleme ve 4 silme
  1. 8
    4
      Marlin/ultralcd.cpp

+ 8
- 4
Marlin/ultralcd.cpp Dosyayı Görüntüle

137
 
137
 
138
   // Function pointer to menu functions.
138
   // Function pointer to menu functions.
139
   typedef void (*screenFunc_t)();
139
   typedef void (*screenFunc_t)();
140
+  typedef void (*menuAction_t)();
140
 
141
 
141
   #if HAS_POWER_SWITCH
142
   #if HAS_POWER_SWITCH
142
     extern bool powersupply_on;
143
     extern bool powersupply_on;
206
   void _menu_action_back();
207
   void _menu_action_back();
207
   void menu_action_submenu(screenFunc_t data);
208
   void menu_action_submenu(screenFunc_t data);
208
   void menu_action_gcode(const char* pgcode);
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
   #define DECLARE_MENU_EDIT_TYPE(_type, _name) \
212
   #define DECLARE_MENU_EDIT_TYPE(_type, _name) \
212
     bool _menu_edit_ ## _name(); \
213
     bool _menu_edit_ ## _name(); \
2751
       , int8_t eindex=-1
2752
       , int8_t eindex=-1
2752
     #endif
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
     #endif
2760
     #endif
2757
     manual_move_start_time = millis() + (move_menu_scale < 0.99 ? 0UL : 250UL); // delay for bigger moves
2761
     manual_move_start_time = millis() + (move_menu_scale < 0.99 ? 0UL : 250UL); // delay for bigger moves
2758
     manual_move_axis = (int8_t)axis;
2762
     manual_move_axis = (int8_t)axis;
2964
     else
2968
     else
2965
       MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28"));
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
       if (active_extruder)
2972
       if (active_extruder)
2969
         MENU_ITEM(gcode, MSG_SELECT " " MSG_E1, PSTR("T0"));
2973
         MENU_ITEM(gcode, MSG_SELECT " " MSG_E1, PSTR("T0"));
2970
       else
2974
       else

Loading…
İptal
Kaydet