|
1221 | 1221 | #if ENABLED(POWER_LOSS_RECOVERY)
|
1222 | 1222 | #define PLR_ENABLED_DEFAULT true // Power Loss Recovery enabled by default. (Set with 'M413 Sn' & M500)
|
1223 | 1223 | //#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! |
1225 | 1224 | //#define POWER_LOSS_ZRAISE 2 // (mm) Z axis raise on resume (on power loss with UPS)
|
1226 | 1225 | //#define POWER_LOSS_PIN 44 // Pin to detect power loss. Set to -1 to disable default pin on boards without module.
|
1227 | 1226 | //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
|
|
1233 | 1232 | // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card,
|
1234 | 1233 | // especially with "vase mode" printing. Set too high and vases cannot be continued.
|
1235 | 1234 | #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 |
1236 | 1241 | #endif
|
1237 | 1242 |
|
1238 | 1243 | /**
|
|
2180 | 2185 | #if AXIS_DRIVER_TYPE_X2(TMC26X)
|
2181 | 2186 | #define X2_MAX_CURRENT 1000
|
2182 | 2187 | #define X2_SENSE_RESISTOR 91
|
2183 |
| - #define X2_MICROSTEPS 16 |
| 2188 | + #define X2_MICROSTEPS X_MICROSTEPS |
2184 | 2189 | #endif
|
2185 | 2190 |
|
2186 | 2191 | #if AXIS_DRIVER_TYPE_Y(TMC26X)
|
|
2192 | 2197 | #if AXIS_DRIVER_TYPE_Y2(TMC26X)
|
2193 | 2198 | #define Y2_MAX_CURRENT 1000
|
2194 | 2199 | #define Y2_SENSE_RESISTOR 91
|
2195 |
| - #define Y2_MICROSTEPS 16 |
| 2200 | + #define Y2_MICROSTEPS Y_MICROSTEPS |
2196 | 2201 | #endif
|
2197 | 2202 |
|
2198 | 2203 | #if AXIS_DRIVER_TYPE_Z(TMC26X)
|
|
2204 | 2209 | #if AXIS_DRIVER_TYPE_Z2(TMC26X)
|
2205 | 2210 | #define Z2_MAX_CURRENT 1000
|
2206 | 2211 | #define Z2_SENSE_RESISTOR 91
|
2207 |
| - #define Z2_MICROSTEPS 16 |
| 2212 | + #define Z2_MICROSTEPS Z_MICROSTEPS |
2208 | 2213 | #endif
|
2209 | 2214 |
|
2210 | 2215 | #if AXIS_DRIVER_TYPE_Z3(TMC26X)
|
2211 | 2216 | #define Z3_MAX_CURRENT 1000
|
2212 | 2217 | #define Z3_SENSE_RESISTOR 91
|
2213 |
| - #define Z3_MICROSTEPS 16 |
| 2218 | + #define Z3_MICROSTEPS Z_MICROSTEPS |
2214 | 2219 | #endif
|
2215 | 2220 |
|
2216 | 2221 | #if AXIS_DRIVER_TYPE_Z4(TMC26X)
|
2217 | 2222 | #define Z4_MAX_CURRENT 1000
|
2218 | 2223 | #define Z4_SENSE_RESISTOR 91
|
2219 |
| - #define Z4_MICROSTEPS 16 |
| 2224 | + #define Z4_MICROSTEPS Z_MICROSTEPS |
2220 | 2225 | #endif
|
2221 | 2226 |
|
2222 | 2227 | #if AXIS_DRIVER_TYPE_E0(TMC26X)
|
|
2228 | 2233 | #if AXIS_DRIVER_TYPE_E1(TMC26X)
|
2229 | 2234 | #define E1_MAX_CURRENT 1000
|
2230 | 2235 | #define E1_SENSE_RESISTOR 91
|
2231 |
| - #define E1_MICROSTEPS 16 |
| 2236 | + #define E1_MICROSTEPS E0_MICROSTEPS |
2232 | 2237 | #endif
|
2233 | 2238 |
|
2234 | 2239 | #if AXIS_DRIVER_TYPE_E2(TMC26X)
|
2235 | 2240 | #define E2_MAX_CURRENT 1000
|
2236 | 2241 | #define E2_SENSE_RESISTOR 91
|
2237 |
| - #define E2_MICROSTEPS 16 |
| 2242 | + #define E2_MICROSTEPS E0_MICROSTEPS |
2238 | 2243 | #endif
|
2239 | 2244 |
|
2240 | 2245 | #if AXIS_DRIVER_TYPE_E3(TMC26X)
|
2241 | 2246 | #define E3_MAX_CURRENT 1000
|
2242 | 2247 | #define E3_SENSE_RESISTOR 91
|
2243 |
| - #define E3_MICROSTEPS 16 |
| 2248 | + #define E3_MICROSTEPS E0_MICROSTEPS |
2244 | 2249 | #endif
|
2245 | 2250 |
|
2246 | 2251 | #if AXIS_DRIVER_TYPE_E4(TMC26X)
|
2247 | 2252 | #define E4_MAX_CURRENT 1000
|
2248 | 2253 | #define E4_SENSE_RESISTOR 91
|
2249 |
| - #define E4_MICROSTEPS 16 |
| 2254 | + #define E4_MICROSTEPS E0_MICROSTEPS |
2250 | 2255 | #endif
|
2251 | 2256 |
|
2252 | 2257 | #if AXIS_DRIVER_TYPE_E5(TMC26X)
|
2253 | 2258 | #define E5_MAX_CURRENT 1000
|
2254 | 2259 | #define E5_SENSE_RESISTOR 91
|
2255 |
| - #define E5_MICROSTEPS 16 |
| 2260 | + #define E5_MICROSTEPS E0_MICROSTEPS |
2256 | 2261 | #endif
|
2257 | 2262 |
|
2258 | 2263 | #if AXIS_DRIVER_TYPE_E6(TMC26X)
|
2259 | 2264 | #define E6_MAX_CURRENT 1000
|
2260 | 2265 | #define E6_SENSE_RESISTOR 91
|
2261 |
| - #define E6_MICROSTEPS 16 |
| 2266 | + #define E6_MICROSTEPS E0_MICROSTEPS |
2262 | 2267 | #endif
|
2263 | 2268 |
|
2264 | 2269 | #if AXIS_DRIVER_TYPE_E7(TMC26X)
|
2265 | 2270 | #define E7_MAX_CURRENT 1000
|
2266 | 2271 | #define E7_SENSE_RESISTOR 91
|
2267 |
| - #define E7_MICROSTEPS 16 |
| 2272 | + #define E7_MICROSTEPS E0_MICROSTEPS |
2268 | 2273 | #endif
|
2269 | 2274 |
|
2270 | 2275 | #endif // TMC26X
|
|
2309 | 2314 | #if AXIS_IS_TMC(X2)
|
2310 | 2315 | #define X2_CURRENT 800
|
2311 | 2316 | #define X2_CURRENT_HOME X2_CURRENT
|
2312 |
| - #define X2_MICROSTEPS 16 |
| 2317 | + #define X2_MICROSTEPS X_MICROSTEPS |
2313 | 2318 | #define X2_RSENSE 0.11
|
2314 | 2319 | #define X2_CHAIN_POS -1
|
2315 | 2320 | //#define X2_INTERPOLATE true
|
|
2327 | 2332 | #if AXIS_IS_TMC(Y2)
|
2328 | 2333 | #define Y2_CURRENT 800
|
2329 | 2334 | #define Y2_CURRENT_HOME Y2_CURRENT
|
2330 |
| - #define Y2_MICROSTEPS 16 |
| 2335 | + #define Y2_MICROSTEPS Y_MICROSTEPS |
2331 | 2336 | #define Y2_RSENSE 0.11
|
2332 | 2337 | #define Y2_CHAIN_POS -1
|
2333 | 2338 | //#define Y2_INTERPOLATE true
|
|
2345 | 2350 | #if AXIS_IS_TMC(Z2)
|
2346 | 2351 | #define Z2_CURRENT 800
|
2347 | 2352 | #define Z2_CURRENT_HOME Z2_CURRENT
|
2348 |
| - #define Z2_MICROSTEPS 16 |
| 2353 | + #define Z2_MICROSTEPS Z_MICROSTEPS |
2349 | 2354 | #define Z2_RSENSE 0.11
|
2350 | 2355 | #define Z2_CHAIN_POS -1
|
2351 | 2356 | //#define Z2_INTERPOLATE true
|
|
2354 | 2359 | #if AXIS_IS_TMC(Z3)
|
2355 | 2360 | #define Z3_CURRENT 800
|
2356 | 2361 | #define Z3_CURRENT_HOME Z3_CURRENT
|
2357 |
| - #define Z3_MICROSTEPS 16 |
| 2362 | + #define Z3_MICROSTEPS Z_MICROSTEPS |
2358 | 2363 | #define Z3_RSENSE 0.11
|
2359 | 2364 | #define Z3_CHAIN_POS -1
|
2360 | 2365 | //#define Z3_INTERPOLATE true
|
|
2363 | 2368 | #if AXIS_IS_TMC(Z4)
|
2364 | 2369 | #define Z4_CURRENT 800
|
2365 | 2370 | #define Z4_CURRENT_HOME Z4_CURRENT
|
2366 |
| - #define Z4_MICROSTEPS 16 |
| 2371 | + #define Z4_MICROSTEPS Z_MICROSTEPS |
2367 | 2372 | #define Z4_RSENSE 0.11
|
2368 | 2373 | #define Z4_CHAIN_POS -1
|
2369 | 2374 | //#define Z4_INTERPOLATE true
|
|
2379 | 2384 |
|
2380 | 2385 | #if AXIS_IS_TMC(E1)
|
2381 | 2386 | #define E1_CURRENT 800
|
2382 |
| - #define E1_MICROSTEPS 16 |
| 2387 | + #define E1_MICROSTEPS E0_MICROSTEPS |
2383 | 2388 | #define E1_RSENSE 0.11
|
2384 | 2389 | #define E1_CHAIN_POS -1
|
2385 | 2390 | //#define E1_INTERPOLATE true
|
2386 | 2391 | #endif
|
2387 | 2392 |
|
2388 | 2393 | #if AXIS_IS_TMC(E2)
|
2389 | 2394 | #define E2_CURRENT 800
|
2390 |
| - #define E2_MICROSTEPS 16 |
| 2395 | + #define E2_MICROSTEPS E0_MICROSTEPS |
2391 | 2396 | #define E2_RSENSE 0.11
|
2392 | 2397 | #define E2_CHAIN_POS -1
|
2393 | 2398 | //#define E2_INTERPOLATE true
|
2394 | 2399 | #endif
|
2395 | 2400 |
|
2396 | 2401 | #if AXIS_IS_TMC(E3)
|
2397 | 2402 | #define E3_CURRENT 800
|
2398 |
| - #define E3_MICROSTEPS 16 |
| 2403 | + #define E3_MICROSTEPS E0_MICROSTEPS |
2399 | 2404 | #define E3_RSENSE 0.11
|
2400 | 2405 | #define E3_CHAIN_POS -1
|
2401 | 2406 | //#define E3_INTERPOLATE true
|
2402 | 2407 | #endif
|
2403 | 2408 |
|
2404 | 2409 | #if AXIS_IS_TMC(E4)
|
2405 | 2410 | #define E4_CURRENT 800
|
2406 |
| - #define E4_MICROSTEPS 16 |
| 2411 | + #define E4_MICROSTEPS E0_MICROSTEPS |
2407 | 2412 | #define E4_RSENSE 0.11
|
2408 | 2413 | #define E4_CHAIN_POS -1
|
2409 | 2414 | //#define E4_INTERPOLATE true
|
2410 | 2415 | #endif
|
2411 | 2416 |
|
2412 | 2417 | #if AXIS_IS_TMC(E5)
|
2413 | 2418 | #define E5_CURRENT 800
|
2414 |
| - #define E5_MICROSTEPS 16 |
| 2419 | + #define E5_MICROSTEPS E0_MICROSTEPS |
2415 | 2420 | #define E5_RSENSE 0.11
|
2416 | 2421 | #define E5_CHAIN_POS -1
|
2417 | 2422 | //#define E5_INTERPOLATE true
|
2418 | 2423 | #endif
|
2419 | 2424 |
|
2420 | 2425 | #if AXIS_IS_TMC(E6)
|
2421 | 2426 | #define E6_CURRENT 800
|
2422 |
| - #define E6_MICROSTEPS 16 |
| 2427 | + #define E6_MICROSTEPS E0_MICROSTEPS |
2423 | 2428 | #define E6_RSENSE 0.11
|
2424 | 2429 | #define E6_CHAIN_POS -1
|
2425 | 2430 | //#define E6_INTERPOLATE true
|
2426 | 2431 | #endif
|
2427 | 2432 |
|
2428 | 2433 | #if AXIS_IS_TMC(E7)
|
2429 | 2434 | #define E7_CURRENT 800
|
2430 |
| - #define E7_MICROSTEPS 16 |
| 2435 | + #define E7_MICROSTEPS E0_MICROSTEPS |
2431 | 2436 | #define E7_RSENSE 0.11
|
2432 | 2437 | #define E7_CHAIN_POS -1
|
2433 | 2438 | //#define E7_INTERPOLATE true
|
|
2702 | 2707 | #endif
|
2703 | 2708 |
|
2704 | 2709 | #if AXIS_IS_L64XX(X2)
|
2705 |
| - #define X2_MICROSTEPS 128 |
| 2710 | + #define X2_MICROSTEPS X_MICROSTEPS |
2706 | 2711 | #define X2_OVERCURRENT 2000
|
2707 | 2712 | #define X2_STALLCURRENT 1500
|
2708 | 2713 | #define X2_MAX_VOLTAGE 127
|
|
2720 | 2725 | #endif
|
2721 | 2726 |
|
2722 | 2727 | #if AXIS_IS_L64XX(Y2)
|
2723 |
| - #define Y2_MICROSTEPS 128 |
| 2728 | + #define Y2_MICROSTEPS Y_MICROSTEPS |
2724 | 2729 | #define Y2_OVERCURRENT 2000
|
2725 | 2730 | #define Y2_STALLCURRENT 1500
|
2726 | 2731 | #define Y2_MAX_VOLTAGE 127
|
|
2738 | 2743 | #endif
|
2739 | 2744 |
|
2740 | 2745 | #if AXIS_IS_L64XX(Z2)
|
2741 |
| - #define Z2_MICROSTEPS 128 |
| 2746 | + #define Z2_MICROSTEPS Z_MICROSTEPS |
2742 | 2747 | #define Z2_OVERCURRENT 2000
|
2743 | 2748 | #define Z2_STALLCURRENT 1500
|
2744 | 2749 | #define Z2_MAX_VOLTAGE 127
|
|
2747 | 2752 | #endif
|
2748 | 2753 |
|
2749 | 2754 | #if AXIS_IS_L64XX(Z3)
|
2750 |
| - #define Z3_MICROSTEPS 128 |
| 2755 | + #define Z3_MICROSTEPS Z_MICROSTEPS |
2751 | 2756 | #define Z3_OVERCURRENT 2000
|
2752 | 2757 | #define Z3_STALLCURRENT 1500
|
2753 | 2758 | #define Z3_MAX_VOLTAGE 127
|
|
2756 | 2761 | #endif
|
2757 | 2762 |
|
2758 | 2763 | #if AXIS_IS_L64XX(Z4)
|
2759 |
| - #define Z4_MICROSTEPS 128 |
| 2764 | + #define Z4_MICROSTEPS Z_MICROSTEPS |
2760 | 2765 | #define Z4_OVERCURRENT 2000
|
2761 | 2766 | #define Z4_STALLCURRENT 1500
|
2762 | 2767 | #define Z4_MAX_VOLTAGE 127
|
|
2774 | 2779 | #endif
|
2775 | 2780 |
|
2776 | 2781 | #if AXIS_IS_L64XX(E1)
|
2777 |
| - #define E1_MICROSTEPS 128 |
| 2782 | + #define E1_MICROSTEPS E0_MICROSTEPS |
2778 | 2783 | #define E1_OVERCURRENT 2000
|
2779 | 2784 | #define E1_STALLCURRENT 1500
|
2780 | 2785 | #define E1_MAX_VOLTAGE 127
|
|
2783 | 2788 | #endif
|
2784 | 2789 |
|
2785 | 2790 | #if AXIS_IS_L64XX(E2)
|
2786 |
| - #define E2_MICROSTEPS 128 |
| 2791 | + #define E2_MICROSTEPS E0_MICROSTEPS |
2787 | 2792 | #define E2_OVERCURRENT 2000
|
2788 | 2793 | #define E2_STALLCURRENT 1500
|
2789 | 2794 | #define E2_MAX_VOLTAGE 127
|
|
2792 | 2797 | #endif
|
2793 | 2798 |
|
2794 | 2799 | #if AXIS_IS_L64XX(E3)
|
2795 |
| - #define E3_MICROSTEPS 128 |
| 2800 | + #define E3_MICROSTEPS E0_MICROSTEPS |
2796 | 2801 | #define E3_OVERCURRENT 2000
|
2797 | 2802 | #define E3_STALLCURRENT 1500
|
2798 | 2803 | #define E3_MAX_VOLTAGE 127
|
|
2801 | 2806 | #endif
|
2802 | 2807 |
|
2803 | 2808 | #if AXIS_IS_L64XX(E4)
|
2804 |
| - #define E4_MICROSTEPS 128 |
| 2809 | + #define E4_MICROSTEPS E0_MICROSTEPS |
2805 | 2810 | #define E4_OVERCURRENT 2000
|
2806 | 2811 | #define E4_STALLCURRENT 1500
|
2807 | 2812 | #define E4_MAX_VOLTAGE 127
|
|
2810 | 2815 | #endif
|
2811 | 2816 |
|
2812 | 2817 | #if AXIS_IS_L64XX(E5)
|
2813 |
| - #define E5_MICROSTEPS 128 |
| 2818 | + #define E5_MICROSTEPS E0_MICROSTEPS |
2814 | 2819 | #define E5_OVERCURRENT 2000
|
2815 | 2820 | #define E5_STALLCURRENT 1500
|
2816 | 2821 | #define E5_MAX_VOLTAGE 127
|
|
2819 | 2824 | #endif
|
2820 | 2825 |
|
2821 | 2826 | #if AXIS_IS_L64XX(E6)
|
2822 |
| - #define E6_MICROSTEPS 128 |
| 2827 | + #define E6_MICROSTEPS E0_MICROSTEPS |
2823 | 2828 | #define E6_OVERCURRENT 2000
|
2824 | 2829 | #define E6_STALLCURRENT 1500
|
2825 | 2830 | #define E6_MAX_VOLTAGE 127
|
|
2828 | 2833 | #endif
|
2829 | 2834 |
|
2830 | 2835 | #if AXIS_IS_L64XX(E7)
|
2831 |
| - #define E7_MICROSTEPS 128 |
| 2836 | + #define E7_MICROSTEPS E0_MICROSTEPS |
2832 | 2837 | #define E7_OVERCURRENT 2000
|
2833 | 2838 | #define E7_STALLCURRENT 1500
|
2834 | 2839 | #define E7_MAX_VOLTAGE 127
|
|
3297 | 3302 | #endif
|
3298 | 3303 |
|
3299 | 3304 | /**
|
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. |
3301 | 3338 | */
|
3302 | 3339 | //#define CUSTOM_USER_MENUS
|
3303 | 3340 | #if ENABLED(CUSTOM_USER_MENUS)
|
|
0 commit comments