Fixed AUTOTEMP (M109 S215 B260 F1 starts autotemp)
Changed SLOWDOWN. IF this does not work ok OLD_SLOWDOWN is the old algo.
This commit is contained in:
@ -54,7 +54,6 @@ volatile static unsigned long step_events_completed; // The number of step event
|
||||
static long old_advance = 0;
|
||||
#endif
|
||||
static long e_steps[3];
|
||||
static unsigned char busy = false; // TRUE when SIG_OUTPUT_COMPARE1A is being serviced. Used to avoid retriggering that handler.
|
||||
static long acceleration_time, deceleration_time;
|
||||
//static unsigned long accelerate_until, decelerate_after, acceleration_rate, initial_rate, final_rate, nominal_rate;
|
||||
static unsigned short acc_step_rate; // needed for deccelaration start point
|
||||
@ -216,7 +215,6 @@ void enable_endstops(bool check)
|
||||
|
||||
void st_wake_up() {
|
||||
// TCNT1 = 0;
|
||||
if(busy == false)
|
||||
ENABLE_STEPPER_DRIVER_INTERRUPT();
|
||||
}
|
||||
|
||||
@ -295,6 +293,7 @@ ISR(TIMER1_COMPA_vect)
|
||||
// Anything in the buffer?
|
||||
current_block = plan_get_current_block();
|
||||
if (current_block != NULL) {
|
||||
current_block->busy = true;
|
||||
trapezoid_generator_reset();
|
||||
counter_x = -(current_block->step_event_count >> 1);
|
||||
counter_y = counter_x;
|
||||
@ -773,12 +772,7 @@ void st_init()
|
||||
TIMSK0 |= (1<<OCIE0A);
|
||||
#endif //ADVANCE
|
||||
|
||||
#ifdef ENDSTOPS_ONLY_FOR_HOMING
|
||||
enable_endstops(false);
|
||||
#else
|
||||
enable_endstops(true);
|
||||
#endif
|
||||
|
||||
enable_endstops(true); // Start with endstops active. After homing they can be disabled
|
||||
sei();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user