try to deal with consecutive null moves
This commit is contained in:
parent
c177756913
commit
16944d4394
|
|
@ -88,6 +88,7 @@ void enqueue(TARGET *t) {
|
||||||
// sometimes called from normal program execution, sometimes from interrupt context
|
// sometimes called from normal program execution, sometimes from interrupt context
|
||||||
void next_move() {
|
void next_move() {
|
||||||
if (queue_empty() == 0) {
|
if (queue_empty() == 0) {
|
||||||
|
do {
|
||||||
// next item
|
// next item
|
||||||
uint8_t t = mb_tail + 1;
|
uint8_t t = mb_tail + 1;
|
||||||
t &= (MOVEBUFFER_SIZE - 1);
|
t &= (MOVEBUFFER_SIZE - 1);
|
||||||
|
|
@ -102,6 +103,7 @@ void next_move() {
|
||||||
dda_start(&movebuffer[t]);
|
dda_start(&movebuffer[t]);
|
||||||
}
|
}
|
||||||
mb_tail = t;
|
mb_tail = t;
|
||||||
|
} while ((queue_empty() == 0) && (movebuffer[mb_tail].live == 0));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
setTimer(0);
|
setTimer(0);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue