dda_queue.c: run every queued thing through dda_create().
This allows dda_create() to track things queued but not being a movement. Important for lookahead.
This commit is contained in:
parent
ddd8988727
commit
f37a65ca36
5
dda.c
5
dda.c
|
|
@ -91,10 +91,13 @@ void dda_create(DDA *dda, TARGET *target) {
|
|||
static uint8_t idcnt = 0;
|
||||
static DDA* prev_dda = NULL;
|
||||
|
||||
if (prev_dda && prev_dda->done)
|
||||
if ((prev_dda && prev_dda->done) || dda->waitfor_temp)
|
||||
prev_dda = NULL;
|
||||
#endif
|
||||
|
||||
if (dda->waitfor_temp)
|
||||
return;
|
||||
|
||||
// initialise DDA to a known state
|
||||
dda->allflags = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -114,15 +114,14 @@ void enqueue_home(TARGET *t, uint8_t endstop_check, uint8_t endstop_stop_cond) {
|
|||
DDA* new_movebuffer = &(movebuffer[h]);
|
||||
|
||||
if (t != NULL) {
|
||||
dda_create(new_movebuffer, t);
|
||||
new_movebuffer->endstop_check = endstop_check;
|
||||
new_movebuffer->endstop_stop_cond = endstop_stop_cond;
|
||||
}
|
||||
else {
|
||||
// it's a wait for temp
|
||||
new_movebuffer->waitfor_temp = 1;
|
||||
new_movebuffer->nullmove = 0;
|
||||
}
|
||||
dda_create(new_movebuffer, t);
|
||||
|
||||
// make certain all writes to global memory
|
||||
// are flushed before modifying mb_head.
|
||||
|
|
|
|||
Loading…
Reference in New Issue