simulator: Respect XYZE_INVERT_DIR settings
Simulator assumes a basic set of config pins. Most it ignores and redefines. But the INVERT_DIR pins it did not, and these could be useful to simulate. So teach Simulator to respect them.
This commit is contained in:
parent
96b7b8e6c9
commit
ed7f3ad559
|
|
@ -340,18 +340,30 @@ void WRITE(pin_t pin, bool s) {
|
|||
switch (pin) {
|
||||
case X_STEP_PIN:
|
||||
dir = state[X_DIR_PIN] ? 1 : -1;
|
||||
#ifdef X_INVERT_DIR
|
||||
dir = -dir;
|
||||
#endif
|
||||
axis = X_AXIS;
|
||||
break;
|
||||
case Y_STEP_PIN:
|
||||
dir = state[Y_DIR_PIN] ? 1 : -1;
|
||||
#ifdef Y_INVERT_DIR
|
||||
dir = -dir;
|
||||
#endif
|
||||
axis = Y_AXIS;
|
||||
break;
|
||||
case Z_STEP_PIN:
|
||||
dir = state[Z_DIR_PIN] ? 1 : -1;
|
||||
#ifdef Z_INVERT_DIR
|
||||
dir = -dir;
|
||||
#endif
|
||||
axis = Z_AXIS;
|
||||
break;
|
||||
case E_STEP_PIN:
|
||||
dir = state[E_DIR_PIN] ? 1 : -1;
|
||||
#ifdef E_INVERT_DIR
|
||||
dir = -dir;
|
||||
#endif
|
||||
axis = E_AXIS;
|
||||
break;
|
||||
default:
|
||||
|
|
|
|||
Loading…
Reference in New Issue