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
           break;
12469
           break;
12470
       }
12470
       }
12471
     }
12471
     }
12472
-    return false;
12472
+    return prepare_move_to_destination_cartesian();
12473
   }
12473
   }
12474
 
12474
 
12475
 #endif // DUAL_X_CARRIAGE
12475
 #endif // DUAL_X_CARRIAGE
12511
     #elif IS_KINEMATIC
12511
     #elif IS_KINEMATIC
12512
       prepare_kinematic_move_to(destination)
12512
       prepare_kinematic_move_to(destination)
12513
     #elif ENABLED(DUAL_X_CARRIAGE)
12513
     #elif ENABLED(DUAL_X_CARRIAGE)
12514
-      prepare_move_to_destination_dualx() || prepare_move_to_destination_cartesian()
12514
+      prepare_move_to_destination_dualx()
12515
     #else
12515
     #else
12516
       prepare_move_to_destination_cartesian()
12516
       prepare_move_to_destination_cartesian()
12517
     #endif
12517
     #endif
13041
       #if ENABLED(E4_IS_TMC2130)
13041
       #if ENABLED(E4_IS_TMC2130)
13042
         automatic_current_control(stepperE4, "E4");
13042
         automatic_current_control(stepperE4, "E4");
13043
       #endif
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
 
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…
Cancel
Save