Revert and extend previous change pin check change
Reviert previous change of #if BLAH_PIN > 0 to #if defined(BLAH_PIN) && BLAH_PIN > -1. Unfortunately some times pin 0 is used. For my sins I've gone through and replaced all unsafe checks of #if BLAH_PIN > -1 with the safe version.
This commit is contained in:
@ -96,7 +96,7 @@ void process_commands();
|
||||
|
||||
void manage_inactivity();
|
||||
|
||||
#if X_ENABLE_PIN > -1
|
||||
#if defined(X_ENABLE_PIN) && X_ENABLE_PIN > -1
|
||||
#define enable_x() WRITE(X_ENABLE_PIN, X_ENABLE_ON)
|
||||
#define disable_x() WRITE(X_ENABLE_PIN,!X_ENABLE_ON)
|
||||
#else
|
||||
@ -104,7 +104,7 @@ void manage_inactivity();
|
||||
#define disable_x() ;
|
||||
#endif
|
||||
|
||||
#if Y_ENABLE_PIN > -1
|
||||
#if defined(Y_ENABLE_PIN) && Y_ENABLE_PIN > -1
|
||||
#define enable_y() WRITE(Y_ENABLE_PIN, Y_ENABLE_ON)
|
||||
#define disable_y() WRITE(Y_ENABLE_PIN,!Y_ENABLE_ON)
|
||||
#else
|
||||
@ -112,7 +112,7 @@ void manage_inactivity();
|
||||
#define disable_y() ;
|
||||
#endif
|
||||
|
||||
#if Z_ENABLE_PIN > -1
|
||||
#if defined(Z_ENABLE_PIN) && Z_ENABLE_PIN > -1
|
||||
#ifdef Z_DUAL_STEPPER_DRIVERS
|
||||
#define enable_z() { WRITE(Z_ENABLE_PIN, Z_ENABLE_ON); WRITE(Z2_ENABLE_PIN, Z_ENABLE_ON); }
|
||||
#define disable_z() { WRITE(Z_ENABLE_PIN,!Z_ENABLE_ON); WRITE(Z2_ENABLE_PIN,!Z_ENABLE_ON); }
|
||||
|
Reference in New Issue
Block a user