disable interrupt if setTimer(0) is called

This commit is contained in:
Michael Moon 2011-02-11 11:53:27 +11:00
parent d91f30eda1
commit 3c5acd7ca7
1 changed files with 1 additions and 0 deletions

View File

@ -136,6 +136,7 @@ void setTimer(uint32_t delay)
} else {
// flag: move has ended
next_step_time = 0;
TIMSK1 &= ~MASK(OCIE1A);
}
// restore interrupt flag