Merge pull request #3788 from thinkyhead/rc_dual_x_compile_fix
DUAL_X_CARRIAGE fixes, improvements, Travis test
This commit is contained in:
		
							
								
								
									
										10
									
								
								.travis.yml
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								.travis.yml
									
									
									
									
									
								
							@@ -104,6 +104,16 @@ script:
 | 
			
		||||
  - opt_enable EEPROM_SETTINGS EEPROM_CHITCHAT
 | 
			
		||||
  - build_marlin
 | 
			
		||||
  #
 | 
			
		||||
  # Test DUAL_X_CARRIAGE
 | 
			
		||||
  #
 | 
			
		||||
  - restore_configs
 | 
			
		||||
  - opt_set MOTHERBOARD BOARD_RAMPS_14_EEB
 | 
			
		||||
  - opt_set EXTRUDERS 2
 | 
			
		||||
  - opt_set TEMP_SENSOR_1 1
 | 
			
		||||
  - opt_enable USE_XMAX_PLUG
 | 
			
		||||
  - opt_enable_adv DUAL_X_CARRIAGE
 | 
			
		||||
  - build_marlin
 | 
			
		||||
  #
 | 
			
		||||
  ### LCDS ###
 | 
			
		||||
  #
 | 
			
		||||
  #
 | 
			
		||||
 
 | 
			
		||||
@@ -129,6 +129,10 @@ void idle(
 | 
			
		||||
 | 
			
		||||
void manage_inactivity(bool ignore_stepper_queue = false);
 | 
			
		||||
 | 
			
		||||
#if ENABLED(DUAL_X_CARRIAGE)
 | 
			
		||||
  extern bool extruder_duplication_enabled;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if ENABLED(DUAL_X_CARRIAGE) && HAS_X_ENABLE && HAS_X2_ENABLE
 | 
			
		||||
  #define  enable_x() do { X_ENABLE_WRITE( X_ENABLE_ON); X2_ENABLE_WRITE( X_ENABLE_ON); } while (0)
 | 
			
		||||
  #define disable_x() do { X_ENABLE_WRITE(!X_ENABLE_ON); X2_ENABLE_WRITE(!X_ENABLE_ON); axis_known_position[X_AXIS] = false; } while (0)
 | 
			
		||||
 
 | 
			
		||||
@@ -398,14 +398,18 @@
 | 
			
		||||
 * Dual X Carriage requirements
 | 
			
		||||
 */
 | 
			
		||||
#if ENABLED(DUAL_X_CARRIAGE)
 | 
			
		||||
  #if EXTRUDERS == 1 || ENABLED(COREXY) \
 | 
			
		||||
      || !HAS_X2_ENABLE || !HAS_X2_STEP || !HAS_X2_DIR \
 | 
			
		||||
      || !defined(X2_HOME_POS) || !defined(X2_MIN_POS) || !defined(X2_MAX_POS) \
 | 
			
		||||
      || !HAS_X_MAX
 | 
			
		||||
    #error "Missing or invalid definitions for DUAL_X_CARRIAGE mode."
 | 
			
		||||
  #endif
 | 
			
		||||
  #if X_HOME_DIR != -1 || X2_HOME_DIR != 1
 | 
			
		||||
    #error "Please use canonical x-carriage assignment."
 | 
			
		||||
  #if EXTRUDERS == 1
 | 
			
		||||
    #error "DUAL_X_CARRIAGE requires 2 (or more) extruders."
 | 
			
		||||
  #elif ENABLED(COREXY) || ENABLED(COREXZ)
 | 
			
		||||
    #error "DUAL_X_CARRIAGE cannot be used with COREXY or COREXZ."
 | 
			
		||||
  #elif !HAS_X2_ENABLE || !HAS_X2_STEP || !HAS_X2_DIR
 | 
			
		||||
    #error "DUAL_X_CARRIAGE requires X2 stepper pins to be defined."
 | 
			
		||||
  #elif !HAS_X_MAX
 | 
			
		||||
    #error "DUAL_X_CARRIAGE requires USE_XMAX_PLUG and an X Max Endstop."
 | 
			
		||||
  #elif !defined(X2_HOME_POS) || !defined(X2_MIN_POS) || !defined(X2_MAX_POS)
 | 
			
		||||
    #error "DUAL_X_CARRIAGE requires X2_HOME_POS, X2_MIN_POS, and X2_MAX_POS."
 | 
			
		||||
  #elif X_HOME_DIR != -1 || X2_HOME_DIR != 1
 | 
			
		||||
    #error "DUAL_X_CARRIAGE requires X_HOME_DIR -1 and X2_HOME_DIR 1."
 | 
			
		||||
  #endif
 | 
			
		||||
#endif // DUAL_X_CARRIAGE
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -165,10 +165,6 @@ class Planner {
 | 
			
		||||
      static long axis_segment_time[2][3] = { {MAX_FREQ_TIME + 1, 0, 0}, {MAX_FREQ_TIME + 1, 0, 0} };
 | 
			
		||||
    #endif
 | 
			
		||||
 | 
			
		||||
    #if ENABLED(DUAL_X_CARRIAGE)
 | 
			
		||||
      extern bool extruder_duplication_enabled;
 | 
			
		||||
    #endif
 | 
			
		||||
 | 
			
		||||
  public:
 | 
			
		||||
 | 
			
		||||
    Planner();
 | 
			
		||||
 
 | 
			
		||||
@@ -193,7 +193,6 @@
 | 
			
		||||
    #define NORM_E_DIR() _NORM_E_DIR()
 | 
			
		||||
    #define REV_E_DIR() _REV_E_DIR()
 | 
			
		||||
  #else
 | 
			
		||||
    extern bool extruder_duplication_enabled;
 | 
			
		||||
    #define E_STEP_WRITE(v) {if(extruder_duplication_enabled){E0_STEP_WRITE(v);E1_STEP_WRITE(v);}else _E_STEP_WRITE(v);}
 | 
			
		||||
    #define NORM_E_DIR() {if(extruder_duplication_enabled){E0_DIR_WRITE(!INVERT_E0_DIR);E1_DIR_WRITE(!INVERT_E1_DIR);}else _NORM_E_DIR();}
 | 
			
		||||
    #define REV_E_DIR() {if(extruder_duplication_enabled){E0_DIR_WRITE(INVERT_E0_DIR);E1_DIR_WRITE(INVERT_E1_DIR);}else _REV_E_DIR();}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user