|
@@ -488,16 +488,16 @@ ISR(TIMER1_COMPA_vect)
|
488
|
488
|
if (counter_x > 0) {
|
489
|
489
|
WRITE(X_STEP_PIN, HIGH);
|
490
|
490
|
counter_x -= current_block->step_event_count;
|
491
|
|
- WRITE(X_STEP_PIN, LOW);
|
492
|
491
|
count_position[X_AXIS]+=count_direction[X_AXIS];
|
|
492
|
+ WRITE(X_STEP_PIN, LOW);
|
493
|
493
|
}
|
494
|
494
|
|
495
|
495
|
counter_y += current_block->steps_y;
|
496
|
496
|
if (counter_y > 0) {
|
497
|
497
|
WRITE(Y_STEP_PIN, HIGH);
|
498
|
|
-
|
|
498
|
+ counter_y -= current_block->step_event_count;
|
|
499
|
+ count_position[Y_AXIS]+=count_direction[Y_AXIS];
|
499
|
500
|
WRITE(Y_STEP_PIN, LOW);
|
500
|
|
-
|
501
|
501
|
}
|
502
|
502
|
#endif
|
503
|
503
|
|
|
@@ -508,19 +508,19 @@ ISR(TIMER1_COMPA_vect)
|
508
|
508
|
if ((counter_x > 0)&&!(counter_y>0)){ //X step only
|
509
|
509
|
WRITE(X_STEP_PIN, HIGH);
|
510
|
510
|
WRITE(Y_STEP_PIN, HIGH);
|
511
|
|
- counter_x -= current_block->step_event_count;
|
|
511
|
+ counter_x -= current_block->step_event_count;
|
|
512
|
+ count_position[X_AXIS]+=count_direction[X_AXIS];
|
512
|
513
|
WRITE(X_STEP_PIN, LOW);
|
513
|
514
|
WRITE(Y_STEP_PIN, LOW);
|
514
|
|
- count_position[X_AXIS]+=count_direction[X_AXIS];
|
515
|
515
|
}
|
516
|
516
|
|
517
|
517
|
if (!(counter_x > 0)&&(counter_y>0)){ //Y step only
|
518
|
518
|
WRITE(X_STEP_PIN, HIGH);
|
519
|
519
|
WRITE(Y_STEP_PIN, HIGH);
|
520
|
|
- counter_y -= current_block->step_event_count;
|
|
520
|
+ counter_y -= current_block->step_event_count;
|
|
521
|
+ count_position[Y_AXIS]+=count_direction[Y_AXIS];
|
521
|
522
|
WRITE(X_STEP_PIN, LOW);
|
522
|
523
|
WRITE(Y_STEP_PIN, LOW);
|
523
|
|
- count_position[Y_AXIS]+=count_direction[Y_AXIS];
|
524
|
524
|
}
|
525
|
525
|
|
526
|
526
|
if ((counter_x > 0)&&(counter_y>0)){ //step in both axes
|
|
@@ -553,8 +553,8 @@ ISR(TIMER1_COMPA_vect)
|
553
|
553
|
if (counter_z > 0) {
|
554
|
554
|
WRITE(Z_STEP_PIN, HIGH);
|
555
|
555
|
counter_z -= current_block->step_event_count;
|
556
|
|
- WRITE(Z_STEP_PIN, LOW);
|
557
|
556
|
count_position[Z_AXIS]+=count_direction[Z_AXIS];
|
|
557
|
+ WRITE(Z_STEP_PIN, LOW);
|
558
|
558
|
}
|
559
|
559
|
|
560
|
560
|
#ifndef ADVANCE
|
|
@@ -562,8 +562,8 @@ ISR(TIMER1_COMPA_vect)
|
562
|
562
|
if (counter_e > 0) {
|
563
|
563
|
WRITE_E_STEP(HIGH);
|
564
|
564
|
counter_e -= current_block->step_event_count;
|
565
|
|
- WRITE_E_STEP(LOW);
|
566
|
565
|
count_position[E_AXIS]+=count_direction[E_AXIS];
|
|
566
|
+ WRITE_E_STEP(LOW);
|
567
|
567
|
}
|
568
|
568
|
#endif //!ADVANCE
|
569
|
569
|
step_events_completed += 1;
|