Browse Source

Merge pull request #7829 from thinkyhead/bf2_fix_dualx_manual

[2.0.x] Fix DUAL_X_CARRIAGE manual move
Scott Lahteine 7 years ago
parent
commit
ab4943e24c

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

125
     #if ENABLED(E4_IS_TMC2130)
125
     #if ENABLED(E4_IS_TMC2130)
126
       automatic_current_control(stepperE4, "E4");
126
       automatic_current_control(stepperE4, "E4");
127
     #endif
127
     #endif
128
-    #if ENABLED(E4_IS_TMC2130)
129
-      automatic_current_control(stepperE4);
130
-    #endif
131
   }
128
   }
132
 }
129
 }
133
 
130
 

+ 8
- 4
Marlin/src/lcd/ultralcd.cpp View File

212
   void _menu_action_back();
212
   void _menu_action_back();
213
   void menu_action_submenu(screenFunc_t data);
213
   void menu_action_submenu(screenFunc_t data);
214
   void menu_action_gcode(const char* pgcode);
214
   void menu_action_gcode(const char* pgcode);
215
-  void menu_action_function(screenFunc_t data);
215
+  void menu_action_function(menuAction_t data);
216
 
216
 
217
   #define DECLARE_MENU_EDIT_TYPE(_type, _name) \
217
   #define DECLARE_MENU_EDIT_TYPE(_type, _name) \
218
     bool _menu_edit_ ## _name(); \
218
     bool _menu_edit_ ## _name(); \
2750
       , int8_t eindex=-1
2750
       , int8_t eindex=-1
2751
     #endif
2751
     #endif
2752
   ) {
2752
   ) {
2753
-    #if E_MANUAL > 1
2754
-      if (axis == E_AXIS) manual_move_e_index = eindex >= 0 ? eindex : active_extruder;
2753
+    #if ENABLED(DUAL_X_CARRIAGE) || E_MANUAL > 1
2754
+      #if E_MANUAL > 1
2755
+        if (axis == E_AXIS)
2756
+      #endif
2757
+          manual_move_e_index = eindex >= 0 ? eindex : active_extruder;
2755
     #endif
2758
     #endif
2759
+
2756
     manual_move_start_time = millis() + (move_menu_scale < 0.99 ? 0UL : 250UL); // delay for bigger moves
2760
     manual_move_start_time = millis() + (move_menu_scale < 0.99 ? 0UL : 250UL); // delay for bigger moves
2757
     manual_move_axis = (int8_t)axis;
2761
     manual_move_axis = (int8_t)axis;
2758
   }
2762
   }
2963
     else
2967
     else
2964
       MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28"));
2968
       MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28"));
2965
 
2969
 
2966
-    #if ENABLED(SWITCHING_EXTRUDER)
2970
+    #if ENABLED(SWITCHING_EXTRUDER) || ENABLED(DUAL_X_CARRIAGE)
2967
       if (active_extruder)
2971
       if (active_extruder)
2968
         MENU_ITEM(gcode, MSG_SELECT " " MSG_E1, PSTR("T0"));
2972
         MENU_ITEM(gcode, MSG_SELECT " " MSG_E1, PSTR("T0"));
2969
       else
2973
       else

+ 1
- 0
Marlin/src/lcd/ultralcd.h View File

84
 
84
 
85
     // Function pointer to menu functions.
85
     // Function pointer to menu functions.
86
     typedef void (*screenFunc_t)();
86
     typedef void (*screenFunc_t)();
87
+    typedef void (*menuAction_t)();
87
 
88
 
88
     void lcd_goto_screen(screenFunc_t screen, const uint32_t encoder=0);
89
     void lcd_goto_screen(screenFunc_t screen, const uint32_t encoder=0);
89
 
90
 

+ 2
- 2
Marlin/src/module/motion.cpp View File

769
           break;
769
           break;
770
       }
770
       }
771
     }
771
     }
772
-    return false;
772
+    return prepare_move_to_destination_cartesian();
773
   }
773
   }
774
 
774
 
775
 #endif // DUAL_X_CARRIAGE
775
 #endif // DUAL_X_CARRIAGE
811
     #elif IS_KINEMATIC
811
     #elif IS_KINEMATIC
812
       prepare_kinematic_move_to(destination)
812
       prepare_kinematic_move_to(destination)
813
     #elif ENABLED(DUAL_X_CARRIAGE)
813
     #elif ENABLED(DUAL_X_CARRIAGE)
814
-      prepare_move_to_destination_dualx() || prepare_move_to_destination_cartesian()
814
+      prepare_move_to_destination_dualx()
815
     #else
815
     #else
816
       prepare_move_to_destination_cartesian()
816
       prepare_move_to_destination_cartesian()
817
     #endif
817
     #endif

Loading…
Cancel
Save