Remove timer reset, as this doesn't play well. See
http://github.com/triffid/FiveD_on_Arduino/issues#issue/2/comment/428863 .
This commit is contained in:
parent
4679b45ac8
commit
64683e6b6a
1
timer.c
1
timer.c
|
|
@ -104,7 +104,6 @@ void setTimer(uint32_t delay)
|
||||||
// the result is the timer counts up to the appropriate time and then fires an interrupt.
|
// the result is the timer counts up to the appropriate time and then fires an interrupt.
|
||||||
|
|
||||||
setTimerResolution(0); // stop timer
|
setTimerResolution(0); // stop timer
|
||||||
TCNT1 = 0; // reset timer
|
|
||||||
GTCCR = MASK(PSRSYNC); // reset prescaler - affects timer 0 too but since it's doing PWM, it's not using the prescaler
|
GTCCR = MASK(PSRSYNC); // reset prescaler - affects timer 0 too but since it's doing PWM, it's not using the prescaler
|
||||||
|
|
||||||
setTimerCeiling(getTimerCeiling(delay)); // set timeout
|
setTimerCeiling(getTimerCeiling(delay)); // set timeout
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue