Browse Source

Merge pull request #7828 from thinkyhead/bf1_dualx_movex

[1.1.x] Fix DUAL_X_CARRIAGE manual move
Scott Lahteine 7 years ago
parent
commit
5a674a8e10
2 changed files with 10 additions and 9 deletions
  1. 2
    5
      Marlin/Marlin_main.cpp
  2. 8
    4
      Marlin/ultralcd.cpp

+ 2
- 5
Marlin/Marlin_main.cpp View File

@@ -12469,7 +12469,7 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
12469 12469
           break;
12470 12470
       }
12471 12471
     }
12472
-    return false;
12472
+    return prepare_move_to_destination_cartesian();
12473 12473
   }
12474 12474
 
12475 12475
 #endif // DUAL_X_CARRIAGE
@@ -12511,7 +12511,7 @@ void prepare_move_to_destination() {
12511 12511
     #elif IS_KINEMATIC
12512 12512
       prepare_kinematic_move_to(destination)
12513 12513
     #elif ENABLED(DUAL_X_CARRIAGE)
12514
-      prepare_move_to_destination_dualx() || prepare_move_to_destination_cartesian()
12514
+      prepare_move_to_destination_dualx()
12515 12515
     #else
12516 12516
       prepare_move_to_destination_cartesian()
12517 12517
     #endif
@@ -13041,9 +13041,6 @@ void disable_all_steppers() {
13041 13041
       #if ENABLED(E4_IS_TMC2130)
13042 13042
         automatic_current_control(stepperE4, "E4");
13043 13043
       #endif
13044
-      #if ENABLED(E4_IS_TMC2130)
13045
-        automatic_current_control(stepperE4);
13046
-      #endif
13047 13044
     }
13048 13045
   }
13049 13046
 

+ 8
- 4
Marlin/ultralcd.cpp View File

@@ -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…
Cancel
Save