Browse Source

Merge pull request #550 from buildrob101/MinimalDualXCarriage

Fixed compile error when QUICK_HOME is defined.
ErikZalm 12 years ago
parent
commit
a105e10075
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      Marlin/Marlin_main.cpp

+ 3
- 3
Marlin/Marlin_main.cpp View File

696
     // second X-carriage offset when homed - otherwise X2_HOME_POS is used.
696
     // second X-carriage offset when homed - otherwise X2_HOME_POS is used.
697
     // This allow soft recalibration of the second extruder offset position without firmware reflash 
697
     // This allow soft recalibration of the second extruder offset position without firmware reflash 
698
     // (through the M218 command).
698
     // (through the M218 command).
699
-    return (extruder_offset[X_AXIS][1] != 0) ? extruder_offset[X_AXIS][1] : X2_HOME_POS;
699
+    return (extruder_offset[X_AXIS][1] > 0) ? extruder_offset[X_AXIS][1] : X2_HOME_POS;
700
 }
700
 }
701
 
701
 
702
 static int x_home_dir(int extruder) {
702
 static int x_home_dir(int extruder) {
711
   if (axis == X_AXIS && active_extruder != 0) {
711
   if (axis == X_AXIS && active_extruder != 0) {
712
     current_position[X_AXIS] = x_home_pos(active_extruder);
712
     current_position[X_AXIS] = x_home_pos(active_extruder);
713
     min_pos[X_AXIS] =          X2_MIN_POS;
713
     min_pos[X_AXIS] =          X2_MIN_POS;
714
-    max_pos[X_AXIS] =          X2_MAX_POS;
714
+    max_pos[X_AXIS] =          max(extruder_offset[X_AXIS][1], X2_MAX_POS);
715
     return;
715
     return;
716
   }
716
   }
717
 #endif  
717
 #endif  
907
       {
907
       {
908
         current_position[X_AXIS] = 0;current_position[Y_AXIS] = 0;
908
         current_position[X_AXIS] = 0;current_position[Y_AXIS] = 0;
909
 
909
 
910
-       #ifdef DUAL_X_CARRIAGE
910
+       #ifndef DUAL_X_CARRIAGE
911
         int x_axis_home_dir = home_dir(X_AXIS);
911
         int x_axis_home_dir = home_dir(X_AXIS);
912
        #else
912
        #else
913
         int x_axis_home_dir = x_home_dir(active_extruder);
913
         int x_axis_home_dir = x_home_dir(active_extruder);

Loading…
Cancel
Save