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,7 +696,7 @@ static float x_home_pos(int extruder) {
696 696
     // second X-carriage offset when homed - otherwise X2_HOME_POS is used.
697 697
     // This allow soft recalibration of the second extruder offset position without firmware reflash 
698 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 702
 static int x_home_dir(int extruder) {
@@ -711,7 +711,7 @@ static void axis_is_at_home(int axis) {
711 711
   if (axis == X_AXIS && active_extruder != 0) {
712 712
     current_position[X_AXIS] = x_home_pos(active_extruder);
713 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 715
     return;
716 716
   }
717 717
 #endif  
@@ -907,7 +907,7 @@ void process_commands()
907 907
       {
908 908
         current_position[X_AXIS] = 0;current_position[Y_AXIS] = 0;
909 909
 
910
-       #ifdef DUAL_X_CARRIAGE
910
+       #ifndef DUAL_X_CARRIAGE
911 911
         int x_axis_home_dir = home_dir(X_AXIS);
912 912
        #else
913 913
         int x_axis_home_dir = x_home_dir(active_extruder);

Loading…
Cancel
Save