dda_create(): clear _all_ flags before proceeding.
This commit is contained in:
parent
9eb6c519ab
commit
0572687cb2
3
dda.c
3
dda.c
|
|
@ -119,8 +119,7 @@ void dda_create(DDA *dda, TARGET *target) {
|
|||
uint32_t distance;
|
||||
|
||||
// initialise DDA to a known state
|
||||
dda->live = 0;
|
||||
dda->waitfor_temp = 0;
|
||||
dda->allflags = 0;
|
||||
|
||||
if (debug_flags & DEBUG_DDA)
|
||||
serial_writestr_P(PSTR("\n{DDA_CREATE: ["));
|
||||
|
|
|
|||
27
dda.h
27
dda.h
|
|
@ -24,19 +24,24 @@ typedef struct {
|
|||
// this is where we should finish
|
||||
TARGET endpoint;
|
||||
|
||||
// status fields
|
||||
uint8_t nullmove :1;
|
||||
uint8_t live :1;
|
||||
uint8_t accel :1;
|
||||
union {
|
||||
struct {
|
||||
// status fields
|
||||
uint8_t nullmove :1;
|
||||
uint8_t live :1;
|
||||
uint8_t accel :1;
|
||||
|
||||
// wait for temperature to stabilise flag
|
||||
uint8_t waitfor_temp :1;
|
||||
// wait for temperature to stabilise flag
|
||||
uint8_t waitfor_temp :1;
|
||||
|
||||
// directions
|
||||
uint8_t x_direction :1;
|
||||
uint8_t y_direction :1;
|
||||
uint8_t z_direction :1;
|
||||
uint8_t e_direction :1;
|
||||
// directions
|
||||
uint8_t x_direction :1;
|
||||
uint8_t y_direction :1;
|
||||
uint8_t z_direction :1;
|
||||
uint8_t e_direction :1;
|
||||
};
|
||||
uint8_t allflags; // used for clearing all flags
|
||||
};
|
||||
|
||||
// distances
|
||||
uint32_t x_delta;
|
||||
|
|
|
|||
Loading…
Reference in New Issue