|
266 | 266 | */
|
267 | 267 | //#define MAGNETIC_PARKING_EXTRUDER
|
268 | 268 |
|
269 |
| -#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) |
| 269 | +#if ANY(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) |
270 | 270 |
|
271 | 271 | #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
|
272 | 272 | #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
|
|
419 | 419 | #define POWER_TIMEOUT 30 // (s) Turn off power if the machine is idle for this duration
|
420 | 420 | //#define POWER_OFF_DELAY 60 // (s) Delay of poweroff after M81 command. Useful to let fans run for extra time.
|
421 | 421 | #endif
|
422 |
| - #if EITHER(AUTO_POWER_CONTROL, POWER_OFF_WAIT_FOR_COOLDOWN) |
| 422 | + #if ANY(AUTO_POWER_CONTROL, POWER_OFF_WAIT_FOR_COOLDOWN) |
423 | 423 | //#define AUTO_POWER_E_TEMP 50 // (°C) PSU on if any extruder is over this temperature
|
424 | 424 | //#define AUTO_POWER_CHAMBER_TEMP 30 // (°C) PSU on if the chamber is over this temperature
|
425 | 425 | //#define AUTO_POWER_COOLER_TEMP 26 // (°C) PSU on if the cooler is over this temperature
|
|
547 | 547 | #define TEMP_SENSOR_5 0
|
548 | 548 | #define TEMP_SENSOR_6 0
|
549 | 549 | #define TEMP_SENSOR_7 0
|
550 |
| -#define TEMP_SENSOR_BED 0 |
| 550 | +#define TEMP_SENSOR_BED 1 |
551 | 551 | #define TEMP_SENSOR_PROBE 0
|
552 | 552 | #define TEMP_SENSOR_CHAMBER 0
|
553 | 553 | #define TEMP_SENSOR_COOLER 0
|
|
650 | 650 |
|
651 | 651 | // @section hotend temp
|
652 | 652 |
|
653 |
| -// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model. |
654 |
| -// temperature control. Disable both for bang-bang heating. |
655 |
| -#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning |
656 |
| -//#define MPCTEMP // ** EXPERIMENTAL ** |
| 653 | +/** |
| 654 | + * Temperature Control |
| 655 | + * |
| 656 | + * (NONE) : Bang-bang heating |
| 657 | + * PIDTEMP : PID temperature control (~4.1K) |
| 658 | + * MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune) |
| 659 | + */ |
| 660 | +#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning |
| 661 | +//#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html |
657 | 662 |
|
658 |
| -#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current |
659 |
| -#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current |
660 |
| -#define PID_K1 0.95 // Smoothing factor within any PID loop |
| 663 | +#define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current |
| 664 | +#define PID_K1 0.95 // Smoothing factor within any PID loop |
661 | 665 |
|
662 | 666 | #if ENABLED(PIDTEMP)
|
663 | 667 | //#define PID_DEBUG // Print PID debug data to the serial port. Use 'M303 D' to toggle activation.
|
|
675 | 679 | #define DEFAULT_Ki 1.08
|
676 | 680 | #define DEFAULT_Kd 114.00
|
677 | 681 | #endif
|
| 682 | +#else |
| 683 | + #define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current |
678 | 684 | #endif
|
679 | 685 |
|
680 | 686 | /**
|
|
686 | 692 | * @section mpctemp
|
687 | 693 | */
|
688 | 694 | #if ENABLED(MPCTEMP)
|
689 |
| - //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) |
690 |
| - //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) |
| 695 | + //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash) |
| 696 | + //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash) |
691 | 697 | //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
|
692 | 698 |
|
693 |
| - #define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active. |
| 699 | + #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active. |
694 | 700 | #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
|
695 | 701 |
|
696 | 702 | #define MPC_INCLUDE_FAN // Model the fan speed?
|
|
725 | 731 | //====================== PID > Bed Temperature Control ======================
|
726 | 732 | //===========================================================================
|
727 | 733 |
|
| 734 | +// @section bed temp |
| 735 | + |
| 736 | +/** |
| 737 | + * Max Bed Power |
| 738 | + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). |
| 739 | + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider |
| 740 | + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) |
| 741 | + */ |
| 742 | +#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current |
| 743 | + |
728 | 744 | /**
|
729 | 745 | * PID Bed Heating
|
730 | 746 | *
|
731 |
| - * If this option is enabled set PID constants below. |
732 |
| - * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. |
733 |
| - * |
734 | 747 | * The PID frequency will be the same as the extruder PWM.
|
735 | 748 | * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
|
736 | 749 | * which is fine for driving a square wave into a resistive load and does not significantly
|
737 | 750 | * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
|
738 | 751 | * heater. If your configuration is significantly different than this and you don't understand
|
739 | 752 | * the issues involved, don't use bed PID until someone else verifies that your hardware works.
|
740 |
| - * @section bed temp |
| 753 | + * |
| 754 | + * With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis. |
741 | 755 | */
|
742 | 756 | //#define PIDTEMPBED
|
743 | 757 |
|
744 |
| -//#define BED_LIMIT_SWITCHING |
745 |
| - |
746 |
| -/** |
747 |
| - * Max Bed Power |
748 |
| - * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). |
749 |
| - * When set to any value below 255, enables a form of PWM to the bed that acts like a divider |
750 |
| - * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) |
751 |
| - */ |
752 |
| -#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current |
753 |
| - |
754 | 758 | #if ENABLED(PIDTEMPBED)
|
755 | 759 | //#define MIN_BED_POWER 0
|
756 | 760 | //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
|
|
762 | 766 | #define DEFAULT_bedKd 305.4
|
763 | 767 |
|
764 | 768 | // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
|
765 |
| -#endif // PIDTEMPBED |
| 769 | +#else |
| 770 | + //#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target |
| 771 | +#endif |
766 | 772 |
|
767 | 773 | //===========================================================================
|
768 | 774 | //==================== PID > Chamber Temperature Control ====================
|
|
915 | 921 | #define DELTA_CALIBRATION_DEFAULT_POINTS 4
|
916 | 922 | #endif
|
917 | 923 |
|
918 |
| - #if EITHER(DELTA_AUTO_CALIBRATION, DELTA_CALIBRATION_MENU) |
| 924 | + #if ANY(DELTA_AUTO_CALIBRATION, DELTA_CALIBRATION_MENU) |
919 | 925 | // Step size for paper-test probing
|
920 | 926 | #define PROBE_MANUALLY_STEP 0.05 // (mm)
|
921 | 927 | #endif
|
|
959 | 965 | */
|
960 | 966 | //#define MORGAN_SCARA
|
961 | 967 | //#define MP_SCARA
|
962 |
| -#if EITHER(MORGAN_SCARA, MP_SCARA) |
| 968 | +#if ANY(MORGAN_SCARA, MP_SCARA) |
963 | 969 | // If movement is choppy try lowering this value
|
964 | 970 | #define DEFAULT_SEGMENTS_PER_SECOND 200
|
965 | 971 |
|
|
1803 | 1809 | #define MAX_SOFTWARE_ENDSTOP_W
|
1804 | 1810 | #endif
|
1805 | 1811 |
|
1806 |
| -#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) |
| 1812 | +#if ANY(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) |
1807 | 1813 | //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
|
1808 | 1814 | #endif
|
1809 | 1815 |
|
|
2040 | 2046 |
|
2041 | 2047 | #endif
|
2042 | 2048 |
|
2043 |
| -#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) |
| 2049 | +#if ANY(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) |
2044 | 2050 |
|
2045 | 2051 | // Set the number of grid points per dimension.
|
2046 | 2052 | #define GRID_MAX_POINTS_X 3
|
|
3334 | 3340 | //#define TOUCH_OFFSET_Y 257
|
3335 | 3341 | //#define TOUCH_ORIENTATION TOUCH_LANDSCAPE
|
3336 | 3342 |
|
3337 |
| - #if BOTH(TOUCH_SCREEN_CALIBRATION, EEPROM_SETTINGS) |
| 3343 | + #if ALL(TOUCH_SCREEN_CALIBRATION, EEPROM_SETTINGS) |
3338 | 3344 | #define TOUCH_CALIBRATION_AUTO_SAVE // Auto save successful calibration values to EEPROM
|
3339 | 3345 | #endif
|
3340 | 3346 |
|
|
3431 | 3437 | //#define RGB_LED
|
3432 | 3438 | //#define RGBW_LED
|
3433 | 3439 |
|
3434 |
| -#if EITHER(RGB_LED, RGBW_LED) |
| 3440 | +#if ANY(RGB_LED, RGBW_LED) |
3435 | 3441 | //#define RGB_LED_R_PIN 34
|
3436 | 3442 | //#define RGB_LED_G_PIN 43
|
3437 | 3443 | //#define RGB_LED_B_PIN 35
|
|
0 commit comments