Browse Source

Merge pull request #3788 from thinkyhead/rc_dual_x_compile_fix

DUAL_X_CARRIAGE fixes, improvements, Travis test
Scott Lahteine 8 years ago
parent
commit
138c5c8378
5 changed files with 26 additions and 13 deletions
  1. 10
    0
      .travis.yml
  2. 4
    0
      Marlin/Marlin.h
  3. 12
    8
      Marlin/SanityCheck.h
  4. 0
    4
      Marlin/planner.h
  5. 0
    1
      Marlin/stepper_indirection.h

+ 10
- 0
.travis.yml View File

104
   - opt_enable EEPROM_SETTINGS EEPROM_CHITCHAT
104
   - opt_enable EEPROM_SETTINGS EEPROM_CHITCHAT
105
   - build_marlin
105
   - build_marlin
106
   #
106
   #
107
+  # Test DUAL_X_CARRIAGE
108
+  #
109
+  - restore_configs
110
+  - opt_set MOTHERBOARD BOARD_RAMPS_14_EEB
111
+  - opt_set EXTRUDERS 2
112
+  - opt_set TEMP_SENSOR_1 1
113
+  - opt_enable USE_XMAX_PLUG
114
+  - opt_enable_adv DUAL_X_CARRIAGE
115
+  - build_marlin
116
+  #
107
   ### LCDS ###
117
   ### LCDS ###
108
   #
118
   #
109
   #
119
   #

+ 4
- 0
Marlin/Marlin.h View File

129
 
129
 
130
 void manage_inactivity(bool ignore_stepper_queue = false);
130
 void manage_inactivity(bool ignore_stepper_queue = false);
131
 
131
 
132
+#if ENABLED(DUAL_X_CARRIAGE)
133
+  extern bool extruder_duplication_enabled;
134
+#endif
135
+
132
 #if ENABLED(DUAL_X_CARRIAGE) && HAS_X_ENABLE && HAS_X2_ENABLE
136
 #if ENABLED(DUAL_X_CARRIAGE) && HAS_X_ENABLE && HAS_X2_ENABLE
133
   #define  enable_x() do { X_ENABLE_WRITE( X_ENABLE_ON); X2_ENABLE_WRITE( X_ENABLE_ON); } while (0)
137
   #define  enable_x() do { X_ENABLE_WRITE( X_ENABLE_ON); X2_ENABLE_WRITE( X_ENABLE_ON); } while (0)
134
   #define disable_x() do { X_ENABLE_WRITE(!X_ENABLE_ON); X2_ENABLE_WRITE(!X_ENABLE_ON); axis_known_position[X_AXIS] = false; } while (0)
138
   #define disable_x() do { X_ENABLE_WRITE(!X_ENABLE_ON); X2_ENABLE_WRITE(!X_ENABLE_ON); axis_known_position[X_AXIS] = false; } while (0)

+ 12
- 8
Marlin/SanityCheck.h View File

398
  * Dual X Carriage requirements
398
  * Dual X Carriage requirements
399
  */
399
  */
400
 #if ENABLED(DUAL_X_CARRIAGE)
400
 #if ENABLED(DUAL_X_CARRIAGE)
401
-  #if EXTRUDERS == 1 || ENABLED(COREXY) \
402
-      || !HAS_X2_ENABLE || !HAS_X2_STEP || !HAS_X2_DIR \
403
-      || !defined(X2_HOME_POS) || !defined(X2_MIN_POS) || !defined(X2_MAX_POS) \
404
-      || !HAS_X_MAX
405
-    #error "Missing or invalid definitions for DUAL_X_CARRIAGE mode."
406
-  #endif
407
-  #if X_HOME_DIR != -1 || X2_HOME_DIR != 1
408
-    #error "Please use canonical x-carriage assignment."
401
+  #if EXTRUDERS == 1
402
+    #error "DUAL_X_CARRIAGE requires 2 (or more) extruders."
403
+  #elif ENABLED(COREXY) || ENABLED(COREXZ)
404
+    #error "DUAL_X_CARRIAGE cannot be used with COREXY or COREXZ."
405
+  #elif !HAS_X2_ENABLE || !HAS_X2_STEP || !HAS_X2_DIR
406
+    #error "DUAL_X_CARRIAGE requires X2 stepper pins to be defined."
407
+  #elif !HAS_X_MAX
408
+    #error "DUAL_X_CARRIAGE requires USE_XMAX_PLUG and an X Max Endstop."
409
+  #elif !defined(X2_HOME_POS) || !defined(X2_MIN_POS) || !defined(X2_MAX_POS)
410
+    #error "DUAL_X_CARRIAGE requires X2_HOME_POS, X2_MIN_POS, and X2_MAX_POS."
411
+  #elif X_HOME_DIR != -1 || X2_HOME_DIR != 1
412
+    #error "DUAL_X_CARRIAGE requires X_HOME_DIR -1 and X2_HOME_DIR 1."
409
   #endif
413
   #endif
410
 #endif // DUAL_X_CARRIAGE
414
 #endif // DUAL_X_CARRIAGE
411
 
415
 

+ 0
- 4
Marlin/planner.h View File

165
       static long axis_segment_time[2][3] = { {MAX_FREQ_TIME + 1, 0, 0}, {MAX_FREQ_TIME + 1, 0, 0} };
165
       static long axis_segment_time[2][3] = { {MAX_FREQ_TIME + 1, 0, 0}, {MAX_FREQ_TIME + 1, 0, 0} };
166
     #endif
166
     #endif
167
 
167
 
168
-    #if ENABLED(DUAL_X_CARRIAGE)
169
-      extern bool extruder_duplication_enabled;
170
-    #endif
171
-
172
   public:
168
   public:
173
 
169
 
174
     Planner();
170
     Planner();

+ 0
- 1
Marlin/stepper_indirection.h View File

193
     #define NORM_E_DIR() _NORM_E_DIR()
193
     #define NORM_E_DIR() _NORM_E_DIR()
194
     #define REV_E_DIR() _REV_E_DIR()
194
     #define REV_E_DIR() _REV_E_DIR()
195
   #else
195
   #else
196
-    extern bool extruder_duplication_enabled;
197
     #define E_STEP_WRITE(v) {if(extruder_duplication_enabled){E0_STEP_WRITE(v);E1_STEP_WRITE(v);}else _E_STEP_WRITE(v);}
196
     #define E_STEP_WRITE(v) {if(extruder_duplication_enabled){E0_STEP_WRITE(v);E1_STEP_WRITE(v);}else _E_STEP_WRITE(v);}
198
     #define NORM_E_DIR() {if(extruder_duplication_enabled){E0_DIR_WRITE(!INVERT_E0_DIR);E1_DIR_WRITE(!INVERT_E1_DIR);}else _NORM_E_DIR();}
197
     #define NORM_E_DIR() {if(extruder_duplication_enabled){E0_DIR_WRITE(!INVERT_E0_DIR);E1_DIR_WRITE(!INVERT_E1_DIR);}else _NORM_E_DIR();}
199
     #define REV_E_DIR() {if(extruder_duplication_enabled){E0_DIR_WRITE(INVERT_E0_DIR);E1_DIR_WRITE(INVERT_E1_DIR);}else _REV_E_DIR();}
198
     #define REV_E_DIR() {if(extruder_duplication_enabled){E0_DIR_WRITE(INVERT_E0_DIR);E1_DIR_WRITE(INVERT_E1_DIR);}else _REV_E_DIR();}

Loading…
Cancel
Save