Skip to content

Commit

Permalink
🔨 Allow I2CPE_ENC_n_INVERT set to false
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Mar 23, 2022
1 parent e183e38 commit ef07c2c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Marlin/src/feature/encoder_i2c.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ void I2CPositionEncodersMgr::init() {
encoders[i].set_stepper_ticks(I2CPE_ENC_1_TICKS_REV);
#endif
#ifdef I2CPE_ENC_1_INVERT
encoders[i].set_inverted(I2CPE_ENC_1_INVERT);
encoders[i].set_inverted(ENABLED(I2CPE_ENC_1_INVERT));
#endif
#ifdef I2CPE_ENC_1_EC_METHOD
encoders[i].set_ec_method(I2CPE_ENC_1_EC_METHOD);
Expand Down Expand Up @@ -518,7 +518,7 @@ void I2CPositionEncodersMgr::init() {
encoders[i].set_stepper_ticks(I2CPE_ENC_2_TICKS_REV);
#endif
#ifdef I2CPE_ENC_2_INVERT
encoders[i].set_inverted(I2CPE_ENC_2_INVERT);
encoders[i].set_inverted(ENABLED(I2CPE_ENC_2_INVERT));
#endif
#ifdef I2CPE_ENC_2_EC_METHOD
encoders[i].set_ec_method(I2CPE_ENC_2_EC_METHOD);
Expand Down Expand Up @@ -547,7 +547,7 @@ void I2CPositionEncodersMgr::init() {
encoders[i].set_stepper_ticks(I2CPE_ENC_3_TICKS_REV);
#endif
#ifdef I2CPE_ENC_3_INVERT
encoders[i].set_inverted(I2CPE_ENC_3_INVERT);
encoders[i].set_inverted(ENABLED(I2CPE_ENC_3_INVERT));
#endif
#ifdef I2CPE_ENC_3_EC_METHOD
encoders[i].set_ec_method(I2CPE_ENC_3_EC_METHOD);
Expand Down Expand Up @@ -576,7 +576,7 @@ void I2CPositionEncodersMgr::init() {
encoders[i].set_stepper_ticks(I2CPE_ENC_4_TICKS_REV);
#endif
#ifdef I2CPE_ENC_4_INVERT
encoders[i].set_inverted(I2CPE_ENC_4_INVERT);
encoders[i].set_inverted(ENABLED(I2CPE_ENC_4_INVERT));
#endif
#ifdef I2CPE_ENC_4_EC_METHOD
encoders[i].set_ec_method(I2CPE_ENC_4_EC_METHOD);
Expand Down Expand Up @@ -605,7 +605,7 @@ void I2CPositionEncodersMgr::init() {
encoders[i].set_stepper_ticks(I2CPE_ENC_5_TICKS_REV);
#endif
#ifdef I2CPE_ENC_5_INVERT
encoders[i].set_inverted(I2CPE_ENC_5_INVERT);
encoders[i].set_inverted(ENABLED(I2CPE_ENC_5_INVERT));
#endif
#ifdef I2CPE_ENC_5_EC_METHOD
encoders[i].set_ec_method(I2CPE_ENC_5_EC_METHOD);
Expand Down Expand Up @@ -634,7 +634,7 @@ void I2CPositionEncodersMgr::init() {
encoders[i].set_stepper_ticks(I2CPE_ENC_6_TICKS_REV);
#endif
#ifdef I2CPE_ENC_6_INVERT
encoders[i].set_inverted(I2CPE_ENC_6_INVERT);
encoders[i].set_inverted(ENABLED(I2CPE_ENC_6_INVERT));
#endif
#ifdef I2CPE_ENC_6_EC_METHOD
encoders[i].set_ec_method(I2CPE_ENC_6_EC_METHOD);
Expand Down

0 comments on commit ef07c2c

Please sign in to comment.