Browse Source

first homing move diagonal towards home switches.

Bernhard 13 years ago
parent
commit
716e89b87c
1 changed files with 13 additions and 0 deletions
  1. 13
    0
      Marlin/Marlin.pde

+ 13
- 0
Marlin/Marlin.pde View File

532
       feedrate = 0.0;
532
       feedrate = 0.0;
533
       home_all_axis = !((code_seen(axis_codes[0])) || (code_seen(axis_codes[1])) || (code_seen(axis_codes[2])));
533
       home_all_axis = !((code_seen(axis_codes[0])) || (code_seen(axis_codes[1])) || (code_seen(axis_codes[2])));
534
       
534
       
535
+      if( code_seen(axis_codes[0]) && code_seen(axis_codes[1]) )  //first diagonal move
536
+      {
537
+        current_position[X_AXIS] = 0; current_position[Y_AXIS] = 0;
538
+        plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]); 
539
+        destination[X_AXIS] = 1.5 * X_MAX_LENGTH * X_HOME_DIR;
540
+        destination[Y_AXIS] = 1.5 * Y_MAX_LENGTH * Y_HOME_DIR; 
541
+        feedrate =homing_feedrate[X_AXIS]; 
542
+        if(homing_feedrate[Y_AXIS]<feedrate)
543
+          feedrate =homing_feedrate[Y_AXIS]; 
544
+        prepare_move();
545
+        current_position[X_AXIS] = 0; current_position[Y_AXIS] = 0;
546
+      }
547
+      
535
       if((home_all_axis) || (code_seen(axis_codes[X_AXIS]))) 
548
       if((home_all_axis) || (code_seen(axis_codes[X_AXIS]))) 
536
       {
549
       {
537
         HOMEAXIS(X);
550
         HOMEAXIS(X);

Loading…
Cancel
Save