Skip to content

Commit c60b39f

Browse files
committed
Merge remote-tracking branch 'upstream/bugfix-2.0.x' into extui
2 parents a555966 + 35791c6 commit c60b39f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+764
-349
lines changed

Marlin/Configuration.h

+5-2
Original file line numberDiff line numberDiff line change
@@ -1226,6 +1226,8 @@
12261226
#define FIL_RUNOUT_STATE HIGH // Pin state indicating that filament is NOT present.
12271227
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
12281228
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
1229+
//#define WATCH_ALL_RUNOUT_SENSORS // Execute runout script on any triggering sensor, not only for the active extruder.
1230+
// This is automatically enabled for MIXING_EXTRUDERs.
12291231

12301232
// Override individually if the runout sensors vary
12311233
//#define FIL_RUNOUT1_STATE LOW
@@ -1260,8 +1262,9 @@
12601262
//#define FIL_RUNOUT8_PULLUP
12611263
//#define FIL_RUNOUT8_PULLDOWN
12621264

1263-
// Set one or more commands to execute on filament runout.
1264-
// (After 'M412 H' Marlin will ask the host to handle the process.)
1265+
// Commands to execute on filament runout.
1266+
// With multiple runout sensors use the %c placeholder for the current tool in commands (e.g., "M600 T%c")
1267+
// NOTE: After 'M412 H1' the host handles filament runout and this script does not apply.
12651268
#define FILAMENT_RUNOUT_SCRIPT "M600"
12661269

12671270
// After a runout is detected, continue printing this length of filament

Marlin/Configuration_adv.h

+75-38
Original file line numberDiff line numberDiff line change
@@ -1221,7 +1221,6 @@
12211221
#if ENABLED(POWER_LOSS_RECOVERY)
12221222
#define PLR_ENABLED_DEFAULT true // Power Loss Recovery enabled by default. (Set with 'M413 Sn' & M500)
12231223
//#define BACKUP_POWER_SUPPLY // Backup power / UPS to move the steppers on power loss
1224-
//#define POWER_LOSS_RECOVER_ZHOME // Z homing is needed for proper recovery. 99.9% of the time this should be disabled!
12251224
//#define POWER_LOSS_ZRAISE 2 // (mm) Z axis raise on resume (on power loss with UPS)
12261225
//#define POWER_LOSS_PIN 44 // Pin to detect power loss. Set to -1 to disable default pin on boards without module.
12271226
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
@@ -1233,6 +1232,12 @@
12331232
// Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card,
12341233
// especially with "vase mode" printing. Set too high and vases cannot be continued.
12351234
#define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data
1235+
1236+
// Enable if Z homing is needed for proper recovery. 99.9% of the time this should be disabled!
1237+
//#define POWER_LOSS_RECOVER_ZHOME
1238+
#if ENABLED(POWER_LOSS_RECOVER_ZHOME)
1239+
//#define POWER_LOSS_ZHOME_POS { 0, 0 } // Safe XY position to home Z while avoiding objects on the bed
1240+
#endif
12361241
#endif
12371242

12381243
/**
@@ -2180,7 +2185,7 @@
21802185
#if AXIS_DRIVER_TYPE_X2(TMC26X)
21812186
#define X2_MAX_CURRENT 1000
21822187
#define X2_SENSE_RESISTOR 91
2183-
#define X2_MICROSTEPS 16
2188+
#define X2_MICROSTEPS X_MICROSTEPS
21842189
#endif
21852190

21862191
#if AXIS_DRIVER_TYPE_Y(TMC26X)
@@ -2192,7 +2197,7 @@
21922197
#if AXIS_DRIVER_TYPE_Y2(TMC26X)
21932198
#define Y2_MAX_CURRENT 1000
21942199
#define Y2_SENSE_RESISTOR 91
2195-
#define Y2_MICROSTEPS 16
2200+
#define Y2_MICROSTEPS Y_MICROSTEPS
21962201
#endif
21972202

21982203
#if AXIS_DRIVER_TYPE_Z(TMC26X)
@@ -2204,19 +2209,19 @@
22042209
#if AXIS_DRIVER_TYPE_Z2(TMC26X)
22052210
#define Z2_MAX_CURRENT 1000
22062211
#define Z2_SENSE_RESISTOR 91
2207-
#define Z2_MICROSTEPS 16
2212+
#define Z2_MICROSTEPS Z_MICROSTEPS
22082213
#endif
22092214

22102215
#if AXIS_DRIVER_TYPE_Z3(TMC26X)
22112216
#define Z3_MAX_CURRENT 1000
22122217
#define Z3_SENSE_RESISTOR 91
2213-
#define Z3_MICROSTEPS 16
2218+
#define Z3_MICROSTEPS Z_MICROSTEPS
22142219
#endif
22152220

22162221
#if AXIS_DRIVER_TYPE_Z4(TMC26X)
22172222
#define Z4_MAX_CURRENT 1000
22182223
#define Z4_SENSE_RESISTOR 91
2219-
#define Z4_MICROSTEPS 16
2224+
#define Z4_MICROSTEPS Z_MICROSTEPS
22202225
#endif
22212226

22222227
#if AXIS_DRIVER_TYPE_E0(TMC26X)
@@ -2228,43 +2233,43 @@
22282233
#if AXIS_DRIVER_TYPE_E1(TMC26X)
22292234
#define E1_MAX_CURRENT 1000
22302235
#define E1_SENSE_RESISTOR 91
2231-
#define E1_MICROSTEPS 16
2236+
#define E1_MICROSTEPS E0_MICROSTEPS
22322237
#endif
22332238

22342239
#if AXIS_DRIVER_TYPE_E2(TMC26X)
22352240
#define E2_MAX_CURRENT 1000
22362241
#define E2_SENSE_RESISTOR 91
2237-
#define E2_MICROSTEPS 16
2242+
#define E2_MICROSTEPS E0_MICROSTEPS
22382243
#endif
22392244

22402245
#if AXIS_DRIVER_TYPE_E3(TMC26X)
22412246
#define E3_MAX_CURRENT 1000
22422247
#define E3_SENSE_RESISTOR 91
2243-
#define E3_MICROSTEPS 16
2248+
#define E3_MICROSTEPS E0_MICROSTEPS
22442249
#endif
22452250

22462251
#if AXIS_DRIVER_TYPE_E4(TMC26X)
22472252
#define E4_MAX_CURRENT 1000
22482253
#define E4_SENSE_RESISTOR 91
2249-
#define E4_MICROSTEPS 16
2254+
#define E4_MICROSTEPS E0_MICROSTEPS
22502255
#endif
22512256

22522257
#if AXIS_DRIVER_TYPE_E5(TMC26X)
22532258
#define E5_MAX_CURRENT 1000
22542259
#define E5_SENSE_RESISTOR 91
2255-
#define E5_MICROSTEPS 16
2260+
#define E5_MICROSTEPS E0_MICROSTEPS
22562261
#endif
22572262

22582263
#if AXIS_DRIVER_TYPE_E6(TMC26X)
22592264
#define E6_MAX_CURRENT 1000
22602265
#define E6_SENSE_RESISTOR 91
2261-
#define E6_MICROSTEPS 16
2266+
#define E6_MICROSTEPS E0_MICROSTEPS
22622267
#endif
22632268

22642269
#if AXIS_DRIVER_TYPE_E7(TMC26X)
22652270
#define E7_MAX_CURRENT 1000
22662271
#define E7_SENSE_RESISTOR 91
2267-
#define E7_MICROSTEPS 16
2272+
#define E7_MICROSTEPS E0_MICROSTEPS
22682273
#endif
22692274

22702275
#endif // TMC26X
@@ -2309,7 +2314,7 @@
23092314
#if AXIS_IS_TMC(X2)
23102315
#define X2_CURRENT 800
23112316
#define X2_CURRENT_HOME X2_CURRENT
2312-
#define X2_MICROSTEPS 16
2317+
#define X2_MICROSTEPS X_MICROSTEPS
23132318
#define X2_RSENSE 0.11
23142319
#define X2_CHAIN_POS -1
23152320
//#define X2_INTERPOLATE true
@@ -2327,7 +2332,7 @@
23272332
#if AXIS_IS_TMC(Y2)
23282333
#define Y2_CURRENT 800
23292334
#define Y2_CURRENT_HOME Y2_CURRENT
2330-
#define Y2_MICROSTEPS 16
2335+
#define Y2_MICROSTEPS Y_MICROSTEPS
23312336
#define Y2_RSENSE 0.11
23322337
#define Y2_CHAIN_POS -1
23332338
//#define Y2_INTERPOLATE true
@@ -2345,7 +2350,7 @@
23452350
#if AXIS_IS_TMC(Z2)
23462351
#define Z2_CURRENT 800
23472352
#define Z2_CURRENT_HOME Z2_CURRENT
2348-
#define Z2_MICROSTEPS 16
2353+
#define Z2_MICROSTEPS Z_MICROSTEPS
23492354
#define Z2_RSENSE 0.11
23502355
#define Z2_CHAIN_POS -1
23512356
//#define Z2_INTERPOLATE true
@@ -2354,7 +2359,7 @@
23542359
#if AXIS_IS_TMC(Z3)
23552360
#define Z3_CURRENT 800
23562361
#define Z3_CURRENT_HOME Z3_CURRENT
2357-
#define Z3_MICROSTEPS 16
2362+
#define Z3_MICROSTEPS Z_MICROSTEPS
23582363
#define Z3_RSENSE 0.11
23592364
#define Z3_CHAIN_POS -1
23602365
//#define Z3_INTERPOLATE true
@@ -2363,7 +2368,7 @@
23632368
#if AXIS_IS_TMC(Z4)
23642369
#define Z4_CURRENT 800
23652370
#define Z4_CURRENT_HOME Z4_CURRENT
2366-
#define Z4_MICROSTEPS 16
2371+
#define Z4_MICROSTEPS Z_MICROSTEPS
23672372
#define Z4_RSENSE 0.11
23682373
#define Z4_CHAIN_POS -1
23692374
//#define Z4_INTERPOLATE true
@@ -2379,55 +2384,55 @@
23792384

23802385
#if AXIS_IS_TMC(E1)
23812386
#define E1_CURRENT 800
2382-
#define E1_MICROSTEPS 16
2387+
#define E1_MICROSTEPS E0_MICROSTEPS
23832388
#define E1_RSENSE 0.11
23842389
#define E1_CHAIN_POS -1
23852390
//#define E1_INTERPOLATE true
23862391
#endif
23872392

23882393
#if AXIS_IS_TMC(E2)
23892394
#define E2_CURRENT 800
2390-
#define E2_MICROSTEPS 16
2395+
#define E2_MICROSTEPS E0_MICROSTEPS
23912396
#define E2_RSENSE 0.11
23922397
#define E2_CHAIN_POS -1
23932398
//#define E2_INTERPOLATE true
23942399
#endif
23952400

23962401
#if AXIS_IS_TMC(E3)
23972402
#define E3_CURRENT 800
2398-
#define E3_MICROSTEPS 16
2403+
#define E3_MICROSTEPS E0_MICROSTEPS
23992404
#define E3_RSENSE 0.11
24002405
#define E3_CHAIN_POS -1
24012406
//#define E3_INTERPOLATE true
24022407
#endif
24032408

24042409
#if AXIS_IS_TMC(E4)
24052410
#define E4_CURRENT 800
2406-
#define E4_MICROSTEPS 16
2411+
#define E4_MICROSTEPS E0_MICROSTEPS
24072412
#define E4_RSENSE 0.11
24082413
#define E4_CHAIN_POS -1
24092414
//#define E4_INTERPOLATE true
24102415
#endif
24112416

24122417
#if AXIS_IS_TMC(E5)
24132418
#define E5_CURRENT 800
2414-
#define E5_MICROSTEPS 16
2419+
#define E5_MICROSTEPS E0_MICROSTEPS
24152420
#define E5_RSENSE 0.11
24162421
#define E5_CHAIN_POS -1
24172422
//#define E5_INTERPOLATE true
24182423
#endif
24192424

24202425
#if AXIS_IS_TMC(E6)
24212426
#define E6_CURRENT 800
2422-
#define E6_MICROSTEPS 16
2427+
#define E6_MICROSTEPS E0_MICROSTEPS
24232428
#define E6_RSENSE 0.11
24242429
#define E6_CHAIN_POS -1
24252430
//#define E6_INTERPOLATE true
24262431
#endif
24272432

24282433
#if AXIS_IS_TMC(E7)
24292434
#define E7_CURRENT 800
2430-
#define E7_MICROSTEPS 16
2435+
#define E7_MICROSTEPS E0_MICROSTEPS
24312436
#define E7_RSENSE 0.11
24322437
#define E7_CHAIN_POS -1
24332438
//#define E7_INTERPOLATE true
@@ -2702,7 +2707,7 @@
27022707
#endif
27032708

27042709
#if AXIS_IS_L64XX(X2)
2705-
#define X2_MICROSTEPS 128
2710+
#define X2_MICROSTEPS X_MICROSTEPS
27062711
#define X2_OVERCURRENT 2000
27072712
#define X2_STALLCURRENT 1500
27082713
#define X2_MAX_VOLTAGE 127
@@ -2720,7 +2725,7 @@
27202725
#endif
27212726

27222727
#if AXIS_IS_L64XX(Y2)
2723-
#define Y2_MICROSTEPS 128
2728+
#define Y2_MICROSTEPS Y_MICROSTEPS
27242729
#define Y2_OVERCURRENT 2000
27252730
#define Y2_STALLCURRENT 1500
27262731
#define Y2_MAX_VOLTAGE 127
@@ -2738,7 +2743,7 @@
27382743
#endif
27392744

27402745
#if AXIS_IS_L64XX(Z2)
2741-
#define Z2_MICROSTEPS 128
2746+
#define Z2_MICROSTEPS Z_MICROSTEPS
27422747
#define Z2_OVERCURRENT 2000
27432748
#define Z2_STALLCURRENT 1500
27442749
#define Z2_MAX_VOLTAGE 127
@@ -2747,7 +2752,7 @@
27472752
#endif
27482753

27492754
#if AXIS_IS_L64XX(Z3)
2750-
#define Z3_MICROSTEPS 128
2755+
#define Z3_MICROSTEPS Z_MICROSTEPS
27512756
#define Z3_OVERCURRENT 2000
27522757
#define Z3_STALLCURRENT 1500
27532758
#define Z3_MAX_VOLTAGE 127
@@ -2756,7 +2761,7 @@
27562761
#endif
27572762

27582763
#if AXIS_IS_L64XX(Z4)
2759-
#define Z4_MICROSTEPS 128
2764+
#define Z4_MICROSTEPS Z_MICROSTEPS
27602765
#define Z4_OVERCURRENT 2000
27612766
#define Z4_STALLCURRENT 1500
27622767
#define Z4_MAX_VOLTAGE 127
@@ -2774,7 +2779,7 @@
27742779
#endif
27752780

27762781
#if AXIS_IS_L64XX(E1)
2777-
#define E1_MICROSTEPS 128
2782+
#define E1_MICROSTEPS E0_MICROSTEPS
27782783
#define E1_OVERCURRENT 2000
27792784
#define E1_STALLCURRENT 1500
27802785
#define E1_MAX_VOLTAGE 127
@@ -2783,7 +2788,7 @@
27832788
#endif
27842789

27852790
#if AXIS_IS_L64XX(E2)
2786-
#define E2_MICROSTEPS 128
2791+
#define E2_MICROSTEPS E0_MICROSTEPS
27872792
#define E2_OVERCURRENT 2000
27882793
#define E2_STALLCURRENT 1500
27892794
#define E2_MAX_VOLTAGE 127
@@ -2792,7 +2797,7 @@
27922797
#endif
27932798

27942799
#if AXIS_IS_L64XX(E3)
2795-
#define E3_MICROSTEPS 128
2800+
#define E3_MICROSTEPS E0_MICROSTEPS
27962801
#define E3_OVERCURRENT 2000
27972802
#define E3_STALLCURRENT 1500
27982803
#define E3_MAX_VOLTAGE 127
@@ -2801,7 +2806,7 @@
28012806
#endif
28022807

28032808
#if AXIS_IS_L64XX(E4)
2804-
#define E4_MICROSTEPS 128
2809+
#define E4_MICROSTEPS E0_MICROSTEPS
28052810
#define E4_OVERCURRENT 2000
28062811
#define E4_STALLCURRENT 1500
28072812
#define E4_MAX_VOLTAGE 127
@@ -2810,7 +2815,7 @@
28102815
#endif
28112816

28122817
#if AXIS_IS_L64XX(E5)
2813-
#define E5_MICROSTEPS 128
2818+
#define E5_MICROSTEPS E0_MICROSTEPS
28142819
#define E5_OVERCURRENT 2000
28152820
#define E5_STALLCURRENT 1500
28162821
#define E5_MAX_VOLTAGE 127
@@ -2819,7 +2824,7 @@
28192824
#endif
28202825

28212826
#if AXIS_IS_L64XX(E6)
2822-
#define E6_MICROSTEPS 128
2827+
#define E6_MICROSTEPS E0_MICROSTEPS
28232828
#define E6_OVERCURRENT 2000
28242829
#define E6_STALLCURRENT 1500
28252830
#define E6_MAX_VOLTAGE 127
@@ -2828,7 +2833,7 @@
28282833
#endif
28292834

28302835
#if AXIS_IS_L64XX(E7)
2831-
#define E7_MICROSTEPS 128
2836+
#define E7_MICROSTEPS E0_MICROSTEPS
28322837
#define E7_OVERCURRENT 2000
28332838
#define E7_STALLCURRENT 1500
28342839
#define E7_MAX_VOLTAGE 127
@@ -3297,7 +3302,39 @@
32973302
#endif
32983303

32993304
/**
3300-
* User-defined menu items that execute custom GCode
3305+
* User-defined buttons to run custom G-code.
3306+
* Up to 25 may be defined.
3307+
*/
3308+
//#define CUSTOM_USER_BUTTONS
3309+
#if ENABLED(CUSTOM_USER_BUTTONS)
3310+
//#define BUTTON1_PIN -1
3311+
#if PIN_EXISTS(BUTTON1_PIN)
3312+
#define BUTTON1_HIT_STATE LOW // State of the triggered button. NC=LOW. NO=HIGH.
3313+
#define BUTTON1_WHEN_PRINTING false // Button allowed to trigger during printing?
3314+
#define BUTTON1_GCODE "G28"
3315+
#define BUTTON1_DESC "Homing" // Optional string to set the LCD status
3316+
#endif
3317+
3318+
//#define BUTTON2_PIN -1
3319+
#if PIN_EXISTS(BUTTON2_PIN)
3320+
#define BUTTON2_HIT_STATE LOW
3321+
#define BUTTON2_WHEN_PRINTING false
3322+
#define BUTTON2_GCODE "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND)
3323+
#define BUTTON2_DESC "Preheat for " PREHEAT_1_LABEL
3324+
#endif
3325+
3326+
//#define BUTTON3_PIN -1
3327+
#if PIN_EXISTS(BUTTON3_PIN)
3328+
#define BUTTON3_HIT_STATE LOW
3329+
#define BUTTON3_WHEN_PRINTING false
3330+
#define BUTTON3_GCODE "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND)
3331+
#define BUTTON3_DESC "Preheat for " PREHEAT_2_LABEL
3332+
#endif
3333+
#endif
3334+
3335+
/**
3336+
* User-defined menu items to run custom G-code.
3337+
* Up to 25 may be defined, but the actual number is LCD-dependent.
33013338
*/
33023339
//#define CUSTOM_USER_MENUS
33033340
#if ENABLED(CUSTOM_USER_MENUS)

0 commit comments

Comments
 (0)