Skip to content

Commit 3e441d8

Browse files
robhercEvilGremlin
authored andcommitted
🔧 Fix extraneous DIAG warnings (MarlinFirmware#26694)
1 parent bcee7f4 commit 3e441d8

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

Marlin/src/core/drivers.h

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@
120120
#define HAS_TMC220x 1
121121
#endif
122122

123+
#if HAS_DRIVER(TMC26X)
124+
#define HAS_TMC26X 1
125+
#endif
126+
123127
#define AXIS_IS_TMC(A) ( AXIS_DRIVER_TYPE(A,TMC2130) || AXIS_DRIVER_TYPE(A,TMC2160) \
124128
|| AXIS_DRIVER_TYPE(A,TMC2208) || AXIS_DRIVER_TYPE(A,TMC2209) \
125129
|| AXIS_DRIVER_TYPE(A,TMC2660) \
@@ -184,10 +188,9 @@
184188
#if ANY_AXIS_HAS(SPI)
185189
#define HAS_TMC_SPI 1
186190
#endif
187-
188-
//
189-
// TMC26XX Stepper Drivers
190-
//
191-
#if HAS_DRIVER(TMC26X)
192-
#define HAS_TMC26X 1
191+
#if HAS_STALLGUARD || HAS_DRIVER(TMC2160_STANDALONE) || HAS_DRIVER(TMC2130_STANDALONE) \
192+
|| HAS_DRIVER(TMC2209_STANDALONE) || HAS_DRIVER(TMC26X) \
193+
|| HAS_DRIVER(TMC26X_STANDALONE) || HAS_DRIVER(TMC2660_STANDALONE) \
194+
|| HAS_DRIVER(TMC5130_STANDALONE) || HAS_DRIVER(TMC5160_STANDALONE)
195+
#define HAS_DIAG_PINS 1
193196
#endif

Marlin/src/inc/Warnings.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@
678678
//
679679
// Warn users of potential endstop/DIAG pin conflicts to prevent homing issues when not using sensorless homing
680680
//
681-
#if !USE_SENSORLESS
681+
#if !USE_SENSORLESS && HAS_DIAG_PINS
682682
#if ENABLED(USES_DIAG_JUMPERS) && DISABLED(DIAG_JUMPERS_REMOVED)
683683
#warning "Motherboard DIAG jumpers must be removed when SENSORLESS_HOMING is disabled. (Define DIAG_JUMPERS_REMOVED to suppress this warning.)"
684684
#endif

ini/features.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ SR_LCD_3W_NL = SailfishLCD=https://github.com/mikeshub
2828
HAS_MOTOR_CURRENT_(I2C|DAC|SPI|PWM) = build_src_filter=+<src/gcode/feature/digipot>
2929
HAS_MOTOR_CURRENT_I2C = SlowSoftI2CMaster
3030
build_src_filter=+<src/feature/digipot>
31-
HAS_TMC26X = TMC26XStepper=https://github.com/MarlinFirmware/TMC26XStepper/archive/a7d7c92a13.zip
31+
HAS_TMC26X = TMC26XStepper=https://github.com/MarlinFirmware/TMC26XStepper/archive/0.1.2.zip
3232
build_src_filter=+<src/module/stepper/TMC26X.cpp>
3333
LIB_INTERNAL_MAX31865 = build_src_filter=+<src/libs/MAX31865.cpp>
3434
NEOPIXEL_LED = adafruit/Adafruit NeoPixel@~1.8.0

0 commit comments

Comments
 (0)