// Initializes the trapezoid generator from the current block. Called whenever a new
// Initializes the trapezoid generator from the current block. Called whenever a new
// block begins.
// block begins.
FORCE_INLINEvoidtrapezoid_generator_reset(){
FORCE_INLINEvoidtrapezoid_generator_reset(){
// Set directions TO DO This should be done once during init of trapezoid. Endstops -> interrupt
if(current_block->direction_bits!=out_bits){
out_bits=current_block->direction_bits;
out_bits=current_block->direction_bits;
set_stepper_direction();
set_stepper_direction();
}
#ifdef ADVANCE
#ifdef ADVANCE
advance=current_block->initial_advance;
advance=current_block->initial_advance;
final_advance=current_block->final_advance;
final_advance=current_block->final_advance;
...
@@ -557,8 +559,7 @@ ISR(TIMER1_COMPA_vect) {
...
@@ -557,8 +559,7 @@ ISR(TIMER1_COMPA_vect) {
#ifdef COREXY
#ifdef COREXY
}
}
#endif
#endif
if(TEST(out_bits,Z_AXIS)){// z -direction
if(TEST(out_bits,Z_AXIS)){// -direction
#if HAS_Z_MIN
#if HAS_Z_MIN
#ifdef Z_DUAL_ENDSTOPS
#ifdef Z_DUAL_ENDSTOPS
...
@@ -601,8 +602,7 @@ ISR(TIMER1_COMPA_vect) {
...
@@ -601,8 +602,7 @@ ISR(TIMER1_COMPA_vect) {
old_z_probe_endstop=z_probe_endstop;
old_z_probe_endstop=z_probe_endstop;
#endif
#endif
}
}
else{// +direction
else{// z +direction
#if HAS_Z_MAX
#if HAS_Z_MAX
#ifdef Z_DUAL_ENDSTOPS
#ifdef Z_DUAL_ENDSTOPS
...
@@ -992,12 +992,12 @@ void st_init() {
...
@@ -992,12 +992,12 @@ void st_init() {
#endif
#endif
#endif
#endif
#if (defined(Z_PROBE_PIN) && Z_PROBE_PIN >= 0) && defined(Z_PROBE_ENDSTOP) // Check for Z_PROBE_ENDSTOP so we don't pull a pin high unless it's to be used.
#if (defined(Z_PROBE_PIN) && Z_PROBE_PIN >= 0) && defined(Z_PROBE_ENDSTOP) // Check for Z_PROBE_ENDSTOP so we don't pull a pin high unless it's to be used.