timer.c: don't reset next_step_time when doing a step.
Doing so adds most of the interrupt execution time to the
step time, see line 126 of the same file:
if (next_step_time == 0) {
// new move, take current time as start value
step_start = TCNT1;
}
This commit is contained in:
parent
0ec0d360be
commit
851a91306a
1
timer.c
1
timer.c
|
|
@ -69,7 +69,6 @@ void timer1_compa_isr() {
|
||||||
ISR(TIMER1_COMPA_vect) {
|
ISR(TIMER1_COMPA_vect) {
|
||||||
// Check if this is a real step, or just a next_step_time "overflow"
|
// Check if this is a real step, or just a next_step_time "overflow"
|
||||||
if (next_step_time < 65536) {
|
if (next_step_time < 65536) {
|
||||||
next_step_time = 0;
|
|
||||||
// step!
|
// step!
|
||||||
timer1_compa_isr();
|
timer1_compa_isr();
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue