babystep synchronisation
This commit is contained in:
parent
981a681e52
commit
f30da4bbca
1 changed files with 4 additions and 0 deletions
|
@ -1879,14 +1879,18 @@ ISR(TIMER0_COMPB_vect)
|
||||||
|
|
||||||
if(curTodo>0)
|
if(curTodo>0)
|
||||||
{
|
{
|
||||||
|
asm("cli");
|
||||||
babystep(axis,/*fwd*/true);
|
babystep(axis,/*fwd*/true);
|
||||||
babystepsTodo[axis]--; //less to do next time
|
babystepsTodo[axis]--; //less to do next time
|
||||||
|
asm("sei");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if(curTodo<0)
|
if(curTodo<0)
|
||||||
{
|
{
|
||||||
|
asm("cli");
|
||||||
babystep(axis,/*fwd*/false);
|
babystep(axis,/*fwd*/false);
|
||||||
babystepsTodo[axis]++; //less to do next time
|
babystepsTodo[axis]++; //less to do next time
|
||||||
|
asm("sei");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif //BABYSTEPPING
|
#endif //BABYSTEPPING
|
||||||
|
|
Loading…
Reference in a new issue