Browse Source

🔧 Config INI, dump options (#24528)

Scott Lahteine 2 years ago
parent
commit
1bed10c380

+ 72 - 29
Marlin/Configuration.h

@@ -112,6 +112,7 @@
  * :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
  */
 #define BAUDRATE 250000
+
 //#define BAUD_RATE_GCODE     // Enable G-code M575 to set the baud rate
 
 /**
@@ -120,7 +121,7 @@
  * :[-2, -1, 0, 1, 2, 3, 4, 5, 6, 7]
  */
 //#define SERIAL_PORT_2 -1
-//#define BAUDRATE_2 250000   // Enable to override BAUDRATE
+//#define BAUDRATE_2 250000   // :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000] Enable to override BAUDRATE
 
 /**
  * Select a third serial port on the board to use for communication with the host.
@@ -128,7 +129,7 @@
  * :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
  */
 //#define SERIAL_PORT_3 1
-//#define BAUDRATE_3 250000   // Enable to override BAUDRATE
+//#define BAUDRATE_3 250000   // :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000] Enable to override BAUDRATE
 
 // Enable the Bluetooth serial interface on AT90USB devices
 //#define BLUETOOTH
@@ -387,7 +388,7 @@
 //#define HOTEND_OFFSET_Y { 0.0, 5.00 }  // (mm) relative Y-offset for each nozzle
 //#define HOTEND_OFFSET_Z { 0.0, 0.00 }  // (mm) relative Z-offset for each nozzle
 
-// @section machine
+// @section psu control
 
 /**
  * Power Supply Control
@@ -549,22 +550,32 @@
 #define DUMMY_THERMISTOR_999_VALUE 100
 
 // Resistor values when using MAX31865 sensors (-5) on TEMP_SENSOR_0 / 1
-//#define MAX31865_SENSOR_OHMS_0      100   // (Ω) Typically 100 or 1000 (PT100 or PT1000)
-//#define MAX31865_CALIBRATION_OHMS_0 430   // (Ω) Typically 430 for Adafruit PT100; 4300 for Adafruit PT1000
-//#define MAX31865_SENSOR_OHMS_1      100
-//#define MAX31865_CALIBRATION_OHMS_1 430
+#if TEMP_SENSOR_IS_MAX_TC(0)
+  #define MAX31865_SENSOR_OHMS_0      100   // (Ω) Typically 100 or 1000 (PT100 or PT1000)
+  #define MAX31865_CALIBRATION_OHMS_0 430   // (Ω) Typically 430 for Adafruit PT100; 4300 for Adafruit PT1000
+#endif
+#if TEMP_SENSOR_IS_MAX_TC(1)
+  #define MAX31865_SENSOR_OHMS_1      100
+  #define MAX31865_CALIBRATION_OHMS_1 430
+#endif
 
-#define TEMP_RESIDENCY_TIME         10  // (seconds) Time to wait for hotend to "settle" in M109
-#define TEMP_WINDOW                  1  // (°C) Temperature proximity for the "temperature reached" timer
-#define TEMP_HYSTERESIS              3  // (°C) Temperature proximity considered "close enough" to the target
+#if HAS_E_TEMP_SENSOR
+  #define TEMP_RESIDENCY_TIME         10  // (seconds) Time to wait for hotend to "settle" in M109
+  #define TEMP_WINDOW                  1  // (°C) Temperature proximity for the "temperature reached" timer
+  #define TEMP_HYSTERESIS              3  // (°C) Temperature proximity considered "close enough" to the target
+#endif
 
-#define TEMP_BED_RESIDENCY_TIME     10  // (seconds) Time to wait for bed to "settle" in M190
-#define TEMP_BED_WINDOW              1  // (°C) Temperature proximity for the "temperature reached" timer
-#define TEMP_BED_HYSTERESIS          3  // (°C) Temperature proximity considered "close enough" to the target
+#if TEMP_SENSOR_BED
+  #define TEMP_BED_RESIDENCY_TIME     10  // (seconds) Time to wait for bed to "settle" in M190
+  #define TEMP_BED_WINDOW              1  // (°C) Temperature proximity for the "temperature reached" timer
+  #define TEMP_BED_HYSTERESIS          3  // (°C) Temperature proximity considered "close enough" to the target
+#endif
 
-#define TEMP_CHAMBER_RESIDENCY_TIME 10  // (seconds) Time to wait for chamber to "settle" in M191
-#define TEMP_CHAMBER_WINDOW          1  // (°C) Temperature proximity for the "temperature reached" timer
-#define TEMP_CHAMBER_HYSTERESIS      3  // (°C) Temperature proximity considered "close enough" to the target
+#if TEMP_SENSOR_CHAMBER
+  #define TEMP_CHAMBER_RESIDENCY_TIME 10  // (seconds) Time to wait for chamber to "settle" in M191
+  #define TEMP_CHAMBER_WINDOW          1  // (°C) Temperature proximity for the "temperature reached" timer
+  #define TEMP_CHAMBER_HYSTERESIS      3  // (°C) Temperature proximity considered "close enough" to the target
+#endif
 
 /**
  * Redundant Temperature Sensor (TEMP_SENSOR_REDUNDANT)
@@ -623,6 +634,8 @@
 //============================= PID Settings ================================
 //===========================================================================
 
+// @section hotend temp
+
 // Enable PIDTEMP for PID control or MPCTEMP for Predictive Model.
 // temperature control. Disable both for bang-bang heating.
 #define PIDTEMP          // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
@@ -633,7 +646,8 @@
 #define PID_K1 0.95      // Smoothing factor within any PID loop
 
 #if ENABLED(PIDTEMP)
-  //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders)
+  //#define PID_DEBUG             // Print PID debug data to the serial port. Use 'M303 D' to toggle activation.
+  //#define PID_PARAMS_PER_HOTEND // Use separate PID parameters for each extruder (useful for mismatched extruders)
                                   // Set/get with G-code: M301 E[extruder number, 0-2]
 
   #if ENABLED(PID_PARAMS_PER_HOTEND)
@@ -655,6 +669,7 @@
  * Use a physical model of the hotend to control temperature. When configured correctly
  * this gives better responsiveness and stability than PID and it also removes the need
  * for PID_EXTRUSION_SCALING and PID_FAN_SCALING. Use M306 T to autotune the model.
+ * @section mpctemp
  */
 #if ENABLED(MPCTEMP)
   //#define MPC_EDIT_MENU                             // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash)
@@ -707,6 +722,7 @@
  * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
  * heater. If your configuration is significantly different than this and you don't understand
  * the issues involved, don't use bed PID until someone else verifies that your hardware works.
+ * @section bed temp
  */
 //#define PIDTEMPBED
 
@@ -722,7 +738,7 @@
 
 #if ENABLED(PIDTEMPBED)
   //#define MIN_BED_POWER 0
-  //#define PID_BED_DEBUG // Sends debug data to the serial port.
+  //#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
 
   // 120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
   // from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)
@@ -750,6 +766,7 @@
  * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 200W
  * heater. If your configuration is significantly different than this and you don't understand
  * the issues involved, don't use chamber PID until someone else verifies that your hardware works.
+ * @section chamber temp
  */
 //#define PIDTEMPCHAMBER
 //#define CHAMBER_LIMIT_SWITCHING
@@ -764,7 +781,7 @@
 
 #if ENABLED(PIDTEMPCHAMBER)
   #define MIN_CHAMBER_POWER 0
-  //#define PID_CHAMBER_DEBUG // Sends debug data to the serial port.
+  //#define PID_CHAMBER_DEBUG // Print Chamber PID debug data to the serial port.
 
   // Lasko "MyHeat Personal Heater" (200w) modified with a Fotek SSR-10DA to control only the heating element
   // and placed inside the small Creality printer enclosure tent.
@@ -778,7 +795,6 @@
 #endif // PIDTEMPCHAMBER
 
 #if ANY(PIDTEMP, PIDTEMPBED, PIDTEMPCHAMBER)
-  //#define PID_DEBUG             // Sends debug data to the serial port. Use 'M303 D' to toggle activation.
   //#define PID_OPENLOOP          // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
   //#define SLOW_PWM_HEATERS      // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
@@ -788,7 +804,7 @@
   //#define PID_AUTOTUNE_MENU     // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of flash)
 #endif
 
-// @section extruder
+// @section safety
 
 /**
  * Prevent extrusion if the temperature is below EXTRUDE_MINTEMP.
@@ -856,6 +872,8 @@
   #define POLAR_SEGMENTS_PER_SECOND 5
 #endif
 
+// @section delta
+
 // Enable for DELTA kinematics and configure below
 //#define DELTA
 #if ENABLED(DELTA)
@@ -915,6 +933,8 @@
   //#define DELTA_DIAGONAL_ROD_TRIM_TOWER { 0.0, 0.0, 0.0 }
 #endif
 
+// @section scara
+
 /**
  * MORGAN_SCARA was developed by QHARLEY in South Africa in 2012-2013.
  * Implemented and slightly reworked by JCERNY in June, 2014.
@@ -958,6 +978,8 @@
 
 #endif
 
+// @section tpara
+
 // Enable for TPARA kinematics and configure below
 //#define AXEL_TPARA
 #if ENABLED(AXEL_TPARA)
@@ -984,6 +1006,8 @@
   #define PSI_HOMING_OFFSET    0
 #endif
 
+// @section machine
+
 // Articulated robot (arm). Joints are directly mapped to axes with no kinematics.
 //#define ARTICULATED_ROBOT_ARM
 
@@ -995,7 +1019,7 @@
 //============================== Endstop Settings ===========================
 //===========================================================================
 
-// @section homing
+// @section endstops
 
 // Specify here all the endstop connectors that are connected to any endstop or probe.
 // Almost all printers will be using one per axis. Probes will use one or more of the
@@ -1659,7 +1683,7 @@
 //#define V_HOME_DIR -1
 //#define W_HOME_DIR -1
 
-// @section machine
+// @section geometry
 
 // The size of the printable area
 #define X_BED_SIZE 200
@@ -2119,7 +2143,7 @@
 //============================= Additional Features ===========================
 //=============================================================================
 
-// @section extras
+// @section eeprom
 
 /**
  * EEPROM
@@ -2139,6 +2163,8 @@
   //#define EEPROM_INIT_NOW   // Init EEPROM on first boot after a new build.
 #endif
 
+// @section host
+
 //
 // Host Keepalive
 //
@@ -2149,6 +2175,8 @@
 #define DEFAULT_KEEPALIVE_INTERVAL 2  // Number of seconds between "busy" messages. Set with M113.
 #define BUSY_WHILE_HEATING            // Some hosts require "busy" messages even during heating
 
+// @section units
+
 //
 // G20/G21 Inch mode support
 //
@@ -2176,6 +2204,8 @@
 #define PREHEAT_2_TEMP_CHAMBER 35
 #define PREHEAT_2_FAN_SPEED     0 // Value from 0 to 255
 
+// @section motion
+
 /**
  * Nozzle Park
  *
@@ -2274,6 +2304,8 @@
 
 #endif
 
+// @section host
+
 /**
  * Print Job Timer
  *
@@ -2300,6 +2332,8 @@
  */
 #define PRINTJOB_TIMER_AUTOSTART
 
+// @section stats
+
 /**
  * Print Counter
  *
@@ -2317,6 +2351,8 @@
   #define PRINTCOUNTER_SAVE_INTERVAL 60 // (minutes) EEPROM save interval during print
 #endif
 
+// @section security
+
 /**
  * Password
  *
@@ -2352,7 +2388,7 @@
 //============================= LCD and SD support ============================
 //=============================================================================
 
-// @section lcd
+// @section interface
 
 /**
  * LCD LANGUAGE
@@ -2508,6 +2544,7 @@
 //======================== LCD / Controller Selection =========================
 //========================   (Character-based LCDs)   =========================
 //=============================================================================
+// @section lcd
 
 //
 // RepRapDiscount Smart Controller.
@@ -3142,7 +3179,7 @@
 //=============================== Extra Features ==============================
 //=============================================================================
 
-// @section extras
+// @section fans
 
 // Set number of user-controlled fans. Disable to use all board-defined fans.
 // :[1,2,3,4,5,6,7,8]
@@ -3166,14 +3203,18 @@
 // duty cycle is attained.
 //#define SOFT_PWM_DITHER
 
+// @section extras
+
+// Support for the BariCUDA Paste Extruder
+//#define BARICUDA
+
+// @section lights
+
 // Temperature status LEDs that display the hotend and bed temperature.
 // If all hotends, bed temperature, and target temperature are under 54C
 // then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
 //#define TEMP_STAT_LEDS
 
-// Support for the BariCUDA Paste Extruder
-//#define BARICUDA
-
 // Support for BlinkM/CyzRgb
 //#define BLINKM
 
@@ -3259,6 +3300,8 @@
   #define PRINTER_EVENT_LEDS
 #endif
 
+// @section servos
+
 /**
  * Number of servos
  *

+ 88 - 14
Marlin/Configuration_adv.h

@@ -32,6 +32,24 @@
  */
 #define CONFIGURATION_ADV_H_VERSION 02010100
 
+// @section develop
+
+/**
+ * Configuration Dump
+ *
+ * Dump the configuration as part of the build. (See signature.py)
+ * Output files are saved with the build (e.g., .pio/build/mega2560).
+ *
+ * See `build_all_examples --ini` as an example of config.ini archiving.
+ *
+ *  1 = marlin_config.json - Dictionary containing the configuration.
+ *      This file is also generated for CONFIGURATION_EMBEDDING.
+ *  2 = config.ini - File format for PlatformIO preprocessing.
+ *  3 = schema.json - The entire configuration schema. (13 = pattern groups)
+ *  4 = schema.yml - The entire configuration schema.
+ */
+//#define CONFIG_DUMP   // :[1:'JSON', 2:'config.ini', 3:'schema.json', 4:'schema.yml']
+
 //===========================================================================
 //============================= Thermal Settings ============================
 //===========================================================================
@@ -2545,6 +2563,8 @@
   #endif
 #endif // HAS_MULTI_EXTRUDER
 
+// @section advanced pause
+
 /**
  * Advanced Pause for Filament Change
  *  - Adds the G-code M600 Filament Change to initiate a filament change.
@@ -2603,13 +2623,12 @@
   //#define FILAMENT_UNLOAD_ALL_EXTRUDERS         // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
 #endif
 
-// @section tmc
-
 /**
  * TMC26X Stepper Driver options
  *
  * The TMC26XStepper library is required for this stepper driver.
  * https://github.com/trinamic/TMC26XStepper
+ * @section tmc/tmc26x
  */
 #if HAS_DRIVER(TMC26X)
 
@@ -2747,8 +2766,6 @@
 
 #endif // TMC26X
 
-// @section tmc_smart
-
 /**
  * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
  * connect your SPI pins to the hardware SPI interface on your board and define
@@ -2764,6 +2781,7 @@
  *
  * TMCStepper library is required to use TMC stepper drivers.
  * https://github.com/teemuatlut/TMCStepper
+ * @section tmc/config
  */
 #if HAS_TRINAMIC_CONFIG
 
@@ -2987,6 +3005,8 @@
     //#define E7_HOLD_MULTIPLIER 0.5
   #endif
 
+  // @section tmc/spi
+
   /**
    * Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here.
    * The default pins can be found in your board's pins file.
@@ -3024,6 +3044,8 @@
   //#define TMC_SW_MISO       -1
   //#define TMC_SW_SCK        -1
 
+  // @section tmc/serial
+
   /**
    * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses.
    * Set the address using jumpers on pins MS1 and MS2.
@@ -3059,6 +3081,8 @@
   //#define E6_SLAVE_ADDRESS 0
   //#define E7_SLAVE_ADDRESS 0
 
+  // @section tmc/smart
+
   /**
    * Software enable
    *
@@ -3067,6 +3091,8 @@
    */
   //#define SOFTWARE_DRIVER_ENABLE
 
+  // @section tmc/stealthchop
+
   /**
    * TMC2130, TMC2160, TMC2208, TMC2209, TMC5130 and TMC5160 only
    * Use Trinamic's ultra quiet stepping mode.
@@ -3121,6 +3147,8 @@
   //#define CHOPPER_TIMING_E6 CHOPPER_TIMING_E
   //#define CHOPPER_TIMING_E7 CHOPPER_TIMING_E
 
+  // @section tmc/status
+
   /**
    * Monitor Trinamic drivers
    * for error conditions like overtemperature and short to ground.
@@ -3140,6 +3168,8 @@
     #define STOP_ON_ERROR
   #endif
 
+  // @section tmc/hybrid
+
   /**
    * TMC2130, TMC2160, TMC2208, TMC2209, TMC5130 and TMC5160 only
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
@@ -3196,6 +3226,7 @@
    * homing and adds a guard period for endstop triggering.
    *
    * Comment *_STALL_SENSITIVITY to disable sensorless homing for that axis.
+   * @section tmc/stallguard
    */
   //#define SENSORLESS_HOMING // StallGuard capable drivers only
 
@@ -3219,6 +3250,8 @@
     //#define IMPROVE_HOMING_RELIABILITY
   #endif
 
+  // @section tmc/config
+
   /**
    * TMC Homing stepper phase.
    *
@@ -3258,7 +3291,6 @@
 
 #endif // HAS_TRINAMIC_CONFIG
 
-
 // @section i2cbus
 
 //
@@ -3300,7 +3332,7 @@
   #define I2C_SLAVE_ADDRESS  0  // Set a value from 8 to 127 to act as a slave
 #endif
 
-// @section extras
+// @section photo
 
 /**
  * Photo G-code
@@ -3343,6 +3375,8 @@
   #endif
 #endif
 
+// @section cnc
+
 /**
  * Spindle & Laser control
  *
@@ -3546,6 +3580,8 @@
   #define COOLANT_FLOOD_INVERT false  // Set "true" if the on/off function is reversed
 #endif
 
+// @section filament width
+
 /**
  * Filament Width Sensor
  *
@@ -3579,6 +3615,8 @@
   //#define FILAMENT_LCD_DISPLAY
 #endif
 
+// @section power
+
 /**
  * Power Monitor
  * Monitor voltage (V) and/or current (A), and -when possible- power (W)
@@ -3602,6 +3640,8 @@
   #define POWER_MONITOR_VOLTAGE_OFFSET  0         // Offset (in volts) applied to the calculated voltage
 #endif
 
+// @section safety
+
 /**
  * Stepper Driver Anti-SNAFU Protection
  *
@@ -3611,6 +3651,8 @@
  */
 //#define DISABLE_DRIVER_SAFE_POWER_PROTECT
 
+// @section cnc
+
 /**
  * CNC Coordinate Systems
  *
@@ -3619,6 +3661,8 @@
  */
 //#define CNC_COORDINATE_SYSTEMS
 
+// @section reporting
+
 /**
  * Auto-report fan speed with M123 S<seconds>
  * Requires fans with tachometer pins
@@ -3646,6 +3690,8 @@
   //#define M115_GEOMETRY_REPORT
 #endif
 
+// @section security
+
 /**
  * Expected Printer Check
  * Add the M16 G-code to compare a string to the MACHINE_NAME.
@@ -3653,6 +3699,8 @@
  */
 //#define EXPECTED_PRINTER_CHECK
 
+// @section volumetrics
+
 /**
  * Disable all Volumetric extrusion options
  */
@@ -3681,14 +3729,7 @@
   #endif
 #endif
 
-/**
- * Enable this option for a leaner build of Marlin that removes all
- * workspace offsets, simplifying coordinate transformations, leveling, etc.
- *
- *  - M206 and M428 are disabled.
- *  - G92 will revert to its behavior from Marlin 1.0.
- */
-//#define NO_WORKSPACE_OFFSETS
+// @section reporting
 
 // Extra options for the M114 "Current Position" report
 //#define M114_DETAIL         // Use 'M114` for details to check planner calculations
@@ -3697,6 +3738,8 @@
 
 //#define REPORT_FAN_CHANGE   // Report the new fan speed when changed by M106 (and others)
 
+// @section gcode
+
 /**
  * Spend 28 bytes of SRAM to optimize the G-code parser
  */
@@ -3714,6 +3757,15 @@
 
 //#define REPETIER_GCODE_M360     // Add commands originally from Repetier FW
 
+/**
+ * Enable this option for a leaner build of Marlin that removes all
+ * workspace offsets, simplifying coordinate transformations, leveling, etc.
+ *
+ *  - M206 and M428 are disabled.
+ *  - G92 will revert to its behavior from Marlin 1.0.
+ */
+//#define NO_WORKSPACE_OFFSETS
+
 /**
  * CNC G-code options
  * Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
@@ -3729,6 +3781,8 @@
   //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
 #endif
 
+// @section gcode
+
 /**
  * Startup commands
  *
@@ -3753,6 +3807,8 @@
  * Up to 25 may be defined, but the actual number is LCD-dependent.
  */
 
+// @section custom main menu
+
 // Custom Menu: Main Menu
 //#define CUSTOM_MENU_MAIN
 #if ENABLED(CUSTOM_MENU_MAIN)
@@ -3783,6 +3839,8 @@
   //#define MAIN_MENU_ITEM_5_CONFIRM
 #endif
 
+// @section custom config menu
+
 // Custom Menu: Configuration Menu
 //#define CUSTOM_MENU_CONFIG
 #if ENABLED(CUSTOM_MENU_CONFIG)
@@ -3813,6 +3871,8 @@
   //#define CONFIG_MENU_ITEM_5_CONFIRM
 #endif
 
+// @section custom buttons
+
 /**
  * User-defined buttons to run custom G-code.
  * Up to 25 may be defined.
@@ -3844,6 +3904,8 @@
   #endif
 #endif
 
+// @section host
+
 /**
  * Host Action Commands
  *
@@ -3869,6 +3931,8 @@
   //#define HOST_SHUTDOWN_MENU_ITEM       // Add a menu item that tells the host to shut down
 #endif
 
+// @section extras
+
 /**
  * Cancel Objects
  *
@@ -3890,6 +3954,7 @@
  * Alternative Supplier: https://reliabuild3d.com/
  *
  * Reliabuild encoders have been modified to improve reliability.
+ * @section i2c encoders
  */
 
 //#define I2C_POSITION_ENCODERS
@@ -3961,6 +4026,7 @@
 
 /**
  * Analog Joystick(s)
+ * @section joystick
  */
 //#define JOYSTICK
 #if ENABLED(JOYSTICK)
@@ -3985,6 +4051,7 @@
  * Modern replacement for the Prusa TMC_Z_CALIBRATION.
  * Adds capability to work with any adjustable current drivers.
  * Implemented as G34 because M915 is deprecated.
+ * @section calibrate
  */
 //#define MECHANICAL_GANTRY_CALIBRATION
 #if ENABLED(MECHANICAL_GANTRY_CALIBRATION)
@@ -4002,6 +4069,7 @@
 /**
  * Instant freeze / unfreeze functionality
  * Potentially useful for emergency stop that allows being resumed.
+ * @section interface
  */
 //#define FREEZE_FEATURE
 #if ENABLED(FREEZE_FEATURE)
@@ -4014,6 +4082,7 @@
  *
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
  * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
+ * @section debug matrix
  */
 //#define MAX7219_DEBUG
 #if ENABLED(MAX7219_DEBUG)
@@ -4052,6 +4121,7 @@
  * Support for Synchronized Z moves when used with NanoDLP. G0/G1 axis moves will
  * output a "Z_move_comp" string to enable synchronization with DLP projector exposure.
  * This feature allows you to use [[WaitForDoneMessage]] instead of M400 commands.
+ * @section nanodlp
  */
 //#define NANODLP_Z_SYNC
 #if ENABLED(NANODLP_Z_SYNC)
@@ -4060,6 +4130,7 @@
 
 /**
  * Ethernet. Use M552 to enable and set the IP address.
+ * @section network
  */
 #if HAS_ETHERNET
   #define MAC_ADDRESS { 0xDE, 0xAD, 0xBE, 0xEF, 0xF0, 0x0D }  // A MAC address unique to your network
@@ -4087,6 +4158,8 @@
   //#include "Configuration_Secure.h" // External file with WiFi SSID / Password
 #endif
 
+// @section multi-material
+
 /**
  * Průša Multi-Material Unit (MMU)
  * Enable in Configuration.h
@@ -4192,6 +4265,7 @@
 
 /**
  * Advanced Print Counter settings
+ * @section stats
  */
 #if ENABLED(PRINTCOUNTER)
   #define SERVICE_WARNING_BUZZES  3

+ 107 - 0
Marlin/base.ini

@@ -0,0 +1,107 @@
+#
+# Marlin Firmware
+# base.ini - A base ini to include for testing
+#
+[config:base]
+motherboard                              = BOARD_RAMPS_14_EFB
+serial_port                              = 0
+baudrate                                 = 250000
+
+use_watchdog                             = on
+thermal_protection_hotends               = on
+thermal_protection_hysteresis            = 4
+thermal_protection_period                = 40
+
+bufsize                                  = 4
+block_buffer_size                        = 16
+max_cmd_size                             = 96
+
+extruders                                = 1
+temp_sensor_0                            = 1
+
+temp_hysteresis                          = 3
+heater_0_mintemp                         = 5
+heater_0_maxtemp                         = 275
+preheat_1_temp_hotend                    = 180
+
+bang_max                                 = 255
+pidtemp                                  = on
+pid_k1                                   = 0.95
+pid_max                                  = BANG_MAX
+pid_functional_range                     = 10
+
+default_kp                               = 22.20
+default_ki                               = 1.08
+default_kd                               = 114.00
+
+x_driver_type                            = A4988
+y_driver_type                            = A4988
+z_driver_type                            = A4988
+e0_driver_type                           = A4988
+
+x_bed_size                               = 200
+x_min_pos                                = 0
+x_max_pos                                = X_BED_SIZE
+
+y_bed_size                               = 200
+y_min_pos                                = 0
+y_max_pos                                = Y_BED_SIZE
+
+z_min_pos                                = 0
+z_max_pos                                = 200
+
+x_home_dir                               = -1
+y_home_dir                               = -1
+z_home_dir                               = -1
+
+use_xmin_plug                            = on
+use_ymin_plug                            = on
+use_zmin_plug                            = on
+
+x_min_endstop_inverting                  = false
+y_min_endstop_inverting                  = false
+z_min_endstop_inverting                  = false
+
+default_axis_steps_per_unit              = { 80, 80, 400, 500 }
+axis_relative_modes                      = { false, false, false, false }
+default_max_feedrate                     = { 300, 300, 5, 25 }
+default_max_acceleration                 = { 3000, 3000, 100, 10000 }
+
+homing_feedrate_mm_m                     = { (50*60), (50*60), (4*60) }
+homing_bump_divisor                      = { 2, 2, 4 }
+
+x_enable_on                              = 0
+y_enable_on                              = 0
+z_enable_on                              = 0
+e_enable_on                              = 0
+
+invert_x_dir                             = false
+invert_y_dir                             = true
+invert_z_dir                             = false
+invert_e0_dir                            = false
+
+invert_e_step_pin                        = false
+invert_x_step_pin                        = false
+invert_y_step_pin                        = false
+invert_z_step_pin                        = false
+
+disable_x                                = false
+disable_y                                = false
+disable_z                                = false
+disable_e                                = false
+
+proportional_font_ratio                  = 1.0
+default_nominal_filament_dia             = 1.75
+
+junction_deviation_mm                    = 0.013
+
+default_acceleration                     = 3000
+default_travel_acceleration              = 3000
+default_retract_acceleration             = 3000
+
+default_minimumfeedrate                  = 0.0
+default_mintravelfeedrate                = 0.0
+
+minimum_planner_speed                    = 0.05
+min_steps_per_segment                    = 6
+default_minsegmenttime                   = 20000

+ 203 - 0
Marlin/config.ini

@@ -0,0 +1,203 @@
+#
+# Marlin Firmware
+# config.ini - Options to apply before the build
+#
+[config:base]
+ini_use_config                           = none
+#ini_use_config                          = base.ini, another.ini
+#ini_use_config                          = example/Creality/Ender-5 Plus
+#ini_use_config                          = https://me.myserver.com/path/to/configs
+#ini_use_config                          = base
+#config_dump                             = 2
+
+motherboard                              = BOARD_RAMPS_14_EFB
+serial_port                              = 0
+baudrate                                 = 250000
+
+use_watchdog                             = on
+thermal_protection_hotends               = on
+thermal_protection_hysteresis            = 4
+thermal_protection_period                = 40
+
+bufsize                                  = 4
+block_buffer_size                        = 16
+max_cmd_size                             = 96
+
+extruders                                = 1
+temp_sensor_0                            = 1
+
+temp_hysteresis                          = 3
+heater_0_mintemp                         = 5
+heater_0_maxtemp                         = 275
+preheat_1_temp_hotend                    = 180
+
+bang_max                                 = 255
+pidtemp                                  = on
+pid_k1                                   = 0.95
+pid_max                                  = BANG_MAX
+pid_functional_range                     = 10
+
+default_kp                               = 22.20
+default_ki                               = 1.08
+default_kd                               = 114.00
+
+x_driver_type                            = A4988
+y_driver_type                            = A4988
+z_driver_type                            = A4988
+e0_driver_type                           = A4988
+
+x_bed_size                               = 200
+x_min_pos                                = 0
+x_max_pos                                = X_BED_SIZE
+
+y_bed_size                               = 200
+y_min_pos                                = 0
+y_max_pos                                = Y_BED_SIZE
+
+z_min_pos                                = 0
+z_max_pos                                = 200
+
+x_home_dir                               = -1
+y_home_dir                               = -1
+z_home_dir                               = -1
+
+use_xmin_plug                            = on
+use_ymin_plug                            = on
+use_zmin_plug                            = on
+
+x_min_endstop_inverting                  = false
+y_min_endstop_inverting                  = false
+z_min_endstop_inverting                  = false
+
+default_axis_steps_per_unit              = { 80, 80, 400, 500 }
+axis_relative_modes                      = { false, false, false, false }
+default_max_feedrate                     = { 300, 300, 5, 25 }
+default_max_acceleration                 = { 3000, 3000, 100, 10000 }
+
+homing_feedrate_mm_m                     = { (50*60), (50*60), (4*60) }
+homing_bump_divisor                      = { 2, 2, 4 }
+
+x_enable_on                              = 0
+y_enable_on                              = 0
+z_enable_on                              = 0
+e_enable_on                              = 0
+
+invert_x_dir                             = false
+invert_y_dir                             = true
+invert_z_dir                             = false
+invert_e0_dir                            = false
+
+invert_e_step_pin                        = false
+invert_x_step_pin                        = false
+invert_y_step_pin                        = false
+invert_z_step_pin                        = false
+
+disable_x                                = false
+disable_y                                = false
+disable_z                                = false
+disable_e                                = false
+
+proportional_font_ratio                  = 1.0
+default_nominal_filament_dia             = 1.75
+
+junction_deviation_mm                    = 0.013
+
+default_acceleration                     = 3000
+default_travel_acceleration              = 3000
+default_retract_acceleration             = 3000
+
+default_minimumfeedrate                  = 0.0
+default_mintravelfeedrate                = 0.0
+
+minimum_planner_speed                    = 0.05
+min_steps_per_segment                    = 6
+default_minsegmenttime                   = 20000
+
+[config:basic]
+bed_overshoot                            = 10
+busy_while_heating                       = on
+default_ejerk                            = 5.0
+default_keepalive_interval               = 2
+default_leveling_fade_height             = 0.0
+disable_inactive_extruder                = on
+display_charset_hd44780                  = JAPANESE
+eeprom_boot_silent                       = on
+eeprom_chitchat                          = on
+endstoppullups                           = on
+extrude_maxlength                        = 200
+extrude_mintemp                          = 170
+host_keepalive_feature                   = on
+hotend_overshoot                         = 15
+jd_handle_small_segments                 = on
+lcd_info_screen_style                    = 0
+lcd_language                             = en
+max_bed_power                            = 255
+mesh_inset                               = 0
+min_software_endstops                    = on
+max_software_endstops                    = on
+min_software_endstop_x                   = on
+min_software_endstop_y                   = on
+min_software_endstop_z                   = on
+max_software_endstop_x                   = on
+max_software_endstop_y                   = on
+max_software_endstop_z                   = on
+preheat_1_fan_speed                      = 0
+preheat_1_label                          = "PLA"
+preheat_1_temp_bed                       = 70
+prevent_cold_extrusion                   = on
+prevent_lengthy_extrude                  = on
+printjob_timer_autostart                 = on
+probing_margin                           = 10
+show_bootscreen                          = on
+soft_pwm_scale                           = 0
+string_config_h_author                   = "(none, default config)"
+temp_bed_hysteresis                      = 3
+temp_bed_residency_time                  = 10
+temp_bed_window                          = 1
+temp_residency_time                      = 10
+temp_window                              = 1
+validate_homing_endstops                 = on
+xy_probe_feedrate                        = (133*60)
+z_clearance_between_probes               = 5
+z_clearance_deploy_probe                 = 10
+z_clearance_multi_probe                  = 5
+
+[config:advanced]
+arc_support                              = on
+auto_report_temperatures                 = on
+autotemp                                 = on
+autotemp_oldweight                       = 0.98
+bed_check_interval                       = 5000
+default_stepper_deactive_time            = 120
+default_volumetric_extruder_limit        = 0.00
+disable_inactive_e                       = true
+disable_inactive_x                       = true
+disable_inactive_y                       = true
+disable_inactive_z                       = true
+e0_auto_fan_pin                          = -1
+encoder_100x_steps_per_sec               = 80
+encoder_10x_steps_per_sec                = 30
+encoder_rate_multiplier                  = on
+extended_capabilities_report             = on
+extruder_auto_fan_speed                  = 255
+extruder_auto_fan_temperature            = 50
+fanmux0_pin                              = -1
+fanmux1_pin                              = -1
+fanmux2_pin                              = -1
+faster_gcode_parser                      = on
+homing_bump_mm                           = { 5, 5, 2 }
+max_arc_segment_mm                       = 1.0
+min_arc_segment_mm                       = 0.1
+min_circle_segments                      = 72
+n_arc_correction                         = 25
+serial_overrun_protection                = on
+slowdown                                 = on
+slowdown_divisor                         = 2
+temp_sensor_bed                          = 0
+thermal_protection_bed_hysteresis        = 2
+thermocouple_max_errors                  = 15
+tx_buffer_size                           = 0
+watch_bed_temp_increase                  = 2
+watch_bed_temp_period                    = 60
+watch_temp_increase                      = 2
+watch_temp_period                        = 20

+ 2 - 2
Marlin/src/MarlinCore.cpp

@@ -1220,10 +1220,10 @@ void setup() {
   SETUP_RUN(hal.init());
 
   // Init and disable SPI thermocouples; this is still needed
-  #if TEMP_SENSOR_0_IS_MAX_TC || (TEMP_SENSOR_REDUNDANT_IS_MAX_TC && REDUNDANT_TEMP_MATCH(SOURCE, E0))
+  #if TEMP_SENSOR_IS_MAX_TC(0) || (TEMP_SENSOR_IS_MAX_TC(REDUNDANT) && REDUNDANT_TEMP_MATCH(SOURCE, E0))
     OUT_WRITE(TEMP_0_CS_PIN, HIGH);  // Disable
   #endif
-  #if TEMP_SENSOR_1_IS_MAX_TC || (TEMP_SENSOR_REDUNDANT_IS_MAX_TC && REDUNDANT_TEMP_MATCH(SOURCE, E1))
+  #if TEMP_SENSOR_IS_MAX_TC(1) || (TEMP_SENSOR_IS_MAX_TC(REDUNDANT) && REDUNDANT_TEMP_MATCH(SOURCE, E1))
     OUT_WRITE(TEMP_1_CS_PIN, HIGH);
   #endif
 

+ 5 - 0
Marlin/src/core/macros.h

@@ -730,3 +730,8 @@
 #define __MAPLIST() _MAPLIST
 
 #define MAPLIST(OP,V...) EVAL(_MAPLIST(OP,V))
+
+// Temperature Sensor Config
+#define _HAS_E_TEMP(N) || (TEMP_SENSOR_##N != 0)
+#define HAS_E_TEMP_SENSOR (0 REPEAT(EXTRUDERS, _HAS_E_TEMP))
+#define TEMP_SENSOR_IS_MAX_TC(T) (TEMP_SENSOR_##T == -5 || TEMP_SENSOR_##T == -3 || TEMP_SENSOR_##T == -2)

+ 1 - 1
Marlin/src/gcode/temp/M303.cpp

@@ -48,7 +48,7 @@
 
 void GcodeSuite::M303() {
 
-  #if ANY(PID_DEBUG, PID_BED_DEBUG, PID_CHAMBER_DEBUG)
+  #if HAS_PID_DEBUG
     if (parser.seen_test('D')) {
       thermalManager.pid_debug_flag ^= true;
       SERIAL_ECHO_START();

+ 53 - 0
Marlin/src/inc/Conditionals_LCD.h

@@ -668,6 +668,31 @@
   #define E_MANUAL EXTRUDERS
 #endif
 
+#if E_STEPPERS <= 7
+  #undef INVERT_E7_DIR
+  #if E_STEPPERS <= 6
+    #undef INVERT_E6_DIR
+    #if E_STEPPERS <= 5
+      #undef INVERT_E5_DIR
+      #if E_STEPPERS <= 4
+        #undef INVERT_E4_DIR
+        #if E_STEPPERS <= 3
+          #undef INVERT_E3_DIR
+          #if E_STEPPERS <= 2
+            #undef INVERT_E2_DIR
+            #if E_STEPPERS <= 1
+              #undef INVERT_E1_DIR
+              #if E_STEPPERS == 0
+                #undef INVERT_E0_DIR
+              #endif
+            #endif
+          #endif
+        #endif
+      #endif
+    #endif
+  #endif
+#endif
+
 /**
  * Number of Linear Axes (e.g., XYZIJKUVW)
  * All the logical axes except for the tool (E) axis
@@ -768,6 +793,9 @@
   #undef Y_MIN_POS
   #undef Y_MAX_POS
   #undef MANUAL_Y_HOME_POS
+  #undef MIN_SOFTWARE_ENDSTOP_Y
+  #undef MAX_SOFTWARE_ENDSTOP_Y
+  #undef SAFE_BED_LEVELING_START_Y
 #endif
 
 #if !HAS_Z_AXIS
@@ -785,6 +813,9 @@
   #undef Z_MIN_POS
   #undef Z_MAX_POS
   #undef MANUAL_Z_HOME_POS
+  #undef MIN_SOFTWARE_ENDSTOP_Z
+  #undef MAX_SOFTWARE_ENDSTOP_Z
+  #undef SAFE_BED_LEVELING_START_Z
 #endif
 
 #if !HAS_I_AXIS
@@ -799,6 +830,9 @@
   #undef I_MIN_POS
   #undef I_MAX_POS
   #undef MANUAL_I_HOME_POS
+  #undef MIN_SOFTWARE_ENDSTOP_I
+  #undef MAX_SOFTWARE_ENDSTOP_I
+  #undef SAFE_BED_LEVELING_START_I
 #endif
 
 #if !HAS_J_AXIS
@@ -813,6 +847,9 @@
   #undef J_MIN_POS
   #undef J_MAX_POS
   #undef MANUAL_J_HOME_POS
+  #undef MIN_SOFTWARE_ENDSTOP_J
+  #undef MAX_SOFTWARE_ENDSTOP_J
+  #undef SAFE_BED_LEVELING_START_J
 #endif
 
 #if !HAS_K_AXIS
@@ -827,6 +864,9 @@
   #undef K_MIN_POS
   #undef K_MAX_POS
   #undef MANUAL_K_HOME_POS
+  #undef MIN_SOFTWARE_ENDSTOP_K
+  #undef MAX_SOFTWARE_ENDSTOP_K
+  #undef SAFE_BED_LEVELING_START_K
 #endif
 
 #if !HAS_U_AXIS
@@ -841,6 +881,9 @@
   #undef U_MIN_POS
   #undef U_MAX_POS
   #undef MANUAL_U_HOME_POS
+  #undef MIN_SOFTWARE_ENDSTOP_U
+  #undef MAX_SOFTWARE_ENDSTOP_U
+  #undef SAFE_BED_LEVELING_START_U
 #endif
 
 #if !HAS_V_AXIS
@@ -855,6 +898,9 @@
   #undef V_MIN_POS
   #undef V_MAX_POS
   #undef MANUAL_V_HOME_POS
+  #undef MIN_SOFTWARE_ENDSTOP_V
+  #undef MAX_SOFTWARE_ENDSTOP_V
+  #undef SAFE_BED_LEVELING_START_V
 #endif
 
 #if !HAS_W_AXIS
@@ -869,6 +915,9 @@
   #undef W_MIN_POS
   #undef W_MAX_POS
   #undef MANUAL_W_HOME_POS
+  #undef MIN_SOFTWARE_ENDSTOP_W
+  #undef MAX_SOFTWARE_ENDSTOP_W
+  #undef SAFE_BED_LEVELING_START_W
 #endif
 
 #ifdef X2_DRIVER_TYPE
@@ -1398,6 +1447,10 @@
   #define EXTRUDE_MINTEMP 170
 #endif
 
+#if ANY(PID_DEBUG, PID_BED_DEBUG, PID_CHAMBER_DEBUG)
+  #define HAS_PID_DEBUG 1
+#endif
+
 /**
  * TFT Displays
  *

+ 30 - 9
Marlin/src/inc/Conditionals_adv.h

@@ -116,6 +116,31 @@
   #undef STEALTHCHOP_E
 #endif
 
+#if HOTENDS <= 7
+  #undef E7_AUTO_FAN_PIN
+  #if HOTENDS <= 6
+    #undef E6_AUTO_FAN_PIN
+    #if HOTENDS <= 5
+      #undef E5_AUTO_FAN_PIN
+      #if HOTENDS <= 4
+        #undef E4_AUTO_FAN_PIN
+        #if HOTENDS <= 3
+          #undef E3_AUTO_FAN_PIN
+          #if HOTENDS <= 2
+            #undef E2_AUTO_FAN_PIN
+            #if HOTENDS <= 1
+              #undef E1_AUTO_FAN_PIN
+              #if HOTENDS == 0
+                #undef E0_AUTO_FAN_PIN
+              #endif
+            #endif
+          #endif
+        #endif
+      #endif
+    #endif
+  #endif
+#endif
+
 /**
  * Temperature Sensors; define what sensor(s) we have.
  */
@@ -154,8 +179,7 @@
   #define REDUNDANT_TEMP_MATCH(...) 0
 #endif
 
-#if TEMP_SENSOR_0 == -5 || TEMP_SENSOR_0 == -3 || TEMP_SENSOR_0 == -2
-  #define TEMP_SENSOR_0_IS_MAX_TC 1
+#if TEMP_SENSOR_IS_MAX_TC(0)
   #if TEMP_SENSOR_0 == -5
     #define TEMP_SENSOR_0_IS_MAX31865 1
     #define TEMP_SENSOR_0_MAX_TC_TMIN    0
@@ -191,8 +215,7 @@
   #undef HEATER_0_MAXTEMP
 #endif
 
-#if TEMP_SENSOR_1 == -5 || TEMP_SENSOR_1 == -3 || TEMP_SENSOR_1 == -2
-  #define TEMP_SENSOR_1_IS_MAX_TC 1
+#if TEMP_SENSOR_IS_MAX_TC(1)
   #if TEMP_SENSOR_1 == -5
     #define TEMP_SENSOR_1_IS_MAX31865 1
     #define TEMP_SENSOR_1_MAX_TC_TMIN    0
@@ -238,9 +261,7 @@
   #undef HEATER_1_MAXTEMP
 #endif
 
-#if TEMP_SENSOR_REDUNDANT == -5 || TEMP_SENSOR_REDUNDANT == -3 || TEMP_SENSOR_REDUNDANT == -2
-  #define TEMP_SENSOR_REDUNDANT_IS_MAX_TC 1
-
+#if TEMP_SENSOR_IS_MAX_TC(REDUNDANT)
   #if TEMP_SENSOR_REDUNDANT == -5
     #if !REDUNDANT_TEMP_MATCH(SOURCE, E0) && !REDUNDANT_TEMP_MATCH(SOURCE, E1)
       #error "MAX31865 Thermocouples (-5) not supported for TEMP_SENSOR_REDUNDANT_SOURCE other than TEMP_SENSOR_0/TEMP_SENSOR_1 (0/1)."
@@ -282,7 +303,7 @@
     #endif
   #endif
 
-  #if (TEMP_SENSOR_0_IS_MAX_TC && TEMP_SENSOR_REDUNDANT != TEMP_SENSOR_0) || (TEMP_SENSOR_1_IS_MAX_TC && TEMP_SENSOR_REDUNDANT != TEMP_SENSOR_1)
+  #if (TEMP_SENSOR_IS_MAX_TC(0) && TEMP_SENSOR_REDUNDANT != TEMP_SENSOR_0) || (TEMP_SENSOR_IS_MAX_TC(1) && TEMP_SENSOR_REDUNDANT != TEMP_SENSOR_1)
     #if   TEMP_SENSOR_REDUNDANT == -5
       #error "If MAX31865 Thermocouple (-5) is used for TEMP_SENSOR_0/TEMP_SENSOR_1 then TEMP_SENSOR_REDUNDANT must match."
     #elif TEMP_SENSOR_REDUNDANT == -3
@@ -304,7 +325,7 @@
   #endif
 #endif
 
-#if TEMP_SENSOR_0_IS_MAX_TC || TEMP_SENSOR_1_IS_MAX_TC || TEMP_SENSOR_REDUNDANT_IS_MAX_TC
+#if TEMP_SENSOR_IS_MAX_TC(0) || TEMP_SENSOR_IS_MAX_TC(1) || TEMP_SENSOR_IS_MAX_TC(REDUNDANT)
   #define HAS_MAX_TC 1
 #endif
 #if TEMP_SENSOR_0_IS_MAX6675 || TEMP_SENSOR_1_IS_MAX6675 || TEMP_SENSOR_REDUNDANT_IS_MAX6675

+ 6 - 6
Marlin/src/inc/Conditionals_post.h

@@ -681,7 +681,7 @@
 #if HAS_MAX_TC
 
   // Translate old _SS, _CS, _SCK, _DO, _DI, _MISO, and _MOSI PIN defines.
-  #if TEMP_SENSOR_0_IS_MAX_TC || (TEMP_SENSOR_REDUNDANT_IS_MAX_TC && REDUNDANT_TEMP_MATCH(SOURCE, E1))
+  #if TEMP_SENSOR_IS_MAX_TC(0) || (TEMP_SENSOR_IS_MAX_TC(REDUNDANT) && REDUNDANT_TEMP_MATCH(SOURCE, E1))
 
     #if !PIN_EXISTS(TEMP_0_CS) // SS, CS
       #if PIN_EXISTS(MAX6675_SS)
@@ -748,9 +748,9 @@
       #endif
     #endif
 
-  #endif // TEMP_SENSOR_0_IS_MAX_TC
+  #endif // TEMP_SENSOR_IS_MAX_TC(0)
 
-  #if TEMP_SENSOR_1_IS_MAX_TC || (TEMP_SENSOR_REDUNDANT_IS_MAX_TC && REDUNDANT_TEMP_MATCH(SOURCE, E1))
+  #if TEMP_SENSOR_IS_MAX_TC(1) || (TEMP_SENSOR_IS_MAX_TC(REDUNDANT) && REDUNDANT_TEMP_MATCH(SOURCE, E1))
 
     #if !PIN_EXISTS(TEMP_1_CS) // SS2, CS2
       #if PIN_EXISTS(MAX6675_SS2)
@@ -817,7 +817,7 @@
       #endif
     #endif
 
-  #endif // TEMP_SENSOR_1_IS_MAX_TC
+  #endif // TEMP_SENSOR_IS_MAX_TC(1)
 
   //
   // User-defined thermocouple libraries
@@ -2656,7 +2656,7 @@
 //
 // ADC Temp Sensors (Thermistor or Thermocouple with amplifier ADC interface)
 //
-#define HAS_ADC_TEST(P) (PIN_EXISTS(TEMP_##P) && TEMP_SENSOR_##P != 0 && NONE(TEMP_SENSOR_##P##_IS_MAX_TC, TEMP_SENSOR_##P##_IS_DUMMY))
+#define HAS_ADC_TEST(P) (PIN_EXISTS(TEMP_##P) && TEMP_SENSOR_##P != 0 && !TEMP_SENSOR_IS_MAX_TC(P) && !TEMP_SENSOR_##P##_IS_DUMMY)
 #if HOTENDS > 0 && HAS_ADC_TEST(0)
   #define HAS_TEMP_ADC_0 1
 #endif
@@ -2700,7 +2700,7 @@
   #define HAS_TEMP_ADC_REDUNDANT 1
 #endif
 
-#define HAS_TEMP(N) ANY(HAS_TEMP_ADC_##N, TEMP_SENSOR_##N##_IS_MAX_TC, TEMP_SENSOR_##N##_IS_DUMMY)
+#define HAS_TEMP(N) (TEMP_SENSOR_IS_MAX_TC(N) || EITHER(HAS_TEMP_ADC_##N, TEMP_SENSOR_##N##_IS_DUMMY))
 #if HAS_HOTEND && HAS_TEMP(0)
   #define HAS_TEMP_HOTEND 1
 #endif

Some files were not shown because too many files changed in this diff