Reduce irq delay if it has gotten to large
This commit is contained in:
@@ -88,6 +88,8 @@ void handleStepper(void)
|
|||||||
if (irqServeDelays.bufferIsFull()) // Do max calcs, just waiting a second
|
if (irqServeDelays.bufferIsFull()) // Do max calcs, just waiting a second
|
||||||
{
|
{
|
||||||
uint16_t maxInBuffer = irqServeDelays.getMaxInBuffer();
|
uint16_t maxInBuffer = irqServeDelays.getMaxInBuffer();
|
||||||
|
if (maxIrqServeTime > maxInBuffer) // Reduce by one, slowly eating up excess time
|
||||||
|
maxIrqServeTime--;
|
||||||
if (maxIrqServeTime < maxInBuffer)
|
if (maxIrqServeTime < maxInBuffer)
|
||||||
maxIrqServeTime = maxInBuffer;
|
maxIrqServeTime = maxInBuffer;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user