From 986344640f186337d92e5e02b55953f19ffbdd1a Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 15 Aug 2024 23:08:26 -0500 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=F0=9F=94=A7=20Minimal=20configuration?= =?UTF-8?q?=20with=20Config.h=20(#27338)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/update-base-configs.yml | 27 + Makefile | 7 + Marlin/Configuration.h | 4 +- Marlin/Configuration_adv.h | 11 +- Marlin/src/inc/BaseConfiguration.h | 1572 ++++++++++ Marlin/src/inc/BaseConfiguration_adv.h | 2753 +++++++++++++++++ Marlin/src/inc/Conditionals_LCD.h | 82 +- Marlin/src/inc/Conditionals_adv.h | 51 +- Marlin/src/inc/Conditionals_post.h | 28 - Marlin/src/inc/MarlinConfigPre.h | 19 +- Marlin/src/inc/Warnings.cpp | 15 + Marlin/src/lcd/menu/menu_delta_calibrate.cpp | 5 +- buildroot/bin/mftest | 7 +- .../share/PlatformIO/scripts/signature.py | 73 +- buildroot/share/scripts/makeBaseConfigs.py | 94 + docs/Maintenance.md | 14 + 16 files changed, 4695 insertions(+), 67 deletions(-) create mode 100644 .github/workflows/update-base-configs.yml create mode 100644 Marlin/src/inc/BaseConfiguration.h create mode 100644 Marlin/src/inc/BaseConfiguration_adv.h create mode 100755 buildroot/share/scripts/makeBaseConfigs.py create mode 100644 docs/Maintenance.md diff --git a/.github/workflows/update-base-configs.yml b/.github/workflows/update-base-configs.yml new file mode 100644 index 0000000000..c27e946171 --- /dev/null +++ b/.github/workflows/update-base-configs.yml @@ -0,0 +1,27 @@ +# +# update-base-configs.yml +# Generate new base config files if needed +# + +name: Update Base Configs + +on: + schedule: + - cron: '0 */6 * * *' + +jobs: + bump_date: + name: Update Base Configs + if: github.repository == 'MarlinFirmware/Marlin' + + runs-on: ubuntu-latest + + steps: + + - name: Checkout bugfix-2.1.x + uses: actions/checkout@v4 + with: + ref: bugfix-2.1.x + + - name: Update Base Configs + run: make base-configs diff --git a/Makefile b/Makefile index 02722b9ca2..accebff395 100644 --- a/Makefile +++ b/Makefile @@ -9,6 +9,7 @@ help: @echo "make marlin : Build marlin for the configured board" @echo "make format-pins -j : Reformat all pins files (-j for parallel execution)" @echo "make validate-pins -j : Validate all pins files, fails if any require reformatting" + @echo "make base-configs : Regenerate the base configs in Marlin/src/inc" @echo "make tests-single-ci : Run a single test from inside the CI" @echo "make tests-single-local : Run a single test locally" @echo "make tests-single-local-docker : Run a single test locally, using docker" @@ -102,3 +103,9 @@ format-pins: $(PINS) validate-pins: format-pins @echo "Validating pins files" @git diff --exit-code || (git status && echo "\nError: Pins files are not formatted correctly. Run \"make format-pins\" to fix.\n" && exit 1) + +base-configs: + @echo "Generating base configs" + @python $(SCRIPTS_DIR)/makeBaseConfigs.py 2>/dev/null \ + && git add Marlin/src/inc/BaseConfiguration.h Marlin/src/inc/BaseConfiguration_adv.h \ + && git commit -m "[cron] Update Base Configurations" diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 26595f93fe..c82f4eb4ad 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -713,7 +713,7 @@ * Use a physical model of the hotend to control temperature. When configured correctly this gives * better responsiveness and stability than PID and removes the need for PID_EXTRUSION_SCALING * and PID_FAN_SCALING. Enable MPC_AUTOTUNE and use M306 T to autotune the model. - * @section mpctemp + * @section mpc temp */ #if ENABLED(MPCTEMP) #define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash) @@ -849,6 +849,8 @@ // FIND YOUR OWN: "M303 E-2 C8 S50" to run autotune on the chamber at 50 degreesC for 8 cycles. #endif // PIDTEMPCHAMBER +// @section pid temp + #if ANY(PIDTEMP, PIDTEMPBED, PIDTEMPCHAMBER) //#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 diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 4bea030a9a..3ffd1ee92a 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -47,8 +47,9 @@ * 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. + * 5 = Config.h - Minimal configuration by popular demand. */ -//#define CONFIG_EXPORT 2 // :[1:'JSON', 2:'config.ini', 3:'schema.json', 4:'schema.yml'] +//#define CONFIG_EXPORT 105 // :[1:'JSON', 2:'config.ini', 3:'schema.json', 4:'schema.yml', 5:'Config.h'] //=========================================================================== //============================= Thermal Settings ============================ @@ -303,7 +304,7 @@ * If you get false positives for "Thermal Runaway", increase * THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD */ -#if ENABLED(THERMAL_PROTECTION_HOTENDS) +#if ALL(HAS_HOTEND, THERMAL_PROTECTION_HOTENDS) #define THERMAL_PROTECTION_PERIOD 40 // (seconds) #define THERMAL_PROTECTION_HYSTERESIS 4 // (°C) @@ -334,7 +335,7 @@ /** * Thermal Protection parameters for the bed are just as above for hotends. */ -#if ENABLED(THERMAL_PROTECTION_BED) +#if TEMP_SENSOR_BED && ENABLED(THERMAL_PROTECTION_BED) #define THERMAL_PROTECTION_BED_PERIOD 20 // (seconds) #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // (°C) @@ -348,7 +349,7 @@ /** * Thermal Protection parameters for the heated chamber. */ -#if ENABLED(THERMAL_PROTECTION_CHAMBER) +#if TEMP_SENSOR_CHAMBER && ENABLED(THERMAL_PROTECTION_CHAMBER) #define THERMAL_PROTECTION_CHAMBER_PERIOD 20 // (seconds) #define THERMAL_PROTECTION_CHAMBER_HYSTERESIS 2 // (°C) @@ -362,7 +363,7 @@ /** * Thermal Protection parameters for the laser cooler. */ -#if ENABLED(THERMAL_PROTECTION_COOLER) +#if TEMP_SENSOR_COOLER && ENABLED(THERMAL_PROTECTION_COOLER) #define THERMAL_PROTECTION_COOLER_PERIOD 10 // (seconds) #define THERMAL_PROTECTION_COOLER_HYSTERESIS 3 // (°C) diff --git a/Marlin/src/inc/BaseConfiguration.h b/Marlin/src/inc/BaseConfiguration.h new file mode 100644 index 0000000000..27dc12f81e --- /dev/null +++ b/Marlin/src/inc/BaseConfiguration.h @@ -0,0 +1,1572 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2024 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * BaseConfiguration.h - Generated using makeBaseConfigs.py + */ + +#ifndef CONFIGURATION_H_VERSION + #define CONFIGURATION_H_VERSION 02010300 +#endif +#ifndef STRING_CONFIG_H_AUTHOR + #define STRING_CONFIG_H_AUTHOR "(none, default config)" +#endif +#ifndef MOTHERBOARD + #define MOTHERBOARD BOARD_RAMPS_14_EFB +#endif +#ifndef SERIAL_PORT + #define SERIAL_PORT 0 +#endif +#ifndef BAUDRATE + #define BAUDRATE 250000 +#endif +#ifndef X_DRIVER_TYPE + #define X_DRIVER_TYPE A4988 +#endif +#ifndef Y_DRIVER_TYPE + #define Y_DRIVER_TYPE A4988 +#endif +#ifndef Z_DRIVER_TYPE + #define Z_DRIVER_TYPE A4988 +#endif +#ifndef E0_DRIVER_TYPE + #define E0_DRIVER_TYPE A4988 +#endif +#ifdef I_DRIVER_TYPE + #ifndef AXIS4_NAME + #define AXIS4_NAME 'A' + #endif + #ifndef AXIS4_ROTATES + #define AXIS4_ROTATES + #endif +#endif +#ifdef J_DRIVER_TYPE + #ifndef AXIS5_NAME + #define AXIS5_NAME 'B' + #endif + #ifndef AXIS5_ROTATES + #define AXIS5_ROTATES + #endif +#endif +#ifdef K_DRIVER_TYPE + #ifndef AXIS6_NAME + #define AXIS6_NAME 'C' + #endif + #ifndef AXIS6_ROTATES + #define AXIS6_ROTATES + #endif +#endif +#ifdef U_DRIVER_TYPE + #ifndef AXIS7_NAME + #define AXIS7_NAME 'U' + #endif +#endif +#ifdef V_DRIVER_TYPE + #ifndef AXIS8_NAME + #define AXIS8_NAME 'V' + #endif +#endif +#ifdef W_DRIVER_TYPE + #ifndef AXIS9_NAME + #define AXIS9_NAME 'W' + #endif +#endif +#ifndef EXTRUDERS + #define EXTRUDERS 1 +#endif +#ifndef DEFAULT_NOMINAL_FILAMENT_DIA + #define DEFAULT_NOMINAL_FILAMENT_DIA 1.75 +#endif +#if ENABLED(SWITCHING_EXTRUDER) + #ifndef SWITCHING_EXTRUDER_SERVO_NR + #define SWITCHING_EXTRUDER_SERVO_NR 0 + #endif + #ifndef SWITCHING_EXTRUDER_SERVO_ANGLES + #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } + #endif + #if EXTRUDERS > 3 + #ifndef SWITCHING_EXTRUDER_E23_SERVO_NR + #define SWITCHING_EXTRUDER_E23_SERVO_NR 1 + #endif + #endif +#endif +#if ENABLED(SWITCHING_NOZZLE) + #ifndef SWITCHING_NOZZLE_SERVO_NR + #define SWITCHING_NOZZLE_SERVO_NR 0 + #endif + #ifndef SWITCHING_NOZZLE_SERVO_ANGLES + #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } + #endif + #ifndef SWITCHING_NOZZLE_SERVO_DWELL + #define SWITCHING_NOZZLE_SERVO_DWELL 2500 + #endif +#endif +#if ANY(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) + #ifndef PARKING_EXTRUDER_PARKING_X + #define PARKING_EXTRUDER_PARKING_X { -78, 184 } + #endif + #ifndef PARKING_EXTRUDER_GRAB_DISTANCE + #define PARKING_EXTRUDER_GRAB_DISTANCE 1 + #endif + #if ENABLED(PARKING_EXTRUDER) + #ifndef PARKING_EXTRUDER_SOLENOIDS_INVERT + #define PARKING_EXTRUDER_SOLENOIDS_INVERT + #endif + #ifndef PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE + #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW + #endif + #ifndef PARKING_EXTRUDER_SOLENOIDS_DELAY + #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 + #endif + #elif ENABLED(MAGNETIC_PARKING_EXTRUDER) + #ifndef MPE_FAST_SPEED + #define MPE_FAST_SPEED 9000 + #endif + #ifndef MPE_SLOW_SPEED + #define MPE_SLOW_SPEED 4500 + #endif + #ifndef MPE_TRAVEL_DISTANCE + #define MPE_TRAVEL_DISTANCE 10 + #endif + #ifndef MPE_COMPENSATION + #define MPE_COMPENSATION 0 + #endif + #endif +#endif +#if ANY(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD, ELECTROMAGNETIC_SWITCHING_TOOLHEAD) + #ifndef SWITCHING_TOOLHEAD_Y_POS + #define SWITCHING_TOOLHEAD_Y_POS 235 + #endif + #ifndef SWITCHING_TOOLHEAD_Y_SECURITY + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 + #endif + #ifndef SWITCHING_TOOLHEAD_Y_CLEAR + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 + #endif + #ifndef SWITCHING_TOOLHEAD_X_POS + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } + #endif + #if ENABLED(SWITCHING_TOOLHEAD) + #ifndef SWITCHING_TOOLHEAD_SERVO_NR + #define SWITCHING_TOOLHEAD_SERVO_NR 2 + #endif + #ifndef SWITCHING_TOOLHEAD_SERVO_ANGLES + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } + #endif + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #ifndef SWITCHING_TOOLHEAD_Y_RELEASE + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 + #endif + #ifndef SWITCHING_TOOLHEAD_X_SECURITY + #define SWITCHING_TOOLHEAD_X_SECURITY { 90, 150 } + #endif + #if ENABLED(PRIME_BEFORE_REMOVE) + #ifndef SWITCHING_TOOLHEAD_PRIME_MM + #define SWITCHING_TOOLHEAD_PRIME_MM 20 + #endif + #ifndef SWITCHING_TOOLHEAD_RETRACT_MM + #define SWITCHING_TOOLHEAD_RETRACT_MM 10 + #endif + #ifndef SWITCHING_TOOLHEAD_PRIME_FEEDRATE + #define SWITCHING_TOOLHEAD_PRIME_FEEDRATE 300 + #endif + #ifndef SWITCHING_TOOLHEAD_RETRACT_FEEDRATE + #define SWITCHING_TOOLHEAD_RETRACT_FEEDRATE 2400 + #endif + #endif + #elif ENABLED(ELECTROMAGNETIC_SWITCHING_TOOLHEAD) + #ifndef SWITCHING_TOOLHEAD_Z_HOP + #define SWITCHING_TOOLHEAD_Z_HOP 2 + #endif + #endif +#endif +#if ENABLED(MIXING_EXTRUDER) + #ifndef MIXING_STEPPERS + #define MIXING_STEPPERS 2 + #endif + #ifndef MIXING_VIRTUAL_TOOLS + #define MIXING_VIRTUAL_TOOLS 16 + #endif +#endif +#if ENABLED(PSU_CONTROL) + #ifndef PSU_ACTIVE_STATE + #define PSU_ACTIVE_STATE LOW + #endif + #ifndef PS_EDM_RESPONSE + #define PS_EDM_RESPONSE 250 + #endif + #if ENABLED(AUTO_POWER_CONTROL) + #ifndef AUTO_POWER_FANS + #define AUTO_POWER_FANS + #endif + #ifndef AUTO_POWER_E_FANS + #define AUTO_POWER_E_FANS + #endif + #ifndef AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CONTROLLERFAN + #endif + #ifndef AUTO_POWER_CHAMBER_FAN + #define AUTO_POWER_CHAMBER_FAN + #endif + #ifndef AUTO_POWER_COOLER_FAN + #define AUTO_POWER_COOLER_FAN + #endif + #ifndef AUTO_POWER_SPINDLE_LASER + #define AUTO_POWER_SPINDLE_LASER + #endif + #ifndef POWER_TIMEOUT + #define POWER_TIMEOUT 30 + #endif + #endif +#endif +#ifndef TEMP_SENSOR_0 + #define TEMP_SENSOR_0 1 +#endif +#ifndef TEMP_SENSOR_1 + #define TEMP_SENSOR_1 0 +#endif +#ifndef TEMP_SENSOR_2 + #define TEMP_SENSOR_2 0 +#endif +#ifndef TEMP_SENSOR_3 + #define TEMP_SENSOR_3 0 +#endif +#ifndef TEMP_SENSOR_4 + #define TEMP_SENSOR_4 0 +#endif +#ifndef TEMP_SENSOR_5 + #define TEMP_SENSOR_5 0 +#endif +#ifndef TEMP_SENSOR_6 + #define TEMP_SENSOR_6 0 +#endif +#ifndef TEMP_SENSOR_7 + #define TEMP_SENSOR_7 0 +#endif +#ifndef TEMP_SENSOR_BED + #define TEMP_SENSOR_BED 1 +#endif +#ifndef TEMP_SENSOR_PROBE + #define TEMP_SENSOR_PROBE 0 +#endif +#ifndef TEMP_SENSOR_CHAMBER + #define TEMP_SENSOR_CHAMBER 0 +#endif +#ifndef TEMP_SENSOR_COOLER + #define TEMP_SENSOR_COOLER 0 +#endif +#ifndef TEMP_SENSOR_BOARD + #define TEMP_SENSOR_BOARD 0 +#endif +#ifndef TEMP_SENSOR_SOC + #define TEMP_SENSOR_SOC 0 +#endif +#ifndef TEMP_SENSOR_REDUNDANT + #define TEMP_SENSOR_REDUNDANT 0 +#endif +#ifndef DUMMY_THERMISTOR_998_VALUE + #define DUMMY_THERMISTOR_998_VALUE 25 +#endif +#ifndef DUMMY_THERMISTOR_999_VALUE + #define DUMMY_THERMISTOR_999_VALUE 100 +#endif +#if TEMP_SENSOR_IS_MAX_TC(0) + #ifndef MAX31865_SENSOR_OHMS_0 + #define MAX31865_SENSOR_OHMS_0 100 + #endif + #ifndef MAX31865_CALIBRATION_OHMS_0 + #define MAX31865_CALIBRATION_OHMS_0 430 + #endif +#endif +#if TEMP_SENSOR_IS_MAX_TC(1) + #ifndef MAX31865_SENSOR_OHMS_1 + #define MAX31865_SENSOR_OHMS_1 100 + #endif + #ifndef MAX31865_CALIBRATION_OHMS_1 + #define MAX31865_CALIBRATION_OHMS_1 430 + #endif +#endif +#if TEMP_SENSOR_IS_MAX_TC(2) + #ifndef MAX31865_SENSOR_OHMS_2 + #define MAX31865_SENSOR_OHMS_2 100 + #endif + #ifndef MAX31865_CALIBRATION_OHMS_2 + #define MAX31865_CALIBRATION_OHMS_2 430 + #endif +#endif +#if HAS_E_TEMP_SENSOR + #ifndef TEMP_RESIDENCY_TIME + #define TEMP_RESIDENCY_TIME 10 + #endif + #ifndef TEMP_WINDOW + #define TEMP_WINDOW 1 + #endif + #ifndef TEMP_HYSTERESIS + #define TEMP_HYSTERESIS 3 + #endif +#endif +#if TEMP_SENSOR_BED + #ifndef TEMP_BED_RESIDENCY_TIME + #define TEMP_BED_RESIDENCY_TIME 10 + #endif + #ifndef TEMP_BED_WINDOW + #define TEMP_BED_WINDOW 1 + #endif + #ifndef TEMP_BED_HYSTERESIS + #define TEMP_BED_HYSTERESIS 3 + #endif +#endif +#if TEMP_SENSOR_CHAMBER + #ifndef TEMP_CHAMBER_RESIDENCY_TIME + #define TEMP_CHAMBER_RESIDENCY_TIME 10 + #endif + #ifndef TEMP_CHAMBER_WINDOW + #define TEMP_CHAMBER_WINDOW 1 + #endif + #ifndef TEMP_CHAMBER_HYSTERESIS + #define TEMP_CHAMBER_HYSTERESIS 3 + #endif +#endif +#if TEMP_SENSOR_REDUNDANT + #ifndef TEMP_SENSOR_REDUNDANT_SOURCE + #define TEMP_SENSOR_REDUNDANT_SOURCE E1 + #endif + #ifndef TEMP_SENSOR_REDUNDANT_TARGET + #define TEMP_SENSOR_REDUNDANT_TARGET E0 + #endif + #ifndef TEMP_SENSOR_REDUNDANT_MAX_DIFF + #define TEMP_SENSOR_REDUNDANT_MAX_DIFF 10 + #endif +#endif +#ifndef HEATER_0_MINTEMP + #define HEATER_0_MINTEMP 5 +#endif +#ifndef HEATER_1_MINTEMP + #define HEATER_1_MINTEMP 5 +#endif +#ifndef HEATER_2_MINTEMP + #define HEATER_2_MINTEMP 5 +#endif +#ifndef HEATER_3_MINTEMP + #define HEATER_3_MINTEMP 5 +#endif +#ifndef HEATER_4_MINTEMP + #define HEATER_4_MINTEMP 5 +#endif +#ifndef HEATER_5_MINTEMP + #define HEATER_5_MINTEMP 5 +#endif +#ifndef HEATER_6_MINTEMP + #define HEATER_6_MINTEMP 5 +#endif +#ifndef HEATER_7_MINTEMP + #define HEATER_7_MINTEMP 5 +#endif +#ifndef BED_MINTEMP + #define BED_MINTEMP 5 +#endif +#ifndef CHAMBER_MINTEMP + #define CHAMBER_MINTEMP 5 +#endif +#ifndef HEATER_0_MAXTEMP + #define HEATER_0_MAXTEMP 275 +#endif +#ifndef HEATER_1_MAXTEMP + #define HEATER_1_MAXTEMP 275 +#endif +#ifndef HEATER_2_MAXTEMP + #define HEATER_2_MAXTEMP 275 +#endif +#ifndef HEATER_3_MAXTEMP + #define HEATER_3_MAXTEMP 275 +#endif +#ifndef HEATER_4_MAXTEMP + #define HEATER_4_MAXTEMP 275 +#endif +#ifndef HEATER_5_MAXTEMP + #define HEATER_5_MAXTEMP 275 +#endif +#ifndef HEATER_6_MAXTEMP + #define HEATER_6_MAXTEMP 275 +#endif +#ifndef HEATER_7_MAXTEMP + #define HEATER_7_MAXTEMP 275 +#endif +#ifndef BED_MAXTEMP + #define BED_MAXTEMP 150 +#endif +#ifndef CHAMBER_MAXTEMP + #define CHAMBER_MAXTEMP 60 +#endif +#ifndef HOTEND_OVERSHOOT + #define HOTEND_OVERSHOOT 15 +#endif +#ifndef BED_OVERSHOOT + #define BED_OVERSHOOT 10 +#endif +#ifndef COOLER_OVERSHOOT + #define COOLER_OVERSHOOT 2 +#endif +#ifndef PIDTEMP + #define PIDTEMP +#endif +#ifndef PID_MAX + #define PID_MAX 255 +#endif +#ifndef PID_K1 + #define PID_K1 0.95 +#endif +#if ENABLED(PIDTEMP) + #if ENABLED(PID_PARAMS_PER_HOTEND) + #ifndef DEFAULT_Kp_LIST + #define DEFAULT_Kp_LIST { 22.20, 22.20 } + #endif + #ifndef DEFAULT_Ki_LIST + #define DEFAULT_Ki_LIST { 1.08, 1.08 } + #endif + #ifndef DEFAULT_Kd_LIST + #define DEFAULT_Kd_LIST { 114.00, 114.00 } + #endif + #else + #ifndef DEFAULT_Kp + #define DEFAULT_Kp 22.20 + #endif + #ifndef DEFAULT_Ki + #define DEFAULT_Ki 1.08 + #endif + #ifndef DEFAULT_Kd + #define DEFAULT_Kd 114.00 + #endif + #endif +#else + #ifndef BANG_MAX + #define BANG_MAX 255 + #endif +#endif +#if ENABLED(MPCTEMP) + #ifndef MPC_AUTOTUNE + #define MPC_AUTOTUNE + #endif + #ifndef MPC_MAX + #define MPC_MAX 255 + #endif + #ifndef MPC_HEATER_POWER + #define MPC_HEATER_POWER { 40.0f } + #endif + #ifndef MPC_INCLUDE_FAN + #define MPC_INCLUDE_FAN + #endif + #ifndef MPC_BLOCK_HEAT_CAPACITY + #define MPC_BLOCK_HEAT_CAPACITY { 16.7f } + #endif + #ifndef MPC_SENSOR_RESPONSIVENESS + #define MPC_SENSOR_RESPONSIVENESS { 0.22f } + #endif + #ifndef MPC_AMBIENT_XFER_COEFF + #define MPC_AMBIENT_XFER_COEFF { 0.068f } + #endif + #if ENABLED(MPC_INCLUDE_FAN) + #ifndef MPC_AMBIENT_XFER_COEFF_FAN255 + #define MPC_AMBIENT_XFER_COEFF_FAN255 { 0.097f } + #endif + #endif + #ifndef FILAMENT_HEAT_CAPACITY_PERMM + #define FILAMENT_HEAT_CAPACITY_PERMM { 5.6e-3f } + #endif + #ifndef MPC_SMOOTHING_FACTOR + #define MPC_SMOOTHING_FACTOR 0.5f + #endif + #ifndef MPC_MIN_AMBIENT_CHANGE + #define MPC_MIN_AMBIENT_CHANGE 1.0f + #endif + #ifndef MPC_STEADYSTATE + #define MPC_STEADYSTATE 0.5f + #endif + #ifndef MPC_TUNING_POS + #define MPC_TUNING_POS { X_CENTER, Y_CENTER, 1.0f } + #endif + #ifndef MPC_TUNING_END_Z + #define MPC_TUNING_END_Z 10.0f + #endif +#endif +#ifndef MAX_BED_POWER + #define MAX_BED_POWER 255 +#endif +#if ENABLED(PIDTEMPBED) + #ifndef DEFAULT_bedKp + #define DEFAULT_bedKp 10.00 + #endif + #ifndef DEFAULT_bedKi + #define DEFAULT_bedKi .023 + #endif + #ifndef DEFAULT_bedKd + #define DEFAULT_bedKd 305.4 + #endif +#else +#endif +#ifndef MAX_CHAMBER_POWER + #define MAX_CHAMBER_POWER 255 +#endif +#if ENABLED(PIDTEMPCHAMBER) + #ifndef MIN_CHAMBER_POWER + #define MIN_CHAMBER_POWER 0 + #endif + #ifndef DEFAULT_chamberKp + #define DEFAULT_chamberKp 37.04 + #endif + #ifndef DEFAULT_chamberKi + #define DEFAULT_chamberKi 1.40 + #endif + #ifndef DEFAULT_chamberKd + #define DEFAULT_chamberKd 655.17 + #endif +#endif +#if ANY(PIDTEMP, PIDTEMPBED, PIDTEMPCHAMBER) + #ifndef PID_FUNCTIONAL_RANGE + #define PID_FUNCTIONAL_RANGE 10 + #endif +#endif +#ifndef PREVENT_COLD_EXTRUSION + #define PREVENT_COLD_EXTRUSION +#endif +#ifndef EXTRUDE_MINTEMP + #define EXTRUDE_MINTEMP 170 +#endif +#ifndef PREVENT_LENGTHY_EXTRUDE + #define PREVENT_LENGTHY_EXTRUDE +#endif +#ifndef EXTRUDE_MAXLENGTH + #define EXTRUDE_MAXLENGTH 200 +#endif +#ifndef THERMAL_PROTECTION_HOTENDS + #define THERMAL_PROTECTION_HOTENDS +#endif +#ifndef THERMAL_PROTECTION_BED + #define THERMAL_PROTECTION_BED +#endif +#ifndef THERMAL_PROTECTION_CHAMBER + #define THERMAL_PROTECTION_CHAMBER +#endif +#ifndef THERMAL_PROTECTION_COOLER + #define THERMAL_PROTECTION_COOLER +#endif +#if ENABLED(POLARGRAPH) + #ifndef POLARGRAPH_MAX_BELT_LEN + #define POLARGRAPH_MAX_BELT_LEN 1035.0 + #endif + #ifndef DEFAULT_SEGMENTS_PER_SECOND + #define DEFAULT_SEGMENTS_PER_SECOND 5 + #endif + #ifndef PEN_UP_DOWN_MENU + #define PEN_UP_DOWN_MENU + #endif +#endif +#if ENABLED(DELTA) + #ifndef DEFAULT_SEGMENTS_PER_SECOND + #define DEFAULT_SEGMENTS_PER_SECOND 200 + #endif + #if ENABLED(DELTA_AUTO_CALIBRATION) + #ifndef DELTA_CALIBRATION_DEFAULT_POINTS + #define DELTA_CALIBRATION_DEFAULT_POINTS 4 + #endif + #endif + #if ANY(DELTA_AUTO_CALIBRATION, DELTA_CALIBRATION_MENU) + #ifndef PROBE_MANUALLY_STEP + #define PROBE_MANUALLY_STEP 0.05 + #endif + #endif + #ifndef PRINTABLE_RADIUS + #define PRINTABLE_RADIUS 140.0 + #endif + #ifndef DELTA_MAX_RADIUS + #define DELTA_MAX_RADIUS 140.0 + #endif + #ifndef DELTA_DIAGONAL_ROD + #define DELTA_DIAGONAL_ROD 250.0 + #endif + #ifndef DELTA_HEIGHT + #define DELTA_HEIGHT 250.00 + #endif + #ifndef DELTA_ENDSTOP_ADJ + #define DELTA_ENDSTOP_ADJ { 0.0, 0.0, 0.0 } + #endif + #ifndef DELTA_RADIUS + #define DELTA_RADIUS 124.0 + #endif + #ifndef DELTA_TOWER_ANGLE_TRIM + #define DELTA_TOWER_ANGLE_TRIM { 0.0, 0.0, 0.0 } + #endif +#endif +#if ANY(MORGAN_SCARA, MP_SCARA) + #ifndef DEFAULT_SEGMENTS_PER_SECOND + #define DEFAULT_SEGMENTS_PER_SECOND 200 + #endif + #ifndef SCARA_LINKAGE_1 + #define SCARA_LINKAGE_1 150 + #endif + #ifndef SCARA_LINKAGE_2 + #define SCARA_LINKAGE_2 150 + #endif + #ifndef SCARA_OFFSET_X + #define SCARA_OFFSET_X 100 + #endif + #ifndef SCARA_OFFSET_Y + #define SCARA_OFFSET_Y -56 + #endif + #if ENABLED(MORGAN_SCARA) + #ifndef FEEDRATE_SCALING + #define FEEDRATE_SCALING + #endif + #ifndef MIDDLE_DEAD_ZONE_R + #define MIDDLE_DEAD_ZONE_R 0 + #endif + #elif ENABLED(MP_SCARA) + #ifndef SCARA_OFFSET_THETA1 + #define SCARA_OFFSET_THETA1 12 + #endif + #ifndef SCARA_OFFSET_THETA2 + #define SCARA_OFFSET_THETA2 131 + #endif + #endif +#endif +#if ENABLED(AXEL_TPARA) + #ifndef DEBUG_TPARA_KINEMATICS + #define DEBUG_TPARA_KINEMATICS + #endif + #ifndef DEFAULT_SEGMENTS_PER_SECOND + #define DEFAULT_SEGMENTS_PER_SECOND 200 + #endif + #ifndef TPARA_LINKAGE_1 + #define TPARA_LINKAGE_1 120 + #endif + #ifndef TPARA_LINKAGE_2 + #define TPARA_LINKAGE_2 120 + #endif + #ifndef TPARA_OFFSET_X + #define TPARA_OFFSET_X 0 + #endif + #ifndef TPARA_OFFSET_Y + #define TPARA_OFFSET_Y 0 + #endif + #ifndef TPARA_OFFSET_Z + #define TPARA_OFFSET_Z 0 + #endif + #ifndef FEEDRATE_SCALING + #define FEEDRATE_SCALING + #endif + #ifndef MIDDLE_DEAD_ZONE_R + #define MIDDLE_DEAD_ZONE_R 0 + #endif +#endif +#if ENABLED(POLAR) + #ifndef DEFAULT_SEGMENTS_PER_SECOND + #define DEFAULT_SEGMENTS_PER_SECOND 180 + #endif + #ifndef PRINTABLE_RADIUS + #define PRINTABLE_RADIUS 82.0f + #endif + #ifndef POLAR_FAST_RADIUS + #define POLAR_FAST_RADIUS 3.0f + #endif + #ifndef POLAR_CENTER_OFFSET + #define POLAR_CENTER_OFFSET 0.0f + #endif + #ifndef FEEDRATE_SCALING + #define FEEDRATE_SCALING + #endif +#endif +#ifndef ENDSTOPPULLUPS + #define ENDSTOPPULLUPS +#endif +#ifndef X_MIN_ENDSTOP_HIT_STATE + #define X_MIN_ENDSTOP_HIT_STATE HIGH +#endif +#ifndef X_MAX_ENDSTOP_HIT_STATE + #define X_MAX_ENDSTOP_HIT_STATE HIGH +#endif +#ifndef Y_MIN_ENDSTOP_HIT_STATE + #define Y_MIN_ENDSTOP_HIT_STATE HIGH +#endif +#ifndef Y_MAX_ENDSTOP_HIT_STATE + #define Y_MAX_ENDSTOP_HIT_STATE HIGH +#endif +#ifndef Z_MIN_ENDSTOP_HIT_STATE + #define Z_MIN_ENDSTOP_HIT_STATE HIGH +#endif +#ifndef Z_MAX_ENDSTOP_HIT_STATE + #define Z_MAX_ENDSTOP_HIT_STATE HIGH +#endif +#ifndef I_MIN_ENDSTOP_HIT_STATE + #define I_MIN_ENDSTOP_HIT_STATE HIGH +#endif +#ifndef I_MAX_ENDSTOP_HIT_STATE + #define I_MAX_ENDSTOP_HIT_STATE HIGH +#endif +#ifndef J_MIN_ENDSTOP_HIT_STATE + #define J_MIN_ENDSTOP_HIT_STATE HIGH +#endif +#ifndef J_MAX_ENDSTOP_HIT_STATE + #define J_MAX_ENDSTOP_HIT_STATE HIGH +#endif +#ifndef K_MIN_ENDSTOP_HIT_STATE + #define K_MIN_ENDSTOP_HIT_STATE HIGH +#endif +#ifndef K_MAX_ENDSTOP_HIT_STATE + #define K_MAX_ENDSTOP_HIT_STATE HIGH +#endif +#ifndef U_MIN_ENDSTOP_HIT_STATE + #define U_MIN_ENDSTOP_HIT_STATE HIGH +#endif +#ifndef U_MAX_ENDSTOP_HIT_STATE + #define U_MAX_ENDSTOP_HIT_STATE HIGH +#endif +#ifndef V_MIN_ENDSTOP_HIT_STATE + #define V_MIN_ENDSTOP_HIT_STATE HIGH +#endif +#ifndef V_MAX_ENDSTOP_HIT_STATE + #define V_MAX_ENDSTOP_HIT_STATE HIGH +#endif +#ifndef W_MIN_ENDSTOP_HIT_STATE + #define W_MIN_ENDSTOP_HIT_STATE HIGH +#endif +#ifndef W_MAX_ENDSTOP_HIT_STATE + #define W_MAX_ENDSTOP_HIT_STATE HIGH +#endif +#ifndef Z_MIN_PROBE_ENDSTOP_HIT_STATE + #define Z_MIN_PROBE_ENDSTOP_HIT_STATE HIGH +#endif +#ifndef DEFAULT_AXIS_STEPS_PER_UNIT + #define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 400, 500 } +#endif +#ifndef EDITABLE_STEPS_PER_UNIT + #define EDITABLE_STEPS_PER_UNIT +#endif +#ifndef DEFAULT_MAX_FEEDRATE + #define DEFAULT_MAX_FEEDRATE { 300, 300, 5, 25 } +#endif +#if ENABLED(LIMITED_MAX_FR_EDITING) + #ifndef MAX_FEEDRATE_EDIT_VALUES + #define MAX_FEEDRATE_EDIT_VALUES { 600, 600, 10, 50 } + #endif +#endif +#ifndef DEFAULT_MAX_ACCELERATION + #define DEFAULT_MAX_ACCELERATION { 3000, 3000, 100, 10000 } +#endif +#if ENABLED(LIMITED_MAX_ACCEL_EDITING) + #ifndef MAX_ACCEL_EDIT_VALUES + #define MAX_ACCEL_EDIT_VALUES { 6000, 6000, 200, 20000 } + #endif +#endif +#ifndef DEFAULT_ACCELERATION + #define DEFAULT_ACCELERATION 3000 +#endif +#ifndef DEFAULT_RETRACT_ACCELERATION + #define DEFAULT_RETRACT_ACCELERATION 3000 +#endif +#ifndef DEFAULT_TRAVEL_ACCELERATION + #define DEFAULT_TRAVEL_ACCELERATION 3000 +#endif +#if ENABLED(CLASSIC_JERK) + #ifndef DEFAULT_XJERK + #define DEFAULT_XJERK 10.0 + #endif + #ifndef DEFAULT_YJERK + #define DEFAULT_YJERK 10.0 + #endif + #ifndef DEFAULT_ZJERK + #define DEFAULT_ZJERK 0.3 + #endif + #ifndef DEFAULT_EJERK + #define DEFAULT_EJERK 5.0 + #endif + #if ENABLED(LIMITED_JERK_EDITING) + #ifndef MAX_JERK_EDIT_VALUES + #define MAX_JERK_EDIT_VALUES { 20, 20, 0.6, 10 } + #endif + #endif +#endif +#if DISABLED(CLASSIC_JERK) + #ifndef JUNCTION_DEVIATION_MM + #define JUNCTION_DEVIATION_MM 0.013 + #endif + #ifndef JD_HANDLE_SMALL_SEGMENTS + #define JD_HANDLE_SMALL_SEGMENTS + #endif +#endif +#ifndef Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN + #define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN +#endif +#if ENABLED(MAGLEV4) + #ifndef MAGLEV_TRIGGER_DELAY + #define MAGLEV_TRIGGER_DELAY 15 + #endif +#endif +#if ENABLED(TOUCH_MI_PROBE) + #ifndef TOUCH_MI_RETRACT_Z + #define TOUCH_MI_RETRACT_Z 0.5 + #endif +#endif +#if ENABLED(RACK_AND_PINION_PROBE) + #ifndef Z_PROBE_DEPLOY_X + #define Z_PROBE_DEPLOY_X X_MIN_POS + #endif + #ifndef Z_PROBE_RETRACT_X + #define Z_PROBE_RETRACT_X X_MAX_POS + #endif +#endif +#if ENABLED(MAG_MOUNTED_PROBE) + #ifndef PROBE_DEPLOY_FEEDRATE + #define PROBE_DEPLOY_FEEDRATE (133*60) + #endif + #ifndef PROBE_STOW_FEEDRATE + #define PROBE_STOW_FEEDRATE (133*60) + #endif + #ifndef MAG_MOUNTED_DEPLOY_1 + #define MAG_MOUNTED_DEPLOY_1 { PROBE_DEPLOY_FEEDRATE, { 245, 114, 30 } } + #endif + #ifndef MAG_MOUNTED_DEPLOY_2 + #define MAG_MOUNTED_DEPLOY_2 { PROBE_DEPLOY_FEEDRATE, { 210, 114, 30 } } + #endif + #ifndef MAG_MOUNTED_DEPLOY_3 + #define MAG_MOUNTED_DEPLOY_3 { PROBE_DEPLOY_FEEDRATE, { 0, 0, 0 } } + #endif + #ifndef MAG_MOUNTED_DEPLOY_4 + #define MAG_MOUNTED_DEPLOY_4 { PROBE_DEPLOY_FEEDRATE, { 0, 0, 0 } } + #endif + #ifndef MAG_MOUNTED_DEPLOY_5 + #define MAG_MOUNTED_DEPLOY_5 { PROBE_DEPLOY_FEEDRATE, { 0, 0, 0 } } + #endif + #ifndef MAG_MOUNTED_STOW_1 + #define MAG_MOUNTED_STOW_1 { PROBE_STOW_FEEDRATE, { 245, 114, 20 } } + #endif + #ifndef MAG_MOUNTED_STOW_2 + #define MAG_MOUNTED_STOW_2 { PROBE_STOW_FEEDRATE, { 245, 114, 0 } } + #endif + #ifndef MAG_MOUNTED_STOW_3 + #define MAG_MOUNTED_STOW_3 { PROBE_STOW_FEEDRATE, { 230, 114, 0 } } + #endif + #ifndef MAG_MOUNTED_STOW_4 + #define MAG_MOUNTED_STOW_4 { PROBE_STOW_FEEDRATE, { 210, 114, 20 } } + #endif + #ifndef MAG_MOUNTED_STOW_5 + #define MAG_MOUNTED_STOW_5 { PROBE_STOW_FEEDRATE, { 0, 0, 0 } } + #endif +#endif +#if ENABLED(DUET_SMART_EFFECTOR) + #ifndef SMART_EFFECTOR_MOD_PIN + #define SMART_EFFECTOR_MOD_PIN -1 + #endif +#endif +#if ENABLED(Z_PROBE_ALLEN_KEY) + #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_1 + #define Z_PROBE_ALLEN_KEY_DEPLOY_1 { 30.0, PRINTABLE_RADIUS, 100.0 } + #endif + #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE + #define Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE XY_PROBE_FEEDRATE + #endif + #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_2 + #define Z_PROBE_ALLEN_KEY_DEPLOY_2 { 0.0, PRINTABLE_RADIUS, 100.0 } + #endif + #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE + #define Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE (XY_PROBE_FEEDRATE)/10 + #endif + #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_3 + #define Z_PROBE_ALLEN_KEY_DEPLOY_3 { 0.0, (PRINTABLE_RADIUS) * 0.75, 100.0 } + #endif + #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE + #define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE XY_PROBE_FEEDRATE + #endif + #ifndef Z_PROBE_ALLEN_KEY_STOW_1 + #define Z_PROBE_ALLEN_KEY_STOW_1 { -64.0, 56.0, 23.0 } + #endif + #ifndef Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE + #define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE XY_PROBE_FEEDRATE + #endif + #ifndef Z_PROBE_ALLEN_KEY_STOW_2 + #define Z_PROBE_ALLEN_KEY_STOW_2 { -64.0, 56.0, 3.0 } + #endif + #ifndef Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE + #define Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE (XY_PROBE_FEEDRATE)/10 + #endif + #ifndef Z_PROBE_ALLEN_KEY_STOW_3 + #define Z_PROBE_ALLEN_KEY_STOW_3 { -64.0, 56.0, 50.0 } + #endif + #ifndef Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE + #define Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE XY_PROBE_FEEDRATE + #endif + #ifndef Z_PROBE_ALLEN_KEY_STOW_4 + #define Z_PROBE_ALLEN_KEY_STOW_4 { 0.0, 0.0, 50.0 } + #endif + #ifndef Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE + #define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE XY_PROBE_FEEDRATE + #endif +#endif +#ifndef NOZZLE_TO_PROBE_OFFSET + #define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 } +#endif +#ifndef PROBING_TOOL + #define PROBING_TOOL 0 +#endif +#ifndef PROBING_MARGIN + #define PROBING_MARGIN 10 +#endif +#ifndef XY_PROBE_FEEDRATE + #define XY_PROBE_FEEDRATE (133*60) +#endif +#ifndef Z_PROBE_FEEDRATE_FAST + #define Z_PROBE_FEEDRATE_FAST (4*60) +#endif +#ifndef Z_PROBE_FEEDRATE_SLOW + #define Z_PROBE_FEEDRATE_SLOW (Z_PROBE_FEEDRATE_FAST / 2) +#endif +#if ENABLED(PROBE_ACTIVATION_SWITCH) + #ifndef PROBE_ACTIVATION_SWITCH_STATE + #define PROBE_ACTIVATION_SWITCH_STATE LOW + #endif +#endif +#if ENABLED(PROBE_TARE) + #ifndef PROBE_TARE_TIME + #define PROBE_TARE_TIME 200 + #endif + #ifndef PROBE_TARE_DELAY + #define PROBE_TARE_DELAY 200 + #endif + #ifndef PROBE_TARE_STATE + #define PROBE_TARE_STATE HIGH + #endif +#endif +#ifndef Z_CLEARANCE_DEPLOY_PROBE + #define Z_CLEARANCE_DEPLOY_PROBE 10 +#endif +#ifndef Z_CLEARANCE_BETWEEN_PROBES + #define Z_CLEARANCE_BETWEEN_PROBES 5 +#endif +#ifndef Z_CLEARANCE_MULTI_PROBE + #define Z_CLEARANCE_MULTI_PROBE 5 +#endif +#ifndef Z_PROBE_ERROR_TOLERANCE + #define Z_PROBE_ERROR_TOLERANCE 3 +#endif +#ifndef Z_PROBE_LOW_POINT + #define Z_PROBE_LOW_POINT -2 +#endif +#if ENABLED(PREHEAT_BEFORE_PROBING) + #ifndef PROBING_NOZZLE_TEMP + #define PROBING_NOZZLE_TEMP 120 + #endif + #ifndef PROBING_BED_TEMP + #define PROBING_BED_TEMP 50 + #endif +#endif +#ifndef X_ENABLE_ON + #define X_ENABLE_ON 0 +#endif +#ifndef Y_ENABLE_ON + #define Y_ENABLE_ON 0 +#endif +#ifndef Z_ENABLE_ON + #define Z_ENABLE_ON 0 +#endif +#ifndef E_ENABLE_ON + #define E_ENABLE_ON 0 +#endif +#ifndef DISABLE_OTHER_EXTRUDERS + #define DISABLE_OTHER_EXTRUDERS +#endif +#ifndef INVERT_X_DIR + #define INVERT_X_DIR false +#endif +#ifndef INVERT_Y_DIR + #define INVERT_Y_DIR true +#endif +#ifndef INVERT_Z_DIR + #define INVERT_Z_DIR false +#endif +#ifndef INVERT_E0_DIR + #define INVERT_E0_DIR false +#endif +#ifndef INVERT_E1_DIR + #define INVERT_E1_DIR false +#endif +#ifndef INVERT_E2_DIR + #define INVERT_E2_DIR false +#endif +#ifndef INVERT_E3_DIR + #define INVERT_E3_DIR false +#endif +#ifndef INVERT_E4_DIR + #define INVERT_E4_DIR false +#endif +#ifndef INVERT_E5_DIR + #define INVERT_E5_DIR false +#endif +#ifndef INVERT_E6_DIR + #define INVERT_E6_DIR false +#endif +#ifndef INVERT_E7_DIR + #define INVERT_E7_DIR false +#endif +#ifndef X_HOME_DIR + #define X_HOME_DIR -1 +#endif +#ifndef Y_HOME_DIR + #define Y_HOME_DIR -1 +#endif +#ifndef Z_HOME_DIR + #define Z_HOME_DIR -1 +#endif +#ifndef X_BED_SIZE + #define X_BED_SIZE 200 +#endif +#ifndef Y_BED_SIZE + #define Y_BED_SIZE 200 +#endif +#ifndef X_MIN_POS + #define X_MIN_POS 0 +#endif +#ifndef Y_MIN_POS + #define Y_MIN_POS 0 +#endif +#ifndef Z_MIN_POS + #define Z_MIN_POS 0 +#endif +#ifndef X_MAX_POS + #define X_MAX_POS X_BED_SIZE +#endif +#ifndef Y_MAX_POS + #define Y_MAX_POS Y_BED_SIZE +#endif +#ifndef Z_MAX_POS + #define Z_MAX_POS 200 +#endif +#ifndef MIN_SOFTWARE_ENDSTOPS + #define MIN_SOFTWARE_ENDSTOPS +#endif +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #ifndef MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_X + #endif + #ifndef MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Y + #endif + #ifndef MIN_SOFTWARE_ENDSTOP_Z + #define MIN_SOFTWARE_ENDSTOP_Z + #endif + #ifndef MIN_SOFTWARE_ENDSTOP_I + #define MIN_SOFTWARE_ENDSTOP_I + #endif + #ifndef MIN_SOFTWARE_ENDSTOP_J + #define MIN_SOFTWARE_ENDSTOP_J + #endif + #ifndef MIN_SOFTWARE_ENDSTOP_K + #define MIN_SOFTWARE_ENDSTOP_K + #endif + #ifndef MIN_SOFTWARE_ENDSTOP_U + #define MIN_SOFTWARE_ENDSTOP_U + #endif + #ifndef MIN_SOFTWARE_ENDSTOP_V + #define MIN_SOFTWARE_ENDSTOP_V + #endif + #ifndef MIN_SOFTWARE_ENDSTOP_W + #define MIN_SOFTWARE_ENDSTOP_W + #endif +#endif +#ifndef MAX_SOFTWARE_ENDSTOPS + #define MAX_SOFTWARE_ENDSTOPS +#endif +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #ifndef MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_X + #endif + #ifndef MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Y + #endif + #ifndef MAX_SOFTWARE_ENDSTOP_Z + #define MAX_SOFTWARE_ENDSTOP_Z + #endif + #ifndef MAX_SOFTWARE_ENDSTOP_I + #define MAX_SOFTWARE_ENDSTOP_I + #endif + #ifndef MAX_SOFTWARE_ENDSTOP_J + #define MAX_SOFTWARE_ENDSTOP_J + #endif + #ifndef MAX_SOFTWARE_ENDSTOP_K + #define MAX_SOFTWARE_ENDSTOP_K + #endif + #ifndef MAX_SOFTWARE_ENDSTOP_U + #define MAX_SOFTWARE_ENDSTOP_U + #endif + #ifndef MAX_SOFTWARE_ENDSTOP_V + #define MAX_SOFTWARE_ENDSTOP_V + #endif + #ifndef MAX_SOFTWARE_ENDSTOP_W + #define MAX_SOFTWARE_ENDSTOP_W + #endif +#endif +#if ENABLED(FILAMENT_RUNOUT_SENSOR) + #ifndef FIL_RUNOUT_ENABLED_DEFAULT + #define FIL_RUNOUT_ENABLED_DEFAULT true + #endif + #ifndef NUM_RUNOUT_SENSORS + #define NUM_RUNOUT_SENSORS 1 + #endif + #ifndef FIL_RUNOUT_STATE + #define FIL_RUNOUT_STATE LOW + #endif + #ifndef FIL_RUNOUT_PULLUP + #define FIL_RUNOUT_PULLUP + #endif + #ifndef FILAMENT_RUNOUT_SCRIPT + #define FILAMENT_RUNOUT_SCRIPT "M600" + #endif + #ifdef FILAMENT_RUNOUT_DISTANCE_MM + #if ENABLED(FILAMENT_MOTION_SENSOR) + #if ENABLED(FILAMENT_SWITCH_AND_MOTION) + #ifndef NUM_MOTION_SENSORS + #define NUM_MOTION_SENSORS 1 + #endif + #endif + #endif + #endif +#endif +#if ENABLED(PREHEAT_BEFORE_LEVELING) + #ifndef LEVELING_NOZZLE_TEMP + #define LEVELING_NOZZLE_TEMP 120 + #endif + #ifndef LEVELING_BED_TEMP + #define LEVELING_BED_TEMP 50 + #endif +#endif +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL, PROBE_MANUALLY) + #ifndef MANUAL_PROBE_START_Z + #define MANUAL_PROBE_START_Z 0.2 + #endif +#endif +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) + #ifndef ENABLE_LEVELING_FADE_HEIGHT + #define ENABLE_LEVELING_FADE_HEIGHT + #endif + #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) + #ifndef DEFAULT_LEVELING_FADE_HEIGHT + #define DEFAULT_LEVELING_FADE_HEIGHT 10.0 + #endif + #endif + #ifndef SEGMENT_LEVELED_MOVES + #define SEGMENT_LEVELED_MOVES + #endif + #ifndef LEVELED_SEGMENT_LENGTH + #define LEVELED_SEGMENT_LENGTH 5.0 + #endif + #if ENABLED(G26_MESH_VALIDATION) + #ifndef MESH_TEST_NOZZLE_SIZE + #define MESH_TEST_NOZZLE_SIZE 0.4 + #endif + #ifndef MESH_TEST_LAYER_HEIGHT + #define MESH_TEST_LAYER_HEIGHT 0.2 + #endif + #ifndef MESH_TEST_HOTEND_TEMP + #define MESH_TEST_HOTEND_TEMP 205 + #endif + #ifndef MESH_TEST_BED_TEMP + #define MESH_TEST_BED_TEMP 60 + #endif + #ifndef G26_XY_FEEDRATE + #define G26_XY_FEEDRATE 20 + #endif + #ifndef G26_XY_FEEDRATE_TRAVEL + #define G26_XY_FEEDRATE_TRAVEL 100 + #endif + #ifndef G26_RETRACT_MULTIPLIER + #define G26_RETRACT_MULTIPLIER 1.0 + #endif + #endif +#endif +#if ANY(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) + #ifndef GRID_MAX_POINTS_X + #define GRID_MAX_POINTS_X 3 + #endif + #ifndef GRID_MAX_POINTS_Y + #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X + #endif + #if ENABLED(AUTO_BED_LEVELING_BILINEAR) + #if ENABLED(ABL_BILINEAR_SUBDIVISION) + #ifndef BILINEAR_SUBDIVISIONS + #define BILINEAR_SUBDIVISIONS 3 + #endif + #endif + #endif +#elif ENABLED(AUTO_BED_LEVELING_UBL) + #ifndef MESH_INSET + #define MESH_INSET 1 + #endif + #ifndef GRID_MAX_POINTS_X + #define GRID_MAX_POINTS_X 10 + #endif + #ifndef GRID_MAX_POINTS_Y + #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X + #endif + #ifndef UBL_MESH_EDIT_MOVES_Z + #define UBL_MESH_EDIT_MOVES_Z + #endif + #ifndef UBL_SAVE_ACTIVE_ON_M500 + #define UBL_SAVE_ACTIVE_ON_M500 + #endif + #if ENABLED(AVOID_OBSTACLES) + #ifndef CLIP_W + #define CLIP_W 23 + #endif + #ifndef CLIP_H + #define CLIP_H 14 + #endif + #ifndef OBSTACLE1 + #define OBSTACLE1 { (X_BED_SIZE) / 4 - (CLIP_W) / 2, 0, (X_BED_SIZE) / 4 + (CLIP_W) / 2, CLIP_H } + #endif + #ifndef OBSTACLE2 + #define OBSTACLE2 { (X_BED_SIZE) * 3 / 4 - (CLIP_W) / 2, 0, (X_BED_SIZE) * 3 / 4 + (CLIP_W) / 2, CLIP_H } + #endif + #ifndef OBSTACLE3 + #define OBSTACLE3 { (X_BED_SIZE) / 4 - (CLIP_W) / 2, (Y_BED_SIZE) - (CLIP_H), (X_BED_SIZE) / 4 + (CLIP_W) / 2, Y_BED_SIZE } + #endif + #ifndef OBSTACLE4 + #define OBSTACLE4 { (X_BED_SIZE) * 3 / 4 - (CLIP_W) / 2, (Y_BED_SIZE) - (CLIP_H), (X_BED_SIZE) * 3 / 4 + (CLIP_W) / 2, Y_BED_SIZE } + #endif + #ifndef G29J_MESH_TILT_MARGIN + #define G29J_MESH_TILT_MARGIN ((CLIP_H) + 1) + #endif + #endif +#elif ENABLED(MESH_BED_LEVELING) + #ifndef MESH_INSET + #define MESH_INSET 10 + #endif + #ifndef GRID_MAX_POINTS_X + #define GRID_MAX_POINTS_X 3 + #endif + #ifndef GRID_MAX_POINTS_Y + #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X + #endif +#endif +#if ENABLED(LCD_BED_LEVELING) + #ifndef MESH_EDIT_Z_STEP + #define MESH_EDIT_Z_STEP 0.025 + #endif + #ifndef LCD_PROBE_Z_RANGE + #define LCD_PROBE_Z_RANGE 4 + #endif +#endif +#if ENABLED(LCD_BED_TRAMMING) + #ifndef BED_TRAMMING_INSET_LFRB + #define BED_TRAMMING_INSET_LFRB { 30, 30, 30, 30 } + #endif + #ifndef BED_TRAMMING_HEIGHT + #define BED_TRAMMING_HEIGHT 0.0 + #endif + #ifndef BED_TRAMMING_Z_HOP + #define BED_TRAMMING_Z_HOP 4.0 + #endif + #if ENABLED(BED_TRAMMING_USE_PROBE) + #ifndef BED_TRAMMING_PROBE_TOLERANCE + #define BED_TRAMMING_PROBE_TOLERANCE 0.1 + #endif + #ifndef BED_TRAMMING_VERIFY_RAISED + #define BED_TRAMMING_VERIFY_RAISED + #endif + #endif + #ifndef BED_TRAMMING_LEVELING_ORDER + #define BED_TRAMMING_LEVELING_ORDER { LF, RF, RB, LB } + #endif +#endif +#if ENABLED(Z_SAFE_HOMING) + #ifndef Z_SAFE_HOMING_X_POINT + #define Z_SAFE_HOMING_X_POINT X_CENTER + #endif + #ifndef Z_SAFE_HOMING_Y_POINT + #define Z_SAFE_HOMING_Y_POINT Y_CENTER + #endif +#endif +#ifndef HOMING_FEEDRATE_MM_M + #define HOMING_FEEDRATE_MM_M { (50*60), (50*60), (4*60) } +#endif +#ifndef VALIDATE_HOMING_ENDSTOPS + #define VALIDATE_HOMING_ENDSTOPS +#endif +#if ENABLED(SKEW_CORRECTION) + #ifndef XY_DIAG_AC + #define XY_DIAG_AC 282.8427124746 + #endif + #ifndef XY_DIAG_BD + #define XY_DIAG_BD 282.8427124746 + #endif + #ifndef XY_SIDE_AD + #define XY_SIDE_AD 200 + #endif + #if ENABLED(SKEW_CORRECTION_FOR_Z) + #ifndef XZ_DIAG_AC + #define XZ_DIAG_AC 282.8427124746 + #endif + #ifndef XZ_DIAG_BD + #define XZ_DIAG_BD 282.8427124746 + #endif + #ifndef YZ_DIAG_AC + #define YZ_DIAG_AC 282.8427124746 + #endif + #ifndef YZ_DIAG_BD + #define YZ_DIAG_BD 282.8427124746 + #endif + #ifndef YZ_SIDE_AD + #define YZ_SIDE_AD 200 + #endif + #endif +#endif +#ifndef EEPROM_CHITCHAT + #define EEPROM_CHITCHAT +#endif +#ifndef EEPROM_BOOT_SILENT + #define EEPROM_BOOT_SILENT +#endif +#ifndef HOST_KEEPALIVE_FEATURE + #define HOST_KEEPALIVE_FEATURE +#endif +#ifndef DEFAULT_KEEPALIVE_INTERVAL + #define DEFAULT_KEEPALIVE_INTERVAL 2 +#endif +#ifndef BUSY_WHILE_HEATING + #define BUSY_WHILE_HEATING +#endif +#ifndef PREHEAT_1_LABEL + #define PREHEAT_1_LABEL "PLA" +#endif +#ifndef PREHEAT_1_TEMP_HOTEND + #define PREHEAT_1_TEMP_HOTEND 180 +#endif +#ifndef PREHEAT_1_TEMP_BED + #define PREHEAT_1_TEMP_BED 70 +#endif +#ifndef PREHEAT_1_TEMP_CHAMBER + #define PREHEAT_1_TEMP_CHAMBER 35 +#endif +#ifndef PREHEAT_1_FAN_SPEED + #define PREHEAT_1_FAN_SPEED 0 +#endif +#ifndef PREHEAT_2_LABEL + #define PREHEAT_2_LABEL "ABS" +#endif +#ifndef PREHEAT_2_TEMP_HOTEND + #define PREHEAT_2_TEMP_HOTEND 240 +#endif +#ifndef PREHEAT_2_TEMP_BED + #define PREHEAT_2_TEMP_BED 110 +#endif +#ifndef PREHEAT_2_TEMP_CHAMBER + #define PREHEAT_2_TEMP_CHAMBER 35 +#endif +#ifndef PREHEAT_2_FAN_SPEED + #define PREHEAT_2_FAN_SPEED 0 +#endif +#if ENABLED(NOZZLE_PARK_FEATURE) + #ifndef NOZZLE_PARK_POINT + #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } + #endif + #ifndef NOZZLE_PARK_MOVE + #define NOZZLE_PARK_MOVE 0 + #endif + #ifndef NOZZLE_PARK_Z_RAISE_MIN + #define NOZZLE_PARK_Z_RAISE_MIN 2 + #endif + #ifndef NOZZLE_PARK_XY_FEEDRATE + #define NOZZLE_PARK_XY_FEEDRATE 100 + #endif + #ifndef NOZZLE_PARK_Z_FEEDRATE + #define NOZZLE_PARK_Z_FEEDRATE 5 + #endif +#endif +#if ENABLED(NOZZLE_CLEAN_FEATURE) + #ifndef NOZZLE_CLEAN_PATTERN_LINE + #define NOZZLE_CLEAN_PATTERN_LINE + #endif + #ifndef NOZZLE_CLEAN_PATTERN_ZIGZAG + #define NOZZLE_CLEAN_PATTERN_ZIGZAG + #endif + #ifndef NOZZLE_CLEAN_PATTERN_CIRCLE + #define NOZZLE_CLEAN_PATTERN_CIRCLE + #endif + #ifndef NOZZLE_CLEAN_DEFAULT_PATTERN + #define NOZZLE_CLEAN_DEFAULT_PATTERN 0 + #endif + #ifndef NOZZLE_CLEAN_STROKES + #define NOZZLE_CLEAN_STROKES 12 + #endif + #if ENABLED(NOZZLE_CLEAN_PATTERN_ZIGZAG) + #ifndef NOZZLE_CLEAN_TRIANGLES + #define NOZZLE_CLEAN_TRIANGLES 3 + #endif + #endif + #ifndef NOZZLE_CLEAN_START_POINT + #define NOZZLE_CLEAN_START_POINT { { 30, 30, (Z_MIN_POS + 1) } } + #endif + #ifndef NOZZLE_CLEAN_END_POINT + #define NOZZLE_CLEAN_END_POINT { { 100, 60, (Z_MIN_POS + 1) } } + #endif + #if ENABLED(NOZZLE_CLEAN_PATTERN_CIRCLE) + #ifndef NOZZLE_CLEAN_CIRCLE_RADIUS + #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5 + #endif + #ifndef NOZZLE_CLEAN_CIRCLE_FN + #define NOZZLE_CLEAN_CIRCLE_FN 10 + #endif + #ifndef NOZZLE_CLEAN_CIRCLE_MIDDLE + #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT + #endif + #endif + #ifndef NOZZLE_CLEAN_GOBACK + #define NOZZLE_CLEAN_GOBACK + #endif + #ifndef NOZZLE_CLEAN_MIN_TEMP + #define NOZZLE_CLEAN_MIN_TEMP 170 + #endif +#endif +#ifndef PRINTJOB_TIMER_AUTOSTART + #define PRINTJOB_TIMER_AUTOSTART +#endif +#if ENABLED(PRINTCOUNTER) + #ifndef PRINTCOUNTER_SAVE_INTERVAL + #define PRINTCOUNTER_SAVE_INTERVAL 60 + #endif +#endif +#if ENABLED(PASSWORD_FEATURE) + #ifndef PASSWORD_LENGTH + #define PASSWORD_LENGTH 4 + #endif + #ifndef PASSWORD_ON_STARTUP + #define PASSWORD_ON_STARTUP + #endif + #ifndef PASSWORD_UNLOCK_GCODE + #define PASSWORD_UNLOCK_GCODE + #endif + #ifndef PASSWORD_CHANGE_GCODE + #define PASSWORD_CHANGE_GCODE + #endif +#endif +#ifndef LCD_LANGUAGE + #define LCD_LANGUAGE en +#endif +#ifndef DISPLAY_CHARSET_HD44780 + #define DISPLAY_CHARSET_HD44780 JAPANESE +#endif +#ifndef LCD_INFO_SCREEN_STYLE + #define LCD_INFO_SCREEN_STYLE 0 +#endif +#if ENABLED(ENCODER_NOISE_FILTER) + #ifndef ENCODER_SAMPLES + #define ENCODER_SAMPLES 10 + #endif +#endif +#if ENABLED(SAV_3DGLCD) + #ifndef U8GLIB_SSD1306 + #define U8GLIB_SSD1306 + #endif +#endif +#if DGUS_UI_IS(MKS) + #ifndef USE_MKS_GREEN_UI + #define USE_MKS_GREEN_UI + #endif +#elif DGUS_UI_IS(IA_CREALITY) +#endif +#if ENABLED(TFT_GENERIC) + #ifndef TFT_DRIVER + #define TFT_DRIVER AUTO + #endif +#endif +#if ENABLED(TFT_COLOR_UI) + #ifndef TFT_FONT + #define TFT_FONT NOTOSANS + #endif + #ifndef TFT_THEME + #define TFT_THEME BLACK_MARLIN + #endif + #ifndef COMPACT_MARLIN_BOOT_LOGO + #define COMPACT_MARLIN_BOOT_LOGO + #endif +#endif +#if ENABLED(TOUCH_SCREEN) + #ifndef BUTTON_DELAY_EDIT + #define BUTTON_DELAY_EDIT 50 + #endif + #ifndef BUTTON_DELAY_MENU + #define BUTTON_DELAY_MENU 250 + #endif + #ifndef TOUCH_SCREEN_CALIBRATION + #define TOUCH_SCREEN_CALIBRATION + #endif + #if ALL(TOUCH_SCREEN_CALIBRATION, EEPROM_SETTINGS) + #ifndef TOUCH_CALIBRATION_AUTO_SAVE + #define TOUCH_CALIBRATION_AUTO_SAVE + #endif + #endif +#endif +#ifndef SOFT_PWM_SCALE + #define SOFT_PWM_SCALE 0 +#endif +#if ANY(RGB_LED, RGBW_LED, PCA9632) + #if ENABLED(RGB_STARTUP_TEST) + #ifndef RGB_STARTUP_TEST_INNER_MS + #define RGB_STARTUP_TEST_INNER_MS 10 + #endif + #endif +#endif +#if ENABLED(NEOPIXEL_LED) + #ifndef NEOPIXEL_TYPE + #define NEOPIXEL_TYPE NEO_GRBW + #endif + #ifndef NEOPIXEL_PIXELS + #define NEOPIXEL_PIXELS 30 + #endif + #ifndef NEOPIXEL_IS_SEQUENTIAL + #define NEOPIXEL_IS_SEQUENTIAL + #endif + #ifndef NEOPIXEL_BRIGHTNESS + #define NEOPIXEL_BRIGHTNESS 127 + #endif + #if ENABLED(NEOPIXEL2_SEPARATE) + #ifndef NEOPIXEL2_PIXELS + #define NEOPIXEL2_PIXELS 15 + #endif + #ifndef NEOPIXEL2_BRIGHTNESS + #define NEOPIXEL2_BRIGHTNESS 127 + #endif + #ifndef NEOPIXEL2_STARTUP_TEST + #define NEOPIXEL2_STARTUP_TEST + #endif + #ifndef NEOPIXEL_M150_DEFAULT + #define NEOPIXEL_M150_DEFAULT -1 + #endif + #else + #endif +#endif +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) + #ifndef PRINTER_EVENT_LEDS + #define PRINTER_EVENT_LEDS + #endif +#endif +#ifndef SERVO_DELAY + #define SERVO_DELAY { 300 } +#endif diff --git a/Marlin/src/inc/BaseConfiguration_adv.h b/Marlin/src/inc/BaseConfiguration_adv.h new file mode 100644 index 0000000000..ce038c7553 --- /dev/null +++ b/Marlin/src/inc/BaseConfiguration_adv.h @@ -0,0 +1,2753 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2024 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * BaseConfiguration_adv.h - Generated using makeBaseConfigs.py + */ + +#ifndef CONFIGURATION_ADV_H_VERSION + #define CONFIGURATION_ADV_H_VERSION 02010300 +#endif +#ifndef THERMOCOUPLE_MAX_ERRORS + #define THERMOCOUPLE_MAX_ERRORS 15 +#endif +#if TEMP_SENSOR_0 == 1000 + #ifndef HOTEND0_PULLUP_RESISTOR_OHMS + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 + #endif + #ifndef HOTEND0_RESISTANCE_25C_OHMS + #define HOTEND0_RESISTANCE_25C_OHMS 100000 + #endif + #ifndef HOTEND0_BETA + #define HOTEND0_BETA 3950 + #endif + #ifndef HOTEND0_SH_C_COEFF + #define HOTEND0_SH_C_COEFF 0 + #endif +#endif +#if TEMP_SENSOR_1 == 1000 + #ifndef HOTEND1_PULLUP_RESISTOR_OHMS + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 + #endif + #ifndef HOTEND1_RESISTANCE_25C_OHMS + #define HOTEND1_RESISTANCE_25C_OHMS 100000 + #endif + #ifndef HOTEND1_BETA + #define HOTEND1_BETA 3950 + #endif + #ifndef HOTEND1_SH_C_COEFF + #define HOTEND1_SH_C_COEFF 0 + #endif +#endif +#if TEMP_SENSOR_2 == 1000 + #ifndef HOTEND2_PULLUP_RESISTOR_OHMS + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 + #endif + #ifndef HOTEND2_RESISTANCE_25C_OHMS + #define HOTEND2_RESISTANCE_25C_OHMS 100000 + #endif + #ifndef HOTEND2_BETA + #define HOTEND2_BETA 3950 + #endif + #ifndef HOTEND2_SH_C_COEFF + #define HOTEND2_SH_C_COEFF 0 + #endif +#endif +#if TEMP_SENSOR_3 == 1000 + #ifndef HOTEND3_PULLUP_RESISTOR_OHMS + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 + #endif + #ifndef HOTEND3_RESISTANCE_25C_OHMS + #define HOTEND3_RESISTANCE_25C_OHMS 100000 + #endif + #ifndef HOTEND3_BETA + #define HOTEND3_BETA 3950 + #endif + #ifndef HOTEND3_SH_C_COEFF + #define HOTEND3_SH_C_COEFF 0 + #endif +#endif +#if TEMP_SENSOR_4 == 1000 + #ifndef HOTEND4_PULLUP_RESISTOR_OHMS + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 + #endif + #ifndef HOTEND4_RESISTANCE_25C_OHMS + #define HOTEND4_RESISTANCE_25C_OHMS 100000 + #endif + #ifndef HOTEND4_BETA + #define HOTEND4_BETA 3950 + #endif + #ifndef HOTEND4_SH_C_COEFF + #define HOTEND4_SH_C_COEFF 0 + #endif +#endif +#if TEMP_SENSOR_5 == 1000 + #ifndef HOTEND5_PULLUP_RESISTOR_OHMS + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 + #endif + #ifndef HOTEND5_RESISTANCE_25C_OHMS + #define HOTEND5_RESISTANCE_25C_OHMS 100000 + #endif + #ifndef HOTEND5_BETA + #define HOTEND5_BETA 3950 + #endif + #ifndef HOTEND5_SH_C_COEFF + #define HOTEND5_SH_C_COEFF 0 + #endif +#endif +#if TEMP_SENSOR_6 == 1000 + #ifndef HOTEND6_PULLUP_RESISTOR_OHMS + #define HOTEND6_PULLUP_RESISTOR_OHMS 4700 + #endif + #ifndef HOTEND6_RESISTANCE_25C_OHMS + #define HOTEND6_RESISTANCE_25C_OHMS 100000 + #endif + #ifndef HOTEND6_BETA + #define HOTEND6_BETA 3950 + #endif + #ifndef HOTEND6_SH_C_COEFF + #define HOTEND6_SH_C_COEFF 0 + #endif +#endif +#if TEMP_SENSOR_7 == 1000 + #ifndef HOTEND7_PULLUP_RESISTOR_OHMS + #define HOTEND7_PULLUP_RESISTOR_OHMS 4700 + #endif + #ifndef HOTEND7_RESISTANCE_25C_OHMS + #define HOTEND7_RESISTANCE_25C_OHMS 100000 + #endif + #ifndef HOTEND7_BETA + #define HOTEND7_BETA 3950 + #endif + #ifndef HOTEND7_SH_C_COEFF + #define HOTEND7_SH_C_COEFF 0 + #endif +#endif +#if TEMP_SENSOR_BED == 1000 + #ifndef BED_PULLUP_RESISTOR_OHMS + #define BED_PULLUP_RESISTOR_OHMS 4700 + #endif + #ifndef BED_RESISTANCE_25C_OHMS + #define BED_RESISTANCE_25C_OHMS 100000 + #endif + #ifndef BED_BETA + #define BED_BETA 3950 + #endif + #ifndef BED_SH_C_COEFF + #define BED_SH_C_COEFF 0 + #endif +#endif +#if TEMP_SENSOR_CHAMBER == 1000 + #ifndef CHAMBER_PULLUP_RESISTOR_OHMS + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 + #endif + #ifndef CHAMBER_RESISTANCE_25C_OHMS + #define CHAMBER_RESISTANCE_25C_OHMS 100000 + #endif + #ifndef CHAMBER_BETA + #define CHAMBER_BETA 3950 + #endif + #ifndef CHAMBER_SH_C_COEFF + #define CHAMBER_SH_C_COEFF 0 + #endif +#endif +#if TEMP_SENSOR_COOLER == 1000 + #ifndef COOLER_PULLUP_RESISTOR_OHMS + #define COOLER_PULLUP_RESISTOR_OHMS 4700 + #endif + #ifndef COOLER_RESISTANCE_25C_OHMS + #define COOLER_RESISTANCE_25C_OHMS 100000 + #endif + #ifndef COOLER_BETA + #define COOLER_BETA 3950 + #endif + #ifndef COOLER_SH_C_COEFF + #define COOLER_SH_C_COEFF 0 + #endif +#endif +#if TEMP_SENSOR_PROBE == 1000 + #ifndef PROBE_PULLUP_RESISTOR_OHMS + #define PROBE_PULLUP_RESISTOR_OHMS 4700 + #endif + #ifndef PROBE_RESISTANCE_25C_OHMS + #define PROBE_RESISTANCE_25C_OHMS 100000 + #endif + #ifndef PROBE_BETA + #define PROBE_BETA 3950 + #endif + #ifndef PROBE_SH_C_COEFF + #define PROBE_SH_C_COEFF 0 + #endif +#endif +#if TEMP_SENSOR_BOARD == 1000 + #ifndef BOARD_PULLUP_RESISTOR_OHMS + #define BOARD_PULLUP_RESISTOR_OHMS 4700 + #endif + #ifndef BOARD_RESISTANCE_25C_OHMS + #define BOARD_RESISTANCE_25C_OHMS 100000 + #endif + #ifndef BOARD_BETA + #define BOARD_BETA 3950 + #endif + #ifndef BOARD_SH_C_COEFF + #define BOARD_SH_C_COEFF 0 + #endif +#endif +#if TEMP_SENSOR_REDUNDANT == 1000 + #ifndef REDUNDANT_PULLUP_RESISTOR_OHMS + #define REDUNDANT_PULLUP_RESISTOR_OHMS 4700 + #endif + #ifndef REDUNDANT_RESISTANCE_25C_OHMS + #define REDUNDANT_RESISTANCE_25C_OHMS 100000 + #endif + #ifndef REDUNDANT_BETA + #define REDUNDANT_BETA 3950 + #endif + #ifndef REDUNDANT_SH_C_COEFF + #define REDUNDANT_SH_C_COEFF 0 + #endif +#endif +#if ENABLED(HEPHESTOS2_HEATED_BED_KIT) + #ifndef HEATER_BED_INVERTING + #define HEATER_BED_INVERTING true + #endif +#endif +#if DISABLED(PIDTEMPBED) + #ifndef BED_CHECK_INTERVAL + #define BED_CHECK_INTERVAL 5000 + #endif + #if ENABLED(BED_LIMIT_SWITCHING) + #ifndef BED_HYSTERESIS + #define BED_HYSTERESIS 2 + #endif + #endif +#endif +#if DISABLED(PIDTEMPCHAMBER) + #ifndef CHAMBER_CHECK_INTERVAL + #define CHAMBER_CHECK_INTERVAL 5000 + #endif + #if ENABLED(CHAMBER_LIMIT_SWITCHING) + #ifndef CHAMBER_HYSTERESIS + #define CHAMBER_HYSTERESIS 2 + #endif + #endif +#endif +#if TEMP_SENSOR_CHAMBER + #if ENABLED(CHAMBER_FAN) + #ifndef CHAMBER_FAN_MODE + #define CHAMBER_FAN_MODE 2 + #endif + #if CHAMBER_FAN_MODE == 0 + #ifndef CHAMBER_FAN_BASE + #define CHAMBER_FAN_BASE 255 + #endif + #elif CHAMBER_FAN_MODE == 1 + #ifndef CHAMBER_FAN_BASE + #define CHAMBER_FAN_BASE 128 + #endif + #ifndef CHAMBER_FAN_FACTOR + #define CHAMBER_FAN_FACTOR 25 + #endif + #elif CHAMBER_FAN_MODE == 2 + #ifndef CHAMBER_FAN_BASE + #define CHAMBER_FAN_BASE 128 + #endif + #ifndef CHAMBER_FAN_FACTOR + #define CHAMBER_FAN_FACTOR 25 + #endif + #elif CHAMBER_FAN_MODE == 3 + #ifndef CHAMBER_FAN_BASE + #define CHAMBER_FAN_BASE 128 + #endif + #ifndef CHAMBER_FAN_FACTOR + #define CHAMBER_FAN_FACTOR 25 + #endif + #endif + #endif + #if ENABLED(CHAMBER_VENT) + #ifndef CHAMBER_VENT_SERVO_NR + #define CHAMBER_VENT_SERVO_NR 1 + #endif + #ifndef HIGH_EXCESS_HEAT_LIMIT + #define HIGH_EXCESS_HEAT_LIMIT 5 + #endif + #ifndef LOW_EXCESS_HEAT_LIMIT + #define LOW_EXCESS_HEAT_LIMIT 3 + #endif + #ifndef MIN_COOLING_SLOPE_TIME_CHAMBER_VENT + #define MIN_COOLING_SLOPE_TIME_CHAMBER_VENT 20 + #endif + #ifndef MIN_COOLING_SLOPE_DEG_CHAMBER_VENT + #define MIN_COOLING_SLOPE_DEG_CHAMBER_VENT 1.5 + #endif + #endif +#endif +#if TEMP_SENSOR_COOLER + #ifndef COOLER_MINTEMP + #define COOLER_MINTEMP 8 + #endif + #ifndef COOLER_MAXTEMP + #define COOLER_MAXTEMP 26 + #endif + #ifndef COOLER_DEFAULT_TEMP + #define COOLER_DEFAULT_TEMP 16 + #endif + #ifndef TEMP_COOLER_HYSTERESIS + #define TEMP_COOLER_HYSTERESIS 1 + #endif + #ifndef COOLER_PIN + #define COOLER_PIN 8 + #endif + #ifndef COOLER_INVERTING + #define COOLER_INVERTING false + #endif + #ifndef TEMP_COOLER_PIN + #define TEMP_COOLER_PIN 15 + #endif + #ifndef COOLER_FAN + #define COOLER_FAN + #endif + #ifndef COOLER_FAN_INDEX + #define COOLER_FAN_INDEX 0 + #endif + #if ENABLED(COOLER_FAN) + #ifndef COOLER_FAN_BASE + #define COOLER_FAN_BASE 100 + #endif + #ifndef COOLER_FAN_FACTOR + #define COOLER_FAN_FACTOR 25 + #endif + #endif +#endif +#if TEMP_SENSOR_BOARD + #ifndef THERMAL_PROTECTION_BOARD + #define THERMAL_PROTECTION_BOARD + #endif + #ifndef BOARD_MINTEMP + #define BOARD_MINTEMP 8 + #endif + #ifndef BOARD_MAXTEMP + #define BOARD_MAXTEMP 70 + #endif +#endif +#if TEMP_SENSOR_SOC + #ifndef THERMAL_PROTECTION_SOC + #define THERMAL_PROTECTION_SOC + #endif + #ifndef SOC_MAXTEMP + #define SOC_MAXTEMP 85 + #endif +#endif +#if ALL(HAS_HOTEND, THERMAL_PROTECTION_HOTENDS) + #ifndef THERMAL_PROTECTION_PERIOD + #define THERMAL_PROTECTION_PERIOD 40 + #endif + #ifndef THERMAL_PROTECTION_HYSTERESIS + #define THERMAL_PROTECTION_HYSTERESIS 4 + #endif + #ifndef WATCH_TEMP_PERIOD + #define WATCH_TEMP_PERIOD 40 + #endif + #ifndef WATCH_TEMP_INCREASE + #define WATCH_TEMP_INCREASE 2 + #endif +#endif +#if TEMP_SENSOR_BED && ENABLED(THERMAL_PROTECTION_BED) + #ifndef THERMAL_PROTECTION_BED_PERIOD + #define THERMAL_PROTECTION_BED_PERIOD 20 + #endif + #ifndef THERMAL_PROTECTION_BED_HYSTERESIS + #define THERMAL_PROTECTION_BED_HYSTERESIS 2 + #endif + #ifndef WATCH_BED_TEMP_PERIOD + #define WATCH_BED_TEMP_PERIOD 60 + #endif + #ifndef WATCH_BED_TEMP_INCREASE + #define WATCH_BED_TEMP_INCREASE 2 + #endif +#endif +#if TEMP_SENSOR_CHAMBER && ENABLED(THERMAL_PROTECTION_CHAMBER) + #ifndef THERMAL_PROTECTION_CHAMBER_PERIOD + #define THERMAL_PROTECTION_CHAMBER_PERIOD 20 + #endif + #ifndef THERMAL_PROTECTION_CHAMBER_HYSTERESIS + #define THERMAL_PROTECTION_CHAMBER_HYSTERESIS 2 + #endif + #ifndef WATCH_CHAMBER_TEMP_PERIOD + #define WATCH_CHAMBER_TEMP_PERIOD 60 + #endif + #ifndef WATCH_CHAMBER_TEMP_INCREASE + #define WATCH_CHAMBER_TEMP_INCREASE 2 + #endif +#endif +#if TEMP_SENSOR_COOLER && ENABLED(THERMAL_PROTECTION_COOLER) + #ifndef THERMAL_PROTECTION_COOLER_PERIOD + #define THERMAL_PROTECTION_COOLER_PERIOD 10 + #endif + #ifndef THERMAL_PROTECTION_COOLER_HYSTERESIS + #define THERMAL_PROTECTION_COOLER_HYSTERESIS 3 + #endif + #ifndef WATCH_COOLER_TEMP_PERIOD + #define WATCH_COOLER_TEMP_PERIOD 60 + #endif + #ifndef WATCH_COOLER_TEMP_INCREASE + #define WATCH_COOLER_TEMP_INCREASE 3 + #endif +#endif +#if ENABLED(PIDTEMP) + #if ENABLED(PID_EXTRUSION_SCALING) + #ifndef DEFAULT_Kc + #define DEFAULT_Kc (100) + #endif + #ifndef LPQ_MAX_LEN + #define LPQ_MAX_LEN 50 + #endif + #endif + #if ENABLED(PID_FAN_SCALING) + #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION) + #ifndef PID_FAN_SCALING_AT_FULL_SPEED + #define PID_FAN_SCALING_AT_FULL_SPEED 13.0 + #endif + #ifndef PID_FAN_SCALING_AT_MIN_SPEED + #define PID_FAN_SCALING_AT_MIN_SPEED 6.0 + #endif + #ifndef PID_FAN_SCALING_MIN_SPEED + #define PID_FAN_SCALING_MIN_SPEED 10.0 + #endif + #ifndef DEFAULT_Kf + #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED) + #endif + #ifndef PID_FAN_SCALING_LIN_FACTOR + #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0 + #endif + #else + #ifndef PID_FAN_SCALING_LIN_FACTOR + #define PID_FAN_SCALING_LIN_FACTOR (0) + #endif + #ifndef DEFAULT_Kf + #define DEFAULT_Kf 10 + #endif + #ifndef PID_FAN_SCALING_MIN_SPEED + #define PID_FAN_SCALING_MIN_SPEED 10 + #endif + #endif + #endif +#endif +#ifndef AUTOTEMP + #define AUTOTEMP +#endif +#if ENABLED(AUTOTEMP) + #ifndef AUTOTEMP_OLDWEIGHT + #define AUTOTEMP_OLDWEIGHT 0.98 + #endif + #ifndef AUTOTEMP_MIN + #define AUTOTEMP_MIN 210 + #endif + #ifndef AUTOTEMP_MAX + #define AUTOTEMP_MAX 250 + #endif + #ifndef AUTOTEMP_FACTOR + #define AUTOTEMP_FACTOR 0.1f + #endif + #if ENABLED(AUTOTEMP_PROPORTIONAL) + #ifndef AUTOTEMP_MIN_P + #define AUTOTEMP_MIN_P 0 + #endif + #ifndef AUTOTEMP_MAX_P + #define AUTOTEMP_MAX_P 5 + #endif + #ifndef AUTOTEMP_FACTOR_P + #define AUTOTEMP_FACTOR_P 1 + #endif + #endif +#endif +#if ENABLED(EXTRUDER_RUNOUT_PREVENT) + #ifndef EXTRUDER_RUNOUT_MINTEMP + #define EXTRUDER_RUNOUT_MINTEMP 190 + #endif + #ifndef EXTRUDER_RUNOUT_SECONDS + #define EXTRUDER_RUNOUT_SECONDS 30 + #endif + #ifndef EXTRUDER_RUNOUT_SPEED + #define EXTRUDER_RUNOUT_SPEED 1500 + #endif + #ifndef EXTRUDER_RUNOUT_EXTRUDE + #define EXTRUDER_RUNOUT_EXTRUDE 5 + #endif +#endif +#if ENABLED(HOTEND_IDLE_TIMEOUT) + #ifndef HOTEND_IDLE_TIMEOUT_SEC + #define HOTEND_IDLE_TIMEOUT_SEC (5*60) + #endif + #ifndef HOTEND_IDLE_MIN_TRIGGER + #define HOTEND_IDLE_MIN_TRIGGER 180 + #endif + #ifndef HOTEND_IDLE_NOZZLE_TARGET + #define HOTEND_IDLE_NOZZLE_TARGET 0 + #endif + #ifndef HOTEND_IDLE_BED_TARGET + #define HOTEND_IDLE_BED_TARGET 0 + #endif +#endif +#ifndef TEMP_SENSOR_AD595_OFFSET + #define TEMP_SENSOR_AD595_OFFSET 0.0 +#endif +#ifndef TEMP_SENSOR_AD595_GAIN + #define TEMP_SENSOR_AD595_GAIN 1.0 +#endif +#ifndef TEMP_SENSOR_AD8495_OFFSET + #define TEMP_SENSOR_AD8495_OFFSET 0.0 +#endif +#ifndef TEMP_SENSOR_AD8495_GAIN + #define TEMP_SENSOR_AD8495_GAIN 1.0 +#endif +#if ENABLED(USE_CONTROLLER_FAN) + #ifndef CONTROLLERFAN_SPEED_MIN + #define CONTROLLERFAN_SPEED_MIN 0 + #endif + #ifndef CONTROLLERFAN_SPEED_ACTIVE + #define CONTROLLERFAN_SPEED_ACTIVE 255 + #endif + #ifndef CONTROLLERFAN_SPEED_IDLE + #define CONTROLLERFAN_SPEED_IDLE 0 + #endif + #ifndef CONTROLLERFAN_IDLE_TIME + #define CONTROLLERFAN_IDLE_TIME 60 + #endif + #if ENABLED(CONTROLLER_FAN_EDITABLE) + #ifndef CONTROLLER_FAN_MENU + #define CONTROLLER_FAN_MENU + #endif + #endif +#endif +#if ENABLED(FAST_PWM_FAN) + #ifndef FAST_PWM_FAN_FREQUENCY + #ifdef __AVR__ + #ifndef FAST_PWM_FAN_FREQUENCY + #define FAST_PWM_FAN_FREQUENCY ((F_CPU) / (2 * 255 * 1)) + #endif + #else + #ifndef FAST_PWM_FAN_FREQUENCY + #define FAST_PWM_FAN_FREQUENCY 1000U + #endif + #endif + #endif +#endif +#ifndef E0_AUTO_FAN_PIN + #define E0_AUTO_FAN_PIN -1 +#endif +#ifndef E1_AUTO_FAN_PIN + #define E1_AUTO_FAN_PIN -1 +#endif +#ifndef E2_AUTO_FAN_PIN + #define E2_AUTO_FAN_PIN -1 +#endif +#ifndef E3_AUTO_FAN_PIN + #define E3_AUTO_FAN_PIN -1 +#endif +#ifndef E4_AUTO_FAN_PIN + #define E4_AUTO_FAN_PIN -1 +#endif +#ifndef E5_AUTO_FAN_PIN + #define E5_AUTO_FAN_PIN -1 +#endif +#ifndef E6_AUTO_FAN_PIN + #define E6_AUTO_FAN_PIN -1 +#endif +#ifndef E7_AUTO_FAN_PIN + #define E7_AUTO_FAN_PIN -1 +#endif +#ifndef CHAMBER_AUTO_FAN_PIN + #define CHAMBER_AUTO_FAN_PIN -1 +#endif +#ifndef COOLER_AUTO_FAN_PIN + #define COOLER_AUTO_FAN_PIN -1 +#endif +#ifndef EXTRUDER_AUTO_FAN_TEMPERATURE + #define EXTRUDER_AUTO_FAN_TEMPERATURE 50 +#endif +#ifndef EXTRUDER_AUTO_FAN_SPEED + #define EXTRUDER_AUTO_FAN_SPEED 255 +#endif +#ifndef CHAMBER_AUTO_FAN_TEMPERATURE + #define CHAMBER_AUTO_FAN_TEMPERATURE 30 +#endif +#ifndef CHAMBER_AUTO_FAN_SPEED + #define CHAMBER_AUTO_FAN_SPEED 255 +#endif +#ifndef COOLER_AUTO_FAN_TEMPERATURE + #define COOLER_AUTO_FAN_TEMPERATURE 18 +#endif +#ifndef COOLER_AUTO_FAN_SPEED + #define COOLER_AUTO_FAN_SPEED 255 +#endif +#ifndef FANMUX0_PIN + #define FANMUX0_PIN -1 +#endif +#ifndef FANMUX1_PIN + #define FANMUX1_PIN -1 +#endif +#ifndef FANMUX2_PIN + #define FANMUX2_PIN -1 +#endif +#if ENABLED(CASE_LIGHT_ENABLE) + #ifndef INVERT_CASE_LIGHT + #define INVERT_CASE_LIGHT false + #endif + #ifndef CASE_LIGHT_DEFAULT_ON + #define CASE_LIGHT_DEFAULT_ON true + #endif + #ifndef CASE_LIGHT_DEFAULT_BRIGHTNESS + #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 + #endif + #if ANY(CASE_LIGHT_USE_NEOPIXEL, CASE_LIGHT_USE_RGB_LED) + #ifndef CASE_LIGHT_DEFAULT_COLOR + #define CASE_LIGHT_DEFAULT_COLOR { 255, 255, 255, 255 } + #endif + #endif +#endif +#if ENABLED(DUAL_X_CARRIAGE) + #ifndef X1_MIN_POS + #define X1_MIN_POS X_MIN_POS + #endif + #ifndef X1_MAX_POS + #define X1_MAX_POS X_BED_SIZE + #endif + #ifndef X2_MIN_POS + #define X2_MIN_POS 80 + #endif + #ifndef X2_MAX_POS + #define X2_MAX_POS 353 + #endif + #ifndef X2_HOME_POS + #define X2_HOME_POS X2_MAX_POS + #endif + #ifndef DEFAULT_DUAL_X_CARRIAGE_MODE + #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE + #endif + #ifndef DEFAULT_DUPLICATION_X_OFFSET + #define DEFAULT_DUPLICATION_X_OFFSET 100 + #endif +#endif +#if HAS_X2_STEPPER && DISABLED(DUAL_X_CARRIAGE) + #if ENABLED(X_DUAL_ENDSTOPS) + #ifndef X2_ENDSTOP_ADJUSTMENT + #define X2_ENDSTOP_ADJUSTMENT 0 + #endif + #endif +#endif +#if HAS_Y2_STEPPER + #if ENABLED(Y_DUAL_ENDSTOPS) + #ifndef Y2_ENDSTOP_ADJUSTMENT + #define Y2_ENDSTOP_ADJUSTMENT 0 + #endif + #endif +#endif +#ifdef Z2_DRIVER_TYPE + #if ENABLED(Z_MULTI_ENDSTOPS) + #ifndef Z2_ENDSTOP_ADJUSTMENT + #define Z2_ENDSTOP_ADJUSTMENT 0 + #endif + #endif + #ifdef Z3_DRIVER_TYPE + #if ENABLED(Z_MULTI_ENDSTOPS) + #ifndef Z3_ENDSTOP_ADJUSTMENT + #define Z3_ENDSTOP_ADJUSTMENT 0 + #endif + #endif + #endif + #ifdef Z4_DRIVER_TYPE + #if ENABLED(Z_MULTI_ENDSTOPS) + #ifndef Z4_ENDSTOP_ADJUSTMENT + #define Z4_ENDSTOP_ADJUSTMENT 0 + #endif + #endif + #endif +#endif +#ifndef HOMING_BUMP_MM + #define HOMING_BUMP_MM { 5, 5, 2 } +#endif +#ifndef HOMING_BUMP_DIVISOR + #define HOMING_BUMP_DIVISOR { 2, 2, 4 } +#endif +#if ENABLED(BLTOUCH) + #ifdef BLTOUCH_HS_MODE + #ifndef BLTOUCH_HS_EXTRA_CLEARANCE + #define BLTOUCH_HS_EXTRA_CLEARANCE 7 + #endif + #endif +#endif +#if ENABLED(Z_STEPPER_AUTO_ALIGN) + #ifndef Z_STEPPER_ALIGN_STEPPER_XY + #ifndef Z_STEPPER_ALIGN_AMP + #define Z_STEPPER_ALIGN_AMP 1.0 + #endif + #endif + #ifndef G34_MAX_GRADE + #define G34_MAX_GRADE 5 + #endif + #ifndef Z_STEPPER_ALIGN_ITERATIONS + #define Z_STEPPER_ALIGN_ITERATIONS 5 + #endif + #ifndef Z_STEPPER_ALIGN_ACC + #define Z_STEPPER_ALIGN_ACC 0.02 + #endif + #ifndef RESTORE_LEVELING_AFTER_G34 + #define RESTORE_LEVELING_AFTER_G34 + #endif + #ifndef HOME_AFTER_G34 + #define HOME_AFTER_G34 + #endif +#endif +#if ENABLED(ASSISTED_TRAMMING) + #ifndef TRAMMING_POINT_XY + #define TRAMMING_POINT_XY { { 20, 20 }, { 180, 20 }, { 180, 180 }, { 20, 180 } } + #endif + #ifndef TRAMMING_POINT_NAME_1 + #define TRAMMING_POINT_NAME_1 "Front-Left" + #endif + #ifndef TRAMMING_POINT_NAME_2 + #define TRAMMING_POINT_NAME_2 "Front-Right" + #endif + #ifndef TRAMMING_POINT_NAME_3 + #define TRAMMING_POINT_NAME_3 "Back-Right" + #endif + #ifndef TRAMMING_POINT_NAME_4 + #define TRAMMING_POINT_NAME_4 "Back-Left" + #endif + #ifndef RESTORE_LEVELING_AFTER_G35 + #define RESTORE_LEVELING_AFTER_G35 + #endif + #ifndef TRAMMING_SCREW_THREAD + #define TRAMMING_SCREW_THREAD 30 + #endif +#endif +#if ENABLED(FT_MOTION) + #ifndef FTM_DEFAULT_DYNFREQ_MODE + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED + #endif + #ifndef FTM_DEFAULT_SHAPER_X + #define FTM_DEFAULT_SHAPER_X ftMotionShaper_NONE + #endif + #ifndef FTM_DEFAULT_SHAPER_Y + #define FTM_DEFAULT_SHAPER_Y ftMotionShaper_NONE + #endif + #ifndef FTM_SHAPING_DEFAULT_X_FREQ + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f + #endif + #ifndef FTM_SHAPING_DEFAULT_Y_FREQ + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f + #endif + #ifndef FTM_LINEAR_ADV_DEFAULT_ENA + #define FTM_LINEAR_ADV_DEFAULT_ENA false + #endif + #ifndef FTM_LINEAR_ADV_DEFAULT_K + #define FTM_LINEAR_ADV_DEFAULT_K 0 + #endif + #ifndef FTM_SHAPING_ZETA_X + #define FTM_SHAPING_ZETA_X 0.1f + #endif + #ifndef FTM_SHAPING_ZETA_Y + #define FTM_SHAPING_ZETA_Y 0.1f + #endif + #ifndef FTM_SHAPING_V_TOL_X + #define FTM_SHAPING_V_TOL_X 0.05f + #endif + #ifndef FTM_SHAPING_V_TOL_Y + #define FTM_SHAPING_V_TOL_Y 0.05f + #endif + #ifndef FTM_UNIFIED_BWS + #define FTM_UNIFIED_BWS + #endif + #if ENABLED(FTM_UNIFIED_BWS) + #ifndef FTM_BW_SIZE + #define FTM_BW_SIZE 100 + #endif + #else + #ifndef FTM_WINDOW_SIZE + #define FTM_WINDOW_SIZE 200 + #endif + #ifndef FTM_BATCH_SIZE + #define FTM_BATCH_SIZE 100 + #endif + #endif + #ifndef FTM_FS + #define FTM_FS 1000 + #endif + #ifndef FTM_TS + #define FTM_TS 0.001f + #endif + #if DISABLED(COREXY) + #ifndef FTM_STEPPER_FS + #define FTM_STEPPER_FS 20000 + #endif + #ifndef FTM_STEPPERCMD_BUFF_SIZE + #define FTM_STEPPERCMD_BUFF_SIZE 3000 + #endif + #else + #ifndef FTM_STEPPER_FS + #define FTM_STEPPER_FS 30000 + #endif + #ifndef FTM_STEPPERCMD_BUFF_SIZE + #define FTM_STEPPERCMD_BUFF_SIZE 6000 + #endif + #endif + #ifndef FTM_STEPS_PER_UNIT_TIME + #define FTM_STEPS_PER_UNIT_TIME (FTM_STEPPER_FS / FTM_FS) + #endif + #ifndef FTM_CTS_COMPARE_VAL + #define FTM_CTS_COMPARE_VAL (FTM_STEPS_PER_UNIT_TIME / 2) + #endif + #ifndef FTM_MIN_TICKS + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) + #endif + #ifndef FTM_MIN_SHAPE_FREQ + #define FTM_MIN_SHAPE_FREQ 10 + #endif + #ifndef FTM_RATIO + #define FTM_RATIO (FTM_FS / FTM_MIN_SHAPE_FREQ) + #endif + #ifndef FTM_ZMAX + #define FTM_ZMAX (FTM_RATIO * 2) + #endif +#endif +#if ANY(INPUT_SHAPING_X, INPUT_SHAPING_Y, INPUT_SHAPING_Z) + #if ENABLED(INPUT_SHAPING_X) + #ifndef SHAPING_FREQ_X + #define SHAPING_FREQ_X 40.0 + #endif + #ifndef SHAPING_ZETA_X + #define SHAPING_ZETA_X 0.15 + #endif + #endif + #if ENABLED(INPUT_SHAPING_Y) + #ifndef SHAPING_FREQ_Y + #define SHAPING_FREQ_Y 40.0 + #endif + #ifndef SHAPING_ZETA_Y + #define SHAPING_ZETA_Y 0.15 + #endif + #endif + #if ENABLED(INPUT_SHAPING_Z) + #ifndef SHAPING_FREQ_Z + #define SHAPING_FREQ_Z 40.0 + #endif + #ifndef SHAPING_ZETA_Z + #define SHAPING_ZETA_Z 0.15 + #endif + #endif +#endif +#ifndef AXIS_RELATIVE_MODES + #define AXIS_RELATIVE_MODES { false, false, false, false } +#endif +#ifndef STEP_STATE_X + #define STEP_STATE_X HIGH +#endif +#ifndef STEP_STATE_Y + #define STEP_STATE_Y HIGH +#endif +#ifndef STEP_STATE_Z + #define STEP_STATE_Z HIGH +#endif +#ifndef STEP_STATE_I + #define STEP_STATE_I HIGH +#endif +#ifndef STEP_STATE_J + #define STEP_STATE_J HIGH +#endif +#ifndef STEP_STATE_K + #define STEP_STATE_K HIGH +#endif +#ifndef STEP_STATE_U + #define STEP_STATE_U HIGH +#endif +#ifndef STEP_STATE_V + #define STEP_STATE_V HIGH +#endif +#ifndef STEP_STATE_W + #define STEP_STATE_W HIGH +#endif +#ifndef STEP_STATE_E + #define STEP_STATE_E HIGH +#endif +#ifndef DEFAULT_STEPPER_TIMEOUT_SEC + #define DEFAULT_STEPPER_TIMEOUT_SEC 120 +#endif +#ifndef DISABLE_IDLE_X + #define DISABLE_IDLE_X +#endif +#ifndef DISABLE_IDLE_Y + #define DISABLE_IDLE_Y +#endif +#ifndef DISABLE_IDLE_Z + #define DISABLE_IDLE_Z +#endif +#ifndef DISABLE_IDLE_E + #define DISABLE_IDLE_E +#endif +#ifndef DEFAULT_MINIMUMFEEDRATE + #define DEFAULT_MINIMUMFEEDRATE 0.0 +#endif +#ifndef DEFAULT_MINTRAVELFEEDRATE + #define DEFAULT_MINTRAVELFEEDRATE 0.0 +#endif +#ifndef DEFAULT_MINSEGMENTTIME + #define DEFAULT_MINSEGMENTTIME 20000 +#endif +#ifndef SLOWDOWN + #define SLOWDOWN +#endif +#if ENABLED(SLOWDOWN) + #ifndef SLOWDOWN_DIVISOR + #define SLOWDOWN_DIVISOR 2 + #endif +#endif +#ifdef XY_FREQUENCY_LIMIT + #ifndef XY_FREQUENCY_MIN_PERCENT + #define XY_FREQUENCY_MIN_PERCENT 5 + #endif +#endif +#if ENABLED(BACKLASH_COMPENSATION) + #ifndef BACKLASH_DISTANCE_MM + #define BACKLASH_DISTANCE_MM { 0, 0, 0 } + #endif + #ifndef BACKLASH_CORRECTION + #define BACKLASH_CORRECTION 0.0 + #endif + #if ENABLED(BACKLASH_GCODE) + #ifndef MEASURE_BACKLASH_WHEN_PROBING + #define MEASURE_BACKLASH_WHEN_PROBING + #endif + #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING) + #ifndef BACKLASH_MEASUREMENT_LIMIT + #define BACKLASH_MEASUREMENT_LIMIT 0.5 + #endif + #ifndef BACKLASH_MEASUREMENT_RESOLUTION + #define BACKLASH_MEASUREMENT_RESOLUTION 0.005 + #endif + #ifndef BACKLASH_MEASUREMENT_FEEDRATE + #define BACKLASH_MEASUREMENT_FEEDRATE Z_PROBE_FEEDRATE_SLOW + #endif + #endif + #endif +#endif +#if ENABLED(CALIBRATION_GCODE) + #ifndef CALIBRATION_FEEDRATE_SLOW + #define CALIBRATION_FEEDRATE_SLOW 60 + #endif + #ifndef CALIBRATION_FEEDRATE_FAST + #define CALIBRATION_FEEDRATE_FAST 1200 + #endif + #ifndef CALIBRATION_FEEDRATE_TRAVEL + #define CALIBRATION_FEEDRATE_TRAVEL 3000 + #endif + #ifndef CALIBRATION_NOZZLE_TIP_HEIGHT + #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 + #endif + #ifndef CALIBRATION_NOZZLE_OUTER_DIAMETER + #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 + #endif + #ifndef CALIBRATION_OBJECT_CENTER + #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0 } + #endif + #ifndef CALIBRATION_OBJECT_DIMENSIONS + #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0 } + #endif + #ifndef CALIBRATION_MEASURE_RIGHT + #define CALIBRATION_MEASURE_RIGHT + #endif + #ifndef CALIBRATION_MEASURE_FRONT + #define CALIBRATION_MEASURE_FRONT + #endif + #ifndef CALIBRATION_MEASURE_LEFT + #define CALIBRATION_MEASURE_LEFT + #endif + #ifndef CALIBRATION_MEASURE_BACK + #define CALIBRATION_MEASURE_BACK + #endif + #ifndef CALIBRATION_PIN + #ifndef CALIBRATION_PIN_INVERTING + #define CALIBRATION_PIN_INVERTING false + #endif + #ifndef CALIBRATION_PIN_PULLUP + #define CALIBRATION_PIN_PULLUP + #endif + #endif +#endif +#ifndef MULTISTEPPING_LIMIT + #define MULTISTEPPING_LIMIT 16 +#endif +#ifndef MICROSTEP_MODES + #define MICROSTEP_MODES { 16, 16, 16, 16, 16, 16 } +#endif +#if ANY(DIGIPOT_MCP4018, DIGIPOT_MCP4451) + #ifndef DIGIPOT_I2C_NUM_CHANNELS + #define DIGIPOT_I2C_NUM_CHANNELS 8 + #endif + #ifndef DIGIPOT_I2C_MOTOR_CURRENTS + #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } + #endif +#endif +#if HAS_MANUAL_MOVE_MENU + #ifndef MANUAL_FEEDRATE + #define MANUAL_FEEDRATE { 50*60, 50*60, 4*60, 2*60 } + #endif + #ifndef FINE_MANUAL_MOVE + #define FINE_MANUAL_MOVE 0.025 + #endif + #if IS_ULTIPANEL + #ifndef MANUAL_E_MOVES_RELATIVE + #define MANUAL_E_MOVES_RELATIVE + #endif + #ifndef ULTIPANEL_FEEDMULTIPLY + #define ULTIPANEL_FEEDMULTIPLY + #endif + #endif +#endif +#ifndef ENCODER_RATE_MULTIPLIER + #define ENCODER_RATE_MULTIPLIER +#endif +#if ENABLED(ENCODER_RATE_MULTIPLIER) + #ifndef ENCODER_10X_STEPS_PER_SEC + #define ENCODER_10X_STEPS_PER_SEC 30 + #endif + #ifndef ENCODER_100X_STEPS_PER_SEC + #define ENCODER_100X_STEPS_PER_SEC 80 + #endif +#endif +#if ENABLED(BEEP_ON_FEEDRATE_CHANGE) + #ifndef FEEDRATE_CHANGE_BEEP_DURATION + #define FEEDRATE_CHANGE_BEEP_DURATION 10 + #endif + #ifndef FEEDRATE_CHANGE_BEEP_FREQUENCY + #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 + #endif +#endif +#if HAS_MARLINUI_MENU + #if HAS_BED_PROBE + #if ENABLED(X_AXIS_TWIST_COMPENSATION) + #ifndef XATC_START_Z + #define XATC_START_Z 0.0 + #endif + #ifndef XATC_MAX_POINTS + #define XATC_MAX_POINTS 3 + #endif + #ifndef XATC_Y_POSITION + #define XATC_Y_POSITION Y_CENTER + #endif + #ifndef XATC_Z_OFFSETS + #define XATC_Z_OFFSETS { 0, 0, 0 } + #endif + #endif + #ifndef PROBE_DEPLOY_STOW_MENU + #define PROBE_DEPLOY_STOW_MENU + #endif + #endif + #ifndef MANUAL_MOVE_DISTANCE_MM + #define MANUAL_MOVE_DISTANCE_MM 10, 1.0, 0.1 + #endif + #ifndef MANUAL_MOVE_DISTANCE_IN + #define MANUAL_MOVE_DISTANCE_IN 0.100, 0.010, 0.001 + #endif + #ifndef MANUAL_MOVE_DISTANCE_DEG + #define MANUAL_MOVE_DISTANCE_DEG 90, 45, 22.5, 5, 1 + #endif +#endif +#if HAS_DISPLAY + #ifndef SHOW_BOOTSCREEN + #define SHOW_BOOTSCREEN + #endif + #if ENABLED(SHOW_BOOTSCREEN) + #ifndef BOOTSCREEN_TIMEOUT + #define BOOTSCREEN_TIMEOUT 3000 + #endif + #if ANY(HAS_MARLINUI_U8GLIB, TFT_COLOR_UI) + #ifndef BOOT_MARLIN_LOGO_SMALL + #define BOOT_MARLIN_LOGO_SMALL + #endif + #endif + #endif + #ifndef SOUND_ON_DEFAULT + #define SOUND_ON_DEFAULT + #endif + #if ENABLED(LED_CONTROL_MENU) + #ifndef LED_COLOR_PRESETS + #define LED_COLOR_PRESETS + #endif + #if ENABLED(LED_COLOR_PRESETS) + #ifndef LED_USER_PRESET_RED + #define LED_USER_PRESET_RED 255 + #endif + #ifndef LED_USER_PRESET_GREEN + #define LED_USER_PRESET_GREEN 128 + #endif + #ifndef LED_USER_PRESET_BLUE + #define LED_USER_PRESET_BLUE 0 + #endif + #ifndef LED_USER_PRESET_WHITE + #define LED_USER_PRESET_WHITE 255 + #endif + #ifndef LED_USER_PRESET_BRIGHTNESS + #define LED_USER_PRESET_BRIGHTNESS 255 + #endif + #endif + #if ENABLED(NEO2_COLOR_PRESETS) + #ifndef NEO2_USER_PRESET_RED + #define NEO2_USER_PRESET_RED 255 + #endif + #ifndef NEO2_USER_PRESET_GREEN + #define NEO2_USER_PRESET_GREEN 128 + #endif + #ifndef NEO2_USER_PRESET_BLUE + #define NEO2_USER_PRESET_BLUE 0 + #endif + #ifndef NEO2_USER_PRESET_WHITE + #define NEO2_USER_PRESET_WHITE 255 + #endif + #ifndef NEO2_USER_PRESET_BRIGHTNESS + #define NEO2_USER_PRESET_BRIGHTNESS 255 + #endif + #endif + #endif +#endif +#if HAS_FEEDRATE_EDIT + #ifndef SPEED_EDIT_MIN + #define SPEED_EDIT_MIN 10 + #endif + #ifndef SPEED_EDIT_MAX + #define SPEED_EDIT_MAX 999 + #endif +#endif +#if HAS_FLOW_EDIT + #ifndef FLOW_EDIT_MIN + #define FLOW_EDIT_MIN 10 + #endif + #ifndef FLOW_EDIT_MAX + #define FLOW_EDIT_MAX 999 + #endif +#endif +#if ENABLED(SET_PROGRESS_MANUALLY) + #ifndef SET_PROGRESS_PERCENT + #define SET_PROGRESS_PERCENT + #endif + #ifndef SET_REMAINING_TIME + #define SET_REMAINING_TIME + #endif + #if ALL(M73_REPORT, HAS_MEDIA) + #ifndef M73_REPORT_SD_ONLY + #define M73_REPORT_SD_ONLY + #endif + #endif +#endif +#if HAS_DISPLAY && ANY(HAS_MEDIA, SET_PROGRESS_MANUALLY) + #ifndef SHOW_PROGRESS_PERCENT + #define SHOW_PROGRESS_PERCENT + #endif + #ifndef SHOW_ELAPSED_TIME + #define SHOW_ELAPSED_TIME + #endif + #if ENABLED(SET_INTERACTION_TIME) + #ifndef SHOW_INTERACTION_TIME + #define SHOW_INTERACTION_TIME + #endif + #endif + #if ANY(HAS_MARLINUI_HD44780, IS_TFTGLCD_PANEL) + #if ENABLED(LCD_PROGRESS_BAR) + #ifndef PROGRESS_BAR_BAR_TIME + #define PROGRESS_BAR_BAR_TIME 2000 + #endif + #ifndef PROGRESS_BAR_MSG_TIME + #define PROGRESS_BAR_MSG_TIME 3000 + #endif + #ifndef PROGRESS_MSG_EXPIRE + #define PROGRESS_MSG_EXPIRE 0 + #endif + #endif + #endif +#endif +#if HAS_MEDIA + #ifndef SD_PROCEDURE_DEPTH + #define SD_PROCEDURE_DEPTH 1 + #endif + #ifndef SD_FINISHED_STEPPERRELEASE + #define SD_FINISHED_STEPPERRELEASE true + #endif + #ifndef SD_FINISHED_RELEASECOMMAND + #define SD_FINISHED_RELEASECOMMAND "M84" + #endif + #ifndef SDCARD_RATHERRECENTFIRST + #define SDCARD_RATHERRECENTFIRST + #endif + #ifndef SD_MENU_CONFIRM_START + #define SD_MENU_CONFIRM_START + #endif + #ifndef EVENT_GCODE_SD_ABORT + #define EVENT_GCODE_SD_ABORT "G28XY" + #endif + #if ENABLED(PRINTER_EVENT_LEDS) + #ifndef PE_LEDS_COMPLETED_TIME + #define PE_LEDS_COMPLETED_TIME (30*60) + #endif + #endif + #if ENABLED(POWER_LOSS_RECOVERY) + #ifndef PLR_ENABLED_DEFAULT + #define PLR_ENABLED_DEFAULT false + #endif + #ifndef POWER_LOSS_MIN_Z_CHANGE + #define POWER_LOSS_MIN_Z_CHANGE 0.05 + #endif + #endif + #if ENABLED(SDCARD_SORT_ALPHA) + #ifndef SDSORT_REVERSE + #define SDSORT_REVERSE false + #endif + #ifndef SDSORT_LIMIT + #define SDSORT_LIMIT 40 + #endif + #ifndef SDSORT_FOLDERS + #define SDSORT_FOLDERS -1 + #endif + #ifndef SDSORT_GCODE + #define SDSORT_GCODE false + #endif + #ifndef SDSORT_USES_RAM + #define SDSORT_USES_RAM false + #endif + #ifndef SDSORT_USES_STACK + #define SDSORT_USES_STACK false + #endif + #ifndef SDSORT_CACHE_NAMES + #define SDSORT_CACHE_NAMES false + #endif + #ifndef SDSORT_DYNAMIC_RAM + #define SDSORT_DYNAMIC_RAM false + #endif + #ifndef SDSORT_CACHE_VFATS + #define SDSORT_CACHE_VFATS 2 + #endif + #endif + #if ENABLED(USB_FLASH_DRIVE_SUPPORT) + #ifndef DISABLE_DUE_SD_MMC + #define DISABLE_DUE_SD_MMC + #endif + #if DISABLED(USE_OTG_USB_HOST) + #ifndef USB_CS_PIN + #define USB_CS_PIN SDSS + #endif + #ifndef USB_INTR_PIN + #define USB_INTR_PIN SD_DETECT_PIN + #endif + #endif + #endif + #if ENABLED(SD_FIRMWARE_UPDATE) + #ifndef SD_FIRMWARE_UPDATE_EEPROM_ADDR + #define SD_FIRMWARE_UPDATE_EEPROM_ADDR 0x1FF + #endif + #ifndef SD_FIRMWARE_UPDATE_ACTIVE_VALUE + #define SD_FIRMWARE_UPDATE_ACTIVE_VALUE 0xF0 + #endif + #ifndef SD_FIRMWARE_UPDATE_INACTIVE_VALUE + #define SD_FIRMWARE_UPDATE_INACTIVE_VALUE 0xFF + #endif + #endif + #if ENABLED(MULTI_VOLUME) + #ifndef VOLUME_SD_ONBOARD + #define VOLUME_SD_ONBOARD + #endif + #ifndef VOLUME_USB_FLASH_DRIVE + #define VOLUME_USB_FLASH_DRIVE + #endif + #ifndef DEFAULT_VOLUME + #define DEFAULT_VOLUME SV_SD_ONBOARD + #endif + #ifndef DEFAULT_SHARED_VOLUME + #define DEFAULT_SHARED_VOLUME SV_USB_FLASH_DRIVE + #endif + #endif +#endif +#if HAS_MARLINUI_U8GLIB + #ifndef XYZ_HOLLOW_FRAME + #define XYZ_HOLLOW_FRAME + #endif + #if IS_U8GLIB_ST7920 + #if ENABLED(LIGHTWEIGHT_UI) + #ifndef STATUS_EXPIRE_SECONDS + #define STATUS_EXPIRE_SECONDS 20 + #endif + #endif + #endif + #ifndef STATUS_HOTEND_INVERTED + #define STATUS_HOTEND_INVERTED + #endif + #ifndef STATUS_HOTEND_ANIM + #define STATUS_HOTEND_ANIM + #endif + #ifndef STATUS_BED_ANIM + #define STATUS_BED_ANIM + #endif + #ifndef STATUS_CHAMBER_ANIM + #define STATUS_CHAMBER_ANIM + #endif +#endif +#if HAS_MARLINUI_U8GLIB || IS_DWIN_MARLINUI + #ifndef MENU_HOLLOW_FRAME + #define MENU_HOLLOW_FRAME + #endif +#endif +#if HAS_DGUS_LCD + #ifndef LCD_BAUDRATE + #define LCD_BAUDRATE 115200 + #endif + #ifndef DGUS_RX_BUFFER_SIZE + #define DGUS_RX_BUFFER_SIZE 128 + #endif + #ifndef DGUS_TX_BUFFER_SIZE + #define DGUS_TX_BUFFER_SIZE 48 + #endif + #ifndef DGUS_UPDATE_INTERVAL_MS + #define DGUS_UPDATE_INTERVAL_MS 500 + #endif + #if DGUS_UI_IS(FYSETC, MKS, HIPRECY) + #ifndef DGUS_PRINT_FILENAME + #define DGUS_PRINT_FILENAME + #endif + #ifndef DGUS_PREHEAT_UI + #define DGUS_PREHEAT_UI + #endif + #if !(DGUS_UI_IS(FYSETC, MKS)) + #ifndef DGUS_UI_MOVE_DIS_OPTION + #define DGUS_UI_MOVE_DIS_OPTION + #endif + #endif + #ifndef DGUS_FILAMENT_LOADUNLOAD + #define DGUS_FILAMENT_LOADUNLOAD + #endif + #if ENABLED(DGUS_FILAMENT_LOADUNLOAD) + #ifndef DGUS_FILAMENT_PURGE_LENGTH + #define DGUS_FILAMENT_PURGE_LENGTH 10 + #endif + #ifndef DGUS_FILAMENT_LOAD_LENGTH_PER_TIME + #define DGUS_FILAMENT_LOAD_LENGTH_PER_TIME 0.5 + #endif + #endif + #ifndef DGUS_UI_WAITING + #define DGUS_UI_WAITING + #endif + #if ENABLED(DGUS_UI_WAITING) + #ifndef DGUS_UI_WAITING_STATUS + #define DGUS_UI_WAITING_STATUS 10 + #endif + #ifndef DGUS_UI_WAITING_STATUS_PERIOD + #define DGUS_UI_WAITING_STATUS_PERIOD 8 + #endif + #endif + #elif DGUS_UI_IS(E3S1PRO) + #ifndef DGUS_SOFTWARE_AUTOSCROLL + #define DGUS_SOFTWARE_AUTOSCROLL + #endif + #ifndef DGUS_AUTOSCROLL_START_CYCLES + #define DGUS_AUTOSCROLL_START_CYCLES 1 + #endif + #ifndef DGUS_AUTOSCROLL_END_CYCLES + #define DGUS_AUTOSCROLL_END_CYCLES 1 + #endif + #ifndef DGUS_ADVANCED_SDCARD + #define DGUS_ADVANCED_SDCARD + #endif + #ifndef DGUS_USERCONFIRM + #define DGUS_USERCONFIRM + #endif + #endif +#endif +#if ENABLED(ANYCUBIC_LCD_CHIRON) + #ifndef AC_SD_FOLDER_VIEW + #define AC_SD_FOLDER_VIEW + #endif +#endif +#if ENABLED(TOUCH_UI_FTDI_EVE) + #if ENABLED(OTHER_PIN_LAYOUT) + #ifndef CLCD_MOD_RESET + #define CLCD_MOD_RESET 9 + #endif + #ifndef CLCD_SPI_CS + #define CLCD_SPI_CS 10 + #endif + #if ENABLED(CLCD_USE_SOFT_SPI) + #ifndef CLCD_SOFT_SPI_MOSI + #define CLCD_SOFT_SPI_MOSI 11 + #endif + #ifndef CLCD_SOFT_SPI_MISO + #define CLCD_SOFT_SPI_MISO 12 + #endif + #ifndef CLCD_SOFT_SPI_SCLK + #define CLCD_SOFT_SPI_SCLK 13 + #endif + #endif + #endif + #if ENABLED(TOUCH_UI_USE_UTF8) + #ifndef TOUCH_UI_UTF8_WESTERN_CHARSET + #define TOUCH_UI_UTF8_WESTERN_CHARSET + #endif + #endif + #ifndef TOUCH_UI_FIT_TEXT + #define TOUCH_UI_FIT_TEXT + #endif +#endif +#if defined(DISPLAY_SLEEP_MINUTES) || defined(LCD_BACKLIGHT_TIMEOUT_MINS) + #ifndef EDITABLE_DISPLAY_TIMEOUT + #define EDITABLE_DISPLAY_TIMEOUT + #endif +#endif +#if HAS_ADC_BUTTONS + #ifndef ADC_BUTTON_DEBOUNCE_DELAY + #define ADC_BUTTON_DEBOUNCE_DELAY 16 + #endif +#endif +#ifndef USE_WATCHDOG + #define USE_WATCHDOG +#endif +#if ENABLED(BABYSTEPPING) + #ifndef BABYSTEP_MULTIPLICATOR_Z + #define BABYSTEP_MULTIPLICATOR_Z 1 + #endif + #ifndef BABYSTEP_MULTIPLICATOR_XY + #define BABYSTEP_MULTIPLICATOR_XY 1 + #endif + #if ENABLED(DOUBLECLICK_FOR_Z_BABYSTEPPING) + #ifndef DOUBLECLICK_MAX_INTERVAL + #define DOUBLECLICK_MAX_INTERVAL 1250 + #endif + #if ENABLED(MOVE_Z_WHEN_IDLE) + #ifndef MOVE_Z_IDLE_MULTIPLICATOR + #define MOVE_Z_IDLE_MULTIPLICATOR 1 + #endif + #endif + #endif +#endif +#if ENABLED(LIN_ADVANCE) + #if ENABLED(DISTINCT_E_FACTORS) + #ifndef ADVANCE_K + #define ADVANCE_K { 0.22 } + #endif + #else + #ifndef ADVANCE_K + #define ADVANCE_K 0.22 + #endif + #endif +#endif +#if ENABLED(G29_RETRY_AND_RECOVER) + #ifndef G29_MAX_RETRIES + #define G29_MAX_RETRIES 3 + #endif + #ifndef G29_HALT_ON_FAILURE + #define G29_HALT_ON_FAILURE + #endif + #ifndef G29_SUCCESS_COMMANDS + #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." + #endif + #ifndef G29_RECOVER_COMMANDS + #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" + #endif + #ifndef G29_FAILURE_COMMANDS + #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1" + #endif +#endif +#if ANY(PTC_PROBE, PTC_BED, PTC_HOTEND) + #if ENABLED(PTC_PROBE) + #ifndef PTC_PROBE_START + #define PTC_PROBE_START 30 + #endif + #ifndef PTC_PROBE_RES + #define PTC_PROBE_RES 5 + #endif + #ifndef PTC_PROBE_COUNT + #define PTC_PROBE_COUNT 10 + #endif + #ifndef PTC_PROBE_ZOFFS + #define PTC_PROBE_ZOFFS { 0 } + #endif + #endif + #if ENABLED(PTC_BED) + #ifndef PTC_BED_START + #define PTC_BED_START 60 + #endif + #ifndef PTC_BED_RES + #define PTC_BED_RES 5 + #endif + #ifndef PTC_BED_COUNT + #define PTC_BED_COUNT 10 + #endif + #ifndef PTC_BED_ZOFFS + #define PTC_BED_ZOFFS { 0 } + #endif + #endif + #if ENABLED(PTC_HOTEND) + #ifndef PTC_HOTEND_START + #define PTC_HOTEND_START 180 + #endif + #ifndef PTC_HOTEND_RES + #define PTC_HOTEND_RES 5 + #endif + #ifndef PTC_HOTEND_COUNT + #define PTC_HOTEND_COUNT 20 + #endif + #ifndef PTC_HOTEND_ZOFFS + #define PTC_HOTEND_ZOFFS { 0 } + #endif + #endif + #if ALL(PTC_PROBE, PTC_BED) + #ifndef PTC_PARK_POS + #define PTC_PARK_POS { 0, 0, 100 } + #endif + #ifndef PTC_PROBE_POS + #define PTC_PROBE_POS { 90, 100 } + #endif + #ifndef PTC_PROBE_TEMP + #define PTC_PROBE_TEMP 30 + #endif + #ifndef PTC_PROBE_HEATING_OFFSET + #define PTC_PROBE_HEATING_OFFSET 0.5 + #endif + #endif +#endif +#ifndef ARC_SUPPORT + #define ARC_SUPPORT +#endif +#if ENABLED(ARC_SUPPORT) + #ifndef MIN_ARC_SEGMENT_MM + #define MIN_ARC_SEGMENT_MM 0.1 + #endif + #ifndef MAX_ARC_SEGMENT_MM + #define MAX_ARC_SEGMENT_MM 1.0 + #endif + #ifndef MIN_CIRCLE_SEGMENTS + #define MIN_CIRCLE_SEGMENTS 72 + #endif + #ifndef N_ARC_CORRECTION + #define N_ARC_CORRECTION 25 + #endif +#endif +#if ENABLED(G38_PROBE_TARGET) + #ifndef G38_MINIMUM_MOVE + #define G38_MINIMUM_MOVE 0.0275 + #endif +#endif +#ifndef MIN_STEPS_PER_SEGMENT + #define MIN_STEPS_PER_SEGMENT 6 +#endif +#if ALL(HAS_MEDIA, DIRECT_STEPPING) + #ifndef BLOCK_BUFFER_SIZE + #define BLOCK_BUFFER_SIZE 8 + #endif +#elif HAS_MEDIA + #ifndef BLOCK_BUFFER_SIZE + #define BLOCK_BUFFER_SIZE 16 + #endif +#else + #ifndef BLOCK_BUFFER_SIZE + #define BLOCK_BUFFER_SIZE 16 + #endif +#endif +#ifndef MAX_CMD_SIZE + #define MAX_CMD_SIZE 96 +#endif +#ifndef BUFSIZE + #define BUFSIZE 4 +#endif +#ifndef TX_BUFFER_SIZE + #define TX_BUFFER_SIZE 0 +#endif +#ifndef SERIAL_OVERRUN_PROTECTION + #define SERIAL_OVERRUN_PROTECTION +#endif +#ifndef PROPORTIONAL_FONT_RATIO + #define PROPORTIONAL_FONT_RATIO 1.0 +#endif +#if ENABLED(FWRETRACT) + #ifndef FWRETRACT_AUTORETRACT + #define FWRETRACT_AUTORETRACT + #endif + #if ENABLED(FWRETRACT_AUTORETRACT) + #ifndef MIN_AUTORETRACT + #define MIN_AUTORETRACT 0.1 + #endif + #ifndef MAX_AUTORETRACT + #define MAX_AUTORETRACT 10.0 + #endif + #endif + #ifndef RETRACT_LENGTH + #define RETRACT_LENGTH 3 + #endif + #ifndef RETRACT_LENGTH_SWAP + #define RETRACT_LENGTH_SWAP 13 + #endif + #ifndef RETRACT_FEEDRATE + #define RETRACT_FEEDRATE 45 + #endif + #ifndef RETRACT_ZRAISE + #define RETRACT_ZRAISE 0 + #endif + #ifndef RETRACT_RECOVER_LENGTH + #define RETRACT_RECOVER_LENGTH 0 + #endif + #ifndef RETRACT_RECOVER_LENGTH_SWAP + #define RETRACT_RECOVER_LENGTH_SWAP 0 + #endif + #ifndef RETRACT_RECOVER_FEEDRATE + #define RETRACT_RECOVER_FEEDRATE 8 + #endif + #ifndef RETRACT_RECOVER_FEEDRATE_SWAP + #define RETRACT_RECOVER_FEEDRATE_SWAP 8 + #endif +#endif +#if HAS_MULTI_EXTRUDER + #ifndef TOOLCHANGE_ZRAISE + #define TOOLCHANGE_ZRAISE 2 + #endif + #if ENABLED(TOOLCHANGE_FILAMENT_SWAP) + #ifndef TOOLCHANGE_FS_LENGTH + #define TOOLCHANGE_FS_LENGTH 12 + #endif + #ifndef TOOLCHANGE_FS_EXTRA_RESUME_LENGTH + #define TOOLCHANGE_FS_EXTRA_RESUME_LENGTH 0 + #endif + #ifndef TOOLCHANGE_FS_RETRACT_SPEED + #define TOOLCHANGE_FS_RETRACT_SPEED (50*60) + #endif + #ifndef TOOLCHANGE_FS_UNRETRACT_SPEED + #define TOOLCHANGE_FS_UNRETRACT_SPEED (25*60) + #endif + #ifndef TOOLCHANGE_FS_EXTRA_PRIME + #define TOOLCHANGE_FS_EXTRA_PRIME 0 + #endif + #ifndef TOOLCHANGE_FS_PRIME_SPEED + #define TOOLCHANGE_FS_PRIME_SPEED (4.6*60) + #endif + #ifndef TOOLCHANGE_FS_WIPE_RETRACT + #define TOOLCHANGE_FS_WIPE_RETRACT 0 + #endif + #ifndef TOOLCHANGE_FS_FAN + #define TOOLCHANGE_FS_FAN -1 + #endif + #ifndef TOOLCHANGE_FS_FAN_SPEED + #define TOOLCHANGE_FS_FAN_SPEED 255 + #endif + #ifndef TOOLCHANGE_FS_FAN_TIME + #define TOOLCHANGE_FS_FAN_TIME 10 + #endif + #ifndef TOOLCHANGE_MIGRATION_FEATURE + #define TOOLCHANGE_MIGRATION_FEATURE + #endif + #endif + #if ENABLED(TOOLCHANGE_PARK) + #ifndef TOOLCHANGE_PARK_XY + #define TOOLCHANGE_PARK_XY { X_MIN_POS + 10, Y_MIN_POS + 10 } + #endif + #ifndef TOOLCHANGE_PARK_XY_FEEDRATE + #define TOOLCHANGE_PARK_XY_FEEDRATE 6000 + #endif + #endif +#endif +#if ENABLED(ADVANCED_PAUSE_FEATURE) + #ifndef PAUSE_PARK_RETRACT_FEEDRATE + #define PAUSE_PARK_RETRACT_FEEDRATE 60 + #endif + #ifndef PAUSE_PARK_RETRACT_LENGTH + #define PAUSE_PARK_RETRACT_LENGTH 2 + #endif + #ifndef FILAMENT_CHANGE_UNLOAD_FEEDRATE + #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 + #endif + #ifndef FILAMENT_CHANGE_UNLOAD_ACCEL + #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 + #endif + #ifndef FILAMENT_CHANGE_UNLOAD_LENGTH + #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 + #endif + #ifndef FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE + #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 + #endif + #ifndef FILAMENT_CHANGE_SLOW_LOAD_LENGTH + #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 + #endif + #ifndef FILAMENT_CHANGE_FAST_LOAD_FEEDRATE + #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 + #endif + #ifndef FILAMENT_CHANGE_FAST_LOAD_ACCEL + #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 + #endif + #ifndef FILAMENT_CHANGE_FAST_LOAD_LENGTH + #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 + #endif + #ifndef ADVANCED_PAUSE_PURGE_FEEDRATE + #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 + #endif + #ifndef ADVANCED_PAUSE_PURGE_LENGTH + #define ADVANCED_PAUSE_PURGE_LENGTH 50 + #endif + #ifndef ADVANCED_PAUSE_RESUME_PRIME + #define ADVANCED_PAUSE_RESUME_PRIME 0 + #endif + #ifndef FILAMENT_UNLOAD_PURGE_RETRACT + #define FILAMENT_UNLOAD_PURGE_RETRACT 13 + #endif + #ifndef FILAMENT_UNLOAD_PURGE_DELAY + #define FILAMENT_UNLOAD_PURGE_DELAY 5000 + #endif + #ifndef FILAMENT_UNLOAD_PURGE_LENGTH + #define FILAMENT_UNLOAD_PURGE_LENGTH 8 + #endif + #ifndef FILAMENT_UNLOAD_PURGE_FEEDRATE + #define FILAMENT_UNLOAD_PURGE_FEEDRATE 25 + #endif + #ifndef PAUSE_PARK_NOZZLE_TIMEOUT + #define PAUSE_PARK_NOZZLE_TIMEOUT 45 + #endif + #ifndef FILAMENT_CHANGE_ALERT_BEEPS + #define FILAMENT_CHANGE_ALERT_BEEPS 10 + #endif + #ifndef PAUSE_PARK_NO_STEPPER_TIMEOUT + #define PAUSE_PARK_NO_STEPPER_TIMEOUT + #endif + #ifndef CONFIGURE_FILAMENT_CHANGE + #define CONFIGURE_FILAMENT_CHANGE + #endif +#endif +#if HAS_TRINAMIC_CONFIG + #ifndef HOLD_MULTIPLIER + #define HOLD_MULTIPLIER 0.5 + #endif + #ifndef INTERPOLATE + #define INTERPOLATE true + #endif + #if AXIS_IS_TMC_CONFIG(X) + #ifndef X_CURRENT + #define X_CURRENT 800 + #endif + #ifndef X_CURRENT_HOME + #define X_CURRENT_HOME X_CURRENT + #endif + #ifndef X_MICROSTEPS + #define X_MICROSTEPS 16 + #endif + #ifndef X_RSENSE + #define X_RSENSE 0.11 + #endif + #ifndef X_CHAIN_POS + #define X_CHAIN_POS -1 + #endif + #endif + #if AXIS_IS_TMC_CONFIG(X2) + #ifndef X2_CURRENT + #define X2_CURRENT X_CURRENT + #endif + #ifndef X2_CURRENT_HOME + #define X2_CURRENT_HOME X_CURRENT_HOME + #endif + #ifndef X2_MICROSTEPS + #define X2_MICROSTEPS X_MICROSTEPS + #endif + #ifndef X2_RSENSE + #define X2_RSENSE X_RSENSE + #endif + #ifndef X2_CHAIN_POS + #define X2_CHAIN_POS -1 + #endif + #endif + #if AXIS_IS_TMC_CONFIG(Y) + #ifndef Y_CURRENT + #define Y_CURRENT 800 + #endif + #ifndef Y_CURRENT_HOME + #define Y_CURRENT_HOME Y_CURRENT + #endif + #ifndef Y_MICROSTEPS + #define Y_MICROSTEPS 16 + #endif + #ifndef Y_RSENSE + #define Y_RSENSE 0.11 + #endif + #ifndef Y_CHAIN_POS + #define Y_CHAIN_POS -1 + #endif + #endif + #if AXIS_IS_TMC_CONFIG(Y2) + #ifndef Y2_CURRENT + #define Y2_CURRENT Y_CURRENT + #endif + #ifndef Y2_CURRENT_HOME + #define Y2_CURRENT_HOME Y_CURRENT_HOME + #endif + #ifndef Y2_MICROSTEPS + #define Y2_MICROSTEPS Y_MICROSTEPS + #endif + #ifndef Y2_RSENSE + #define Y2_RSENSE Y_RSENSE + #endif + #ifndef Y2_CHAIN_POS + #define Y2_CHAIN_POS -1 + #endif + #endif + #if AXIS_IS_TMC_CONFIG(Z) + #ifndef Z_CURRENT + #define Z_CURRENT 800 + #endif + #ifndef Z_CURRENT_HOME + #define Z_CURRENT_HOME Z_CURRENT + #endif + #ifndef Z_MICROSTEPS + #define Z_MICROSTEPS 16 + #endif + #ifndef Z_RSENSE + #define Z_RSENSE 0.11 + #endif + #ifndef Z_CHAIN_POS + #define Z_CHAIN_POS -1 + #endif + #endif + #if AXIS_IS_TMC_CONFIG(Z2) + #ifndef Z2_CURRENT + #define Z2_CURRENT Z_CURRENT + #endif + #ifndef Z2_CURRENT_HOME + #define Z2_CURRENT_HOME Z_CURRENT_HOME + #endif + #ifndef Z2_MICROSTEPS + #define Z2_MICROSTEPS Z_MICROSTEPS + #endif + #ifndef Z2_RSENSE + #define Z2_RSENSE Z_RSENSE + #endif + #ifndef Z2_CHAIN_POS + #define Z2_CHAIN_POS -1 + #endif + #endif + #if AXIS_IS_TMC_CONFIG(Z3) + #ifndef Z3_CURRENT + #define Z3_CURRENT Z_CURRENT + #endif + #ifndef Z3_CURRENT_HOME + #define Z3_CURRENT_HOME Z_CURRENT_HOME + #endif + #ifndef Z3_MICROSTEPS + #define Z3_MICROSTEPS Z_MICROSTEPS + #endif + #ifndef Z3_RSENSE + #define Z3_RSENSE Z_RSENSE + #endif + #ifndef Z3_CHAIN_POS + #define Z3_CHAIN_POS -1 + #endif + #endif + #if AXIS_IS_TMC_CONFIG(Z4) + #ifndef Z4_CURRENT + #define Z4_CURRENT Z_CURRENT + #endif + #ifndef Z4_CURRENT_HOME + #define Z4_CURRENT_HOME Z_CURRENT_HOME + #endif + #ifndef Z4_MICROSTEPS + #define Z4_MICROSTEPS Z_MICROSTEPS + #endif + #ifndef Z4_RSENSE + #define Z4_RSENSE Z_RSENSE + #endif + #ifndef Z4_CHAIN_POS + #define Z4_CHAIN_POS -1 + #endif + #endif + #if AXIS_IS_TMC_CONFIG(I) + #ifndef I_CURRENT + #define I_CURRENT 800 + #endif + #ifndef I_CURRENT_HOME + #define I_CURRENT_HOME I_CURRENT + #endif + #ifndef I_MICROSTEPS + #define I_MICROSTEPS 16 + #endif + #ifndef I_RSENSE + #define I_RSENSE 0.11 + #endif + #ifndef I_CHAIN_POS + #define I_CHAIN_POS -1 + #endif + #endif + #if AXIS_IS_TMC_CONFIG(J) + #ifndef J_CURRENT + #define J_CURRENT 800 + #endif + #ifndef J_CURRENT_HOME + #define J_CURRENT_HOME J_CURRENT + #endif + #ifndef J_MICROSTEPS + #define J_MICROSTEPS 16 + #endif + #ifndef J_RSENSE + #define J_RSENSE 0.11 + #endif + #ifndef J_CHAIN_POS + #define J_CHAIN_POS -1 + #endif + #endif + #if AXIS_IS_TMC_CONFIG(K) + #ifndef K_CURRENT + #define K_CURRENT 800 + #endif + #ifndef K_CURRENT_HOME + #define K_CURRENT_HOME K_CURRENT + #endif + #ifndef K_MICROSTEPS + #define K_MICROSTEPS 16 + #endif + #ifndef K_RSENSE + #define K_RSENSE 0.11 + #endif + #ifndef K_CHAIN_POS + #define K_CHAIN_POS -1 + #endif + #endif + #if AXIS_IS_TMC_CONFIG(U) + #ifndef U_CURRENT + #define U_CURRENT 800 + #endif + #ifndef U_CURRENT_HOME + #define U_CURRENT_HOME U_CURRENT + #endif + #ifndef U_MICROSTEPS + #define U_MICROSTEPS 8 + #endif + #ifndef U_RSENSE + #define U_RSENSE 0.11 + #endif + #ifndef U_CHAIN_POS + #define U_CHAIN_POS -1 + #endif + #endif + #if AXIS_IS_TMC_CONFIG(V) + #ifndef V_CURRENT + #define V_CURRENT 800 + #endif + #ifndef V_CURRENT_HOME + #define V_CURRENT_HOME V_CURRENT + #endif + #ifndef V_MICROSTEPS + #define V_MICROSTEPS 8 + #endif + #ifndef V_RSENSE + #define V_RSENSE 0.11 + #endif + #ifndef V_CHAIN_POS + #define V_CHAIN_POS -1 + #endif + #endif + #if AXIS_IS_TMC_CONFIG(W) + #ifndef W_CURRENT + #define W_CURRENT 800 + #endif + #ifndef W_CURRENT_HOME + #define W_CURRENT_HOME W_CURRENT + #endif + #ifndef W_MICROSTEPS + #define W_MICROSTEPS 8 + #endif + #ifndef W_RSENSE + #define W_RSENSE 0.11 + #endif + #ifndef W_CHAIN_POS + #define W_CHAIN_POS -1 + #endif + #endif + #if AXIS_IS_TMC_CONFIG(E0) + #ifndef E0_CURRENT + #define E0_CURRENT 800 + #endif + #ifndef E0_MICROSTEPS + #define E0_MICROSTEPS 16 + #endif + #ifndef E0_RSENSE + #define E0_RSENSE 0.11 + #endif + #ifndef E0_CHAIN_POS + #define E0_CHAIN_POS -1 + #endif + #endif + #if AXIS_IS_TMC_CONFIG(E1) + #ifndef E1_CURRENT + #define E1_CURRENT E0_CURRENT + #endif + #ifndef E1_MICROSTEPS + #define E1_MICROSTEPS E0_MICROSTEPS + #endif + #ifndef E1_RSENSE + #define E1_RSENSE E0_RSENSE + #endif + #ifndef E1_CHAIN_POS + #define E1_CHAIN_POS -1 + #endif + #endif + #if AXIS_IS_TMC_CONFIG(E2) + #ifndef E2_CURRENT + #define E2_CURRENT E0_CURRENT + #endif + #ifndef E2_MICROSTEPS + #define E2_MICROSTEPS E0_MICROSTEPS + #endif + #ifndef E2_RSENSE + #define E2_RSENSE E0_RSENSE + #endif + #ifndef E2_CHAIN_POS + #define E2_CHAIN_POS -1 + #endif + #endif + #if AXIS_IS_TMC_CONFIG(E3) + #ifndef E3_CURRENT + #define E3_CURRENT E0_CURRENT + #endif + #ifndef E3_MICROSTEPS + #define E3_MICROSTEPS E0_MICROSTEPS + #endif + #ifndef E3_RSENSE + #define E3_RSENSE E0_RSENSE + #endif + #ifndef E3_CHAIN_POS + #define E3_CHAIN_POS -1 + #endif + #endif + #if AXIS_IS_TMC_CONFIG(E4) + #ifndef E4_CURRENT + #define E4_CURRENT E0_CURRENT + #endif + #ifndef E4_MICROSTEPS + #define E4_MICROSTEPS E0_MICROSTEPS + #endif + #ifndef E4_RSENSE + #define E4_RSENSE E0_RSENSE + #endif + #ifndef E4_CHAIN_POS + #define E4_CHAIN_POS -1 + #endif + #endif + #if AXIS_IS_TMC_CONFIG(E5) + #ifndef E5_CURRENT + #define E5_CURRENT E0_CURRENT + #endif + #ifndef E5_MICROSTEPS + #define E5_MICROSTEPS E0_MICROSTEPS + #endif + #ifndef E5_RSENSE + #define E5_RSENSE E0_RSENSE + #endif + #ifndef E5_CHAIN_POS + #define E5_CHAIN_POS -1 + #endif + #endif + #if AXIS_IS_TMC_CONFIG(E6) + #ifndef E6_CURRENT + #define E6_CURRENT E0_CURRENT + #endif + #ifndef E6_MICROSTEPS + #define E6_MICROSTEPS E0_MICROSTEPS + #endif + #ifndef E6_RSENSE + #define E6_RSENSE E0_RSENSE + #endif + #ifndef E6_CHAIN_POS + #define E6_CHAIN_POS -1 + #endif + #endif + #if AXIS_IS_TMC_CONFIG(E7) + #ifndef E7_CURRENT + #define E7_CURRENT E0_CURRENT + #endif + #ifndef E7_MICROSTEPS + #define E7_MICROSTEPS E0_MICROSTEPS + #endif + #ifndef E7_RSENSE + #define E7_RSENSE E0_RSENSE + #endif + #ifndef E7_CHAIN_POS + #define E7_CHAIN_POS -1 + #endif + #endif + #if HAS_STEALTHCHOP + #ifndef STEALTHCHOP_XY + #define STEALTHCHOP_XY + #endif + #ifndef STEALTHCHOP_Z + #define STEALTHCHOP_Z + #endif + #ifndef STEALTHCHOP_I + #define STEALTHCHOP_I + #endif + #ifndef STEALTHCHOP_J + #define STEALTHCHOP_J + #endif + #ifndef STEALTHCHOP_K + #define STEALTHCHOP_K + #endif + #ifndef STEALTHCHOP_U + #define STEALTHCHOP_U + #endif + #ifndef STEALTHCHOP_V + #define STEALTHCHOP_V + #endif + #ifndef STEALTHCHOP_W + #define STEALTHCHOP_W + #endif + #ifndef STEALTHCHOP_E + #define STEALTHCHOP_E + #endif + #endif + #ifndef CHOPPER_TIMING + #define CHOPPER_TIMING CHOPPER_DEFAULT_12V + #endif + #if ENABLED(MONITOR_DRIVER_STATUS) + #ifndef CURRENT_STEP_DOWN + #define CURRENT_STEP_DOWN 50 + #endif + #ifndef REPORT_CURRENT_CHANGE + #define REPORT_CURRENT_CHANGE + #endif + #ifndef STOP_ON_ERROR + #define STOP_ON_ERROR + #endif + #endif + #ifndef X_HYBRID_THRESHOLD + #define X_HYBRID_THRESHOLD 100 + #endif + #ifndef X2_HYBRID_THRESHOLD + #define X2_HYBRID_THRESHOLD 100 + #endif + #ifndef Y_HYBRID_THRESHOLD + #define Y_HYBRID_THRESHOLD 100 + #endif + #ifndef Y2_HYBRID_THRESHOLD + #define Y2_HYBRID_THRESHOLD 100 + #endif + #ifndef Z_HYBRID_THRESHOLD + #define Z_HYBRID_THRESHOLD 3 + #endif + #ifndef Z2_HYBRID_THRESHOLD + #define Z2_HYBRID_THRESHOLD 3 + #endif + #ifndef Z3_HYBRID_THRESHOLD + #define Z3_HYBRID_THRESHOLD 3 + #endif + #ifndef Z4_HYBRID_THRESHOLD + #define Z4_HYBRID_THRESHOLD 3 + #endif + #ifndef I_HYBRID_THRESHOLD + #define I_HYBRID_THRESHOLD 3 + #endif + #ifndef J_HYBRID_THRESHOLD + #define J_HYBRID_THRESHOLD 3 + #endif + #ifndef K_HYBRID_THRESHOLD + #define K_HYBRID_THRESHOLD 3 + #endif + #ifndef U_HYBRID_THRESHOLD + #define U_HYBRID_THRESHOLD 3 + #endif + #ifndef V_HYBRID_THRESHOLD + #define V_HYBRID_THRESHOLD 3 + #endif + #ifndef W_HYBRID_THRESHOLD + #define W_HYBRID_THRESHOLD 3 + #endif + #ifndef E0_HYBRID_THRESHOLD + #define E0_HYBRID_THRESHOLD 30 + #endif + #ifndef E1_HYBRID_THRESHOLD + #define E1_HYBRID_THRESHOLD 30 + #endif + #ifndef E2_HYBRID_THRESHOLD + #define E2_HYBRID_THRESHOLD 30 + #endif + #ifndef E3_HYBRID_THRESHOLD + #define E3_HYBRID_THRESHOLD 30 + #endif + #ifndef E4_HYBRID_THRESHOLD + #define E4_HYBRID_THRESHOLD 30 + #endif + #ifndef E5_HYBRID_THRESHOLD + #define E5_HYBRID_THRESHOLD 30 + #endif + #ifndef E6_HYBRID_THRESHOLD + #define E6_HYBRID_THRESHOLD 30 + #endif + #ifndef E7_HYBRID_THRESHOLD + #define E7_HYBRID_THRESHOLD 30 + #endif + #if ANY(SENSORLESS_HOMING, SENSORLESS_PROBING) + #ifndef X_STALL_SENSITIVITY + #define X_STALL_SENSITIVITY 8 + #endif + #ifndef X2_STALL_SENSITIVITY + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY + #endif + #ifndef Y_STALL_SENSITIVITY + #define Y_STALL_SENSITIVITY 8 + #endif + #ifndef Y2_STALL_SENSITIVITY + #define Y2_STALL_SENSITIVITY Y_STALL_SENSITIVITY + #endif + #endif + #ifndef EDGE_STEPPING + #define EDGE_STEPPING + #endif + #ifndef TMC_ADV + #define TMC_ADV () { } + #endif +#endif +#if ENABLED(EXPERIMENTAL_I2CBUS) + #ifndef I2C_SLAVE_ADDRESS + #define I2C_SLAVE_ADDRESS 0 + #endif +#endif +#if ENABLED(PHOTO_GCODE) + #ifdef PHOTO_PULSES_US + #ifndef PHOTO_PULSE_DELAY_US + #define PHOTO_PULSE_DELAY_US 13 + #endif + #endif +#endif +#if ANY(SPINDLE_FEATURE, LASER_FEATURE) + #ifndef SPINDLE_LASER_ACTIVE_STATE + #define SPINDLE_LASER_ACTIVE_STATE LOW + #endif + #ifndef SPINDLE_LASER_USE_PWM + #define SPINDLE_LASER_USE_PWM + #endif + #if ENABLED(SPINDLE_LASER_USE_PWM) + #ifndef SPINDLE_LASER_PWM_INVERT + #define SPINDLE_LASER_PWM_INVERT false + #endif + #ifndef SPINDLE_LASER_FREQUENCY + #define SPINDLE_LASER_FREQUENCY 2500 + #endif + #endif + #if ENABLED(AIR_EVACUATION) + #ifndef AIR_EVACUATION_ACTIVE + #define AIR_EVACUATION_ACTIVE LOW + #endif + #endif + #if ENABLED(AIR_ASSIST) + #ifndef AIR_ASSIST_ACTIVE + #define AIR_ASSIST_ACTIVE LOW + #endif + #endif + #ifdef SPINDLE_SERVO + #ifndef SPINDLE_SERVO_NR + #define SPINDLE_SERVO_NR 0 + #endif + #ifndef SPINDLE_SERVO_MIN + #define SPINDLE_SERVO_MIN 10 + #endif + #endif + #ifndef CUTTER_POWER_UNIT + #define CUTTER_POWER_UNIT PWM255 + #endif + #if ENABLED(SPINDLE_FEATURE) + #ifndef SPINDLE_CHANGE_DIR_STOP + #define SPINDLE_CHANGE_DIR_STOP + #endif + #ifndef SPINDLE_INVERT_DIR + #define SPINDLE_INVERT_DIR false + #endif + #ifndef SPINDLE_LASER_POWERUP_DELAY + #define SPINDLE_LASER_POWERUP_DELAY 5000 + #endif + #ifndef SPINDLE_LASER_POWERDOWN_DELAY + #define SPINDLE_LASER_POWERDOWN_DELAY 5000 + #endif + #if ENABLED(SPINDLE_LASER_USE_PWM) + #ifndef SPEED_POWER_INTERCEPT + #define SPEED_POWER_INTERCEPT 0 + #endif + #ifndef SPEED_POWER_MIN + #define SPEED_POWER_MIN 5000 + #endif + #ifndef SPEED_POWER_MAX + #define SPEED_POWER_MAX 30000 + #endif + #ifndef SPEED_POWER_STARTUP + #define SPEED_POWER_STARTUP 25000 + #endif + #endif + #else + #if ENABLED(SPINDLE_LASER_USE_PWM) + #ifndef SPEED_POWER_INTERCEPT + #define SPEED_POWER_INTERCEPT 0 + #endif + #ifndef SPEED_POWER_MIN + #define SPEED_POWER_MIN 0 + #endif + #ifndef SPEED_POWER_MAX + #define SPEED_POWER_MAX 100 + #endif + #ifndef SPEED_POWER_STARTUP + #define SPEED_POWER_STARTUP 80 + #endif + #endif + #ifndef LASER_TEST_PULSE_MIN + #define LASER_TEST_PULSE_MIN 1 + #endif + #ifndef LASER_TEST_PULSE_MAX + #define LASER_TEST_PULSE_MAX 999 + #endif + #ifndef SPINDLE_LASER_POWERUP_DELAY + #define SPINDLE_LASER_POWERUP_DELAY 50 + #endif + #ifndef SPINDLE_LASER_POWERDOWN_DELAY + #define SPINDLE_LASER_POWERDOWN_DELAY 50 + #endif + #ifndef LASER_SAFETY_TIMEOUT_MS + #define LASER_SAFETY_TIMEOUT_MS 1000 + #endif + #if ENABLED(I2C_AMMETER) + #ifndef I2C_AMMETER_IMAX + #define I2C_AMMETER_IMAX 0.1 + #endif + #ifndef I2C_AMMETER_SHUNT_RESISTOR + #define I2C_AMMETER_SHUNT_RESISTOR 0.1 + #endif + #endif + #if ENABLED(LASER_COOLANT_FLOW_METER) + #ifndef FLOWMETER_PIN + #define FLOWMETER_PIN 20 + #endif + #ifndef FLOWMETER_PPL + #define FLOWMETER_PPL 5880 + #endif + #ifndef FLOWMETER_INTERVAL + #define FLOWMETER_INTERVAL 1000 + #endif + #ifndef FLOWMETER_SAFETY + #define FLOWMETER_SAFETY + #endif + #if ENABLED(FLOWMETER_SAFETY) + #ifndef FLOWMETER_MIN_LITERS_PER_MINUTE + #define FLOWMETER_MIN_LITERS_PER_MINUTE 1.5 + #endif + #endif + #endif + #endif +#endif +#if ENABLED(COOLANT_CONTROL) + #ifndef COOLANT_MIST + #define COOLANT_MIST + #endif + #ifndef COOLANT_FLOOD + #define COOLANT_FLOOD + #endif + #ifndef COOLANT_MIST_INVERT + #define COOLANT_MIST_INVERT false + #endif + #ifndef COOLANT_FLOOD_INVERT + #define COOLANT_FLOOD_INVERT false + #endif +#endif +#if ENABLED(FILAMENT_WIDTH_SENSOR) + #ifndef FILAMENT_SENSOR_EXTRUDER_NUM + #define FILAMENT_SENSOR_EXTRUDER_NUM 0 + #endif + #ifndef MEASUREMENT_DELAY_CM + #define MEASUREMENT_DELAY_CM 14 + #endif + #ifndef FILWIDTH_ERROR_MARGIN + #define FILWIDTH_ERROR_MARGIN 1.0 + #endif + #ifndef MAX_MEASUREMENT_DELAY + #define MAX_MEASUREMENT_DELAY 20 + #endif + #ifndef DEFAULT_MEASURED_FILAMENT_DIA + #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA + #endif +#endif +#if ENABLED(POWER_MONITOR_CURRENT) + #ifndef POWER_MONITOR_VOLTS_PER_AMP + #define POWER_MONITOR_VOLTS_PER_AMP 0.05000 + #endif + #ifndef POWER_MONITOR_CURRENT_OFFSET + #define POWER_MONITOR_CURRENT_OFFSET 0 + #endif + #ifndef POWER_MONITOR_FIXED_VOLTAGE + #define POWER_MONITOR_FIXED_VOLTAGE 13.6 + #endif +#endif +#if ENABLED(POWER_MONITOR_VOLTAGE) + #ifndef POWER_MONITOR_VOLTS_PER_VOLT + #define POWER_MONITOR_VOLTS_PER_VOLT 0.077933 + #endif + #ifndef POWER_MONITOR_VOLTAGE_OFFSET + #define POWER_MONITOR_VOLTAGE_OFFSET 0 + #endif +#endif +#if DISABLED(NO_VOLUMETRICS) + #if ENABLED(VOLUMETRIC_EXTRUDER_LIMIT) + #ifndef DEFAULT_VOLUMETRIC_EXTRUDER_LIMIT + #define DEFAULT_VOLUMETRIC_EXTRUDER_LIMIT 0.00 + #endif + #ifndef VOLUMETRIC_EXTRUDER_LIMIT_MAX + #define VOLUMETRIC_EXTRUDER_LIMIT_MAX 20 + #endif + #endif +#endif +#ifndef AUTO_REPORT_TEMPERATURES + #define AUTO_REPORT_TEMPERATURES +#endif +#ifndef CAPABILITIES_REPORT + #define CAPABILITIES_REPORT +#endif +#if ENABLED(CAPABILITIES_REPORT) + #ifndef EXTENDED_CAPABILITIES_REPORT + #define EXTENDED_CAPABILITIES_REPORT + #endif +#endif +#ifndef FASTER_GCODE_PARSER + #define FASTER_GCODE_PARSER +#endif +#ifndef DEBUG_FLAGS_GCODE + #define DEBUG_FLAGS_GCODE +#endif +#if ENABLED(GCODE_MACROS) + #ifndef GCODE_MACROS_SLOTS + #define GCODE_MACROS_SLOTS 5 + #endif + #ifndef GCODE_MACROS_SLOT_SIZE + #define GCODE_MACROS_SLOT_SIZE 50 + #endif +#endif +#if ENABLED(CUSTOM_MENU_MAIN) + #ifndef CUSTOM_MENU_MAIN_SCRIPT_DONE + #define CUSTOM_MENU_MAIN_SCRIPT_DONE "M117 User Script Done" + #endif + #ifndef CUSTOM_MENU_MAIN_SCRIPT_AUDIBLE_FEEDBACK + #define CUSTOM_MENU_MAIN_SCRIPT_AUDIBLE_FEEDBACK + #endif + #ifndef CUSTOM_MENU_MAIN_ONLY_IDLE + #define CUSTOM_MENU_MAIN_ONLY_IDLE + #endif + #ifndef MAIN_MENU_ITEM_1_DESC + #define MAIN_MENU_ITEM_1_DESC "Home & UBL Info" + #endif + #ifndef MAIN_MENU_ITEM_1_GCODE + #define MAIN_MENU_ITEM_1_GCODE "G28\nG29 W" + #endif + #ifndef MAIN_MENU_ITEM_2_DESC + #define MAIN_MENU_ITEM_2_DESC "Preheat for " PREHEAT_1_LABEL + #endif + #ifndef MAIN_MENU_ITEM_2_GCODE + #define MAIN_MENU_ITEM_2_GCODE "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND) + #endif +#endif +#if ENABLED(CUSTOM_MENU_CONFIG) + #ifndef CUSTOM_MENU_CONFIG_SCRIPT_DONE + #define CUSTOM_MENU_CONFIG_SCRIPT_DONE "M117 Wireless Script Done" + #endif + #ifndef CUSTOM_MENU_CONFIG_SCRIPT_AUDIBLE_FEEDBACK + #define CUSTOM_MENU_CONFIG_SCRIPT_AUDIBLE_FEEDBACK + #endif + #ifndef CUSTOM_MENU_CONFIG_ONLY_IDLE + #define CUSTOM_MENU_CONFIG_ONLY_IDLE + #endif + #ifndef CONFIG_MENU_ITEM_1_DESC + #define CONFIG_MENU_ITEM_1_DESC "Wifi ON" + #endif + #ifndef CONFIG_MENU_ITEM_1_GCODE + #define CONFIG_MENU_ITEM_1_GCODE "M118 [ESP110] WIFI-STA pwd=12345678" + #endif + #ifndef CONFIG_MENU_ITEM_2_DESC + #define CONFIG_MENU_ITEM_2_DESC "Bluetooth ON" + #endif + #ifndef CONFIG_MENU_ITEM_2_GCODE + #define CONFIG_MENU_ITEM_2_GCODE "M118 [ESP110] BT pwd=12345678" + #endif +#endif +#if ENABLED(CUSTOM_USER_BUTTONS) + #if PIN_EXISTS(BUTTON1) + #ifndef BUTTON1_HIT_STATE + #define BUTTON1_HIT_STATE LOW + #endif + #ifndef BUTTON1_WHEN_PRINTING + #define BUTTON1_WHEN_PRINTING false + #endif + #ifndef BUTTON1_GCODE + #define BUTTON1_GCODE "G28" + #endif + #ifndef BUTTON1_DESC + #define BUTTON1_DESC "Homing" + #endif + #endif + #if PIN_EXISTS(BUTTON2) + #ifndef BUTTON2_HIT_STATE + #define BUTTON2_HIT_STATE LOW + #endif + #ifndef BUTTON2_WHEN_PRINTING + #define BUTTON2_WHEN_PRINTING false + #endif + #ifndef BUTTON2_GCODE + #define BUTTON2_GCODE "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND) + #endif + #ifndef BUTTON2_DESC + #define BUTTON2_DESC "Preheat for " PREHEAT_1_LABEL + #endif + #endif + #if PIN_EXISTS(BUTTON3) + #ifndef BUTTON3_HIT_STATE + #define BUTTON3_HIT_STATE LOW + #endif + #ifndef BUTTON3_WHEN_PRINTING + #define BUTTON3_WHEN_PRINTING false + #endif + #ifndef BUTTON3_GCODE + #define BUTTON3_GCODE "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND) + #endif + #ifndef BUTTON3_DESC + #define BUTTON3_DESC "Preheat for " PREHEAT_2_LABEL + #endif + #endif +#endif +#if ENABLED(CANCEL_OBJECTS) + #ifndef CANCEL_OBJECTS_REPORTING + #define CANCEL_OBJECTS_REPORTING + #endif +#endif +#if ENABLED(I2C_POSITION_ENCODERS) + #ifndef I2CPE_ENCODER_CNT + #define I2CPE_ENCODER_CNT 1 + #endif + #ifndef I2CPE_ENC_1_ADDR + #define I2CPE_ENC_1_ADDR I2CPE_PRESET_ADDR_X + #endif + #ifndef I2CPE_ENC_1_AXIS + #define I2CPE_ENC_1_AXIS X_AXIS + #endif + #ifndef I2CPE_ENC_1_TYPE + #define I2CPE_ENC_1_TYPE I2CPE_ENC_TYPE_LINEAR + #endif + #ifndef I2CPE_ENC_1_TICKS_UNIT + #define I2CPE_ENC_1_TICKS_UNIT 2048 + #endif + #ifndef I2CPE_ENC_1_EC_METHOD + #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP + #endif + #ifndef I2CPE_ENC_1_EC_THRESH + #define I2CPE_ENC_1_EC_THRESH 0.10 + #endif + #ifndef I2CPE_ENC_2_ADDR + #define I2CPE_ENC_2_ADDR I2CPE_PRESET_ADDR_Y + #endif + #ifndef I2CPE_ENC_2_AXIS + #define I2CPE_ENC_2_AXIS Y_AXIS + #endif + #ifndef I2CPE_ENC_2_TYPE + #define I2CPE_ENC_2_TYPE I2CPE_ENC_TYPE_LINEAR + #endif + #ifndef I2CPE_ENC_2_TICKS_UNIT + #define I2CPE_ENC_2_TICKS_UNIT 2048 + #endif + #ifndef I2CPE_ENC_2_EC_METHOD + #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP + #endif + #ifndef I2CPE_ENC_2_EC_THRESH + #define I2CPE_ENC_2_EC_THRESH 0.10 + #endif + #ifndef I2CPE_ENC_3_ADDR + #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z + #endif + #ifndef I2CPE_ENC_3_AXIS + #define I2CPE_ENC_3_AXIS Z_AXIS + #endif + #ifndef I2CPE_ENC_4_ADDR + #define I2CPE_ENC_4_ADDR I2CPE_PRESET_ADDR_E + #endif + #ifndef I2CPE_ENC_4_AXIS + #define I2CPE_ENC_4_AXIS E_AXIS + #endif + #ifndef I2CPE_ENC_5_ADDR + #define I2CPE_ENC_5_ADDR 34 + #endif + #ifndef I2CPE_ENC_5_AXIS + #define I2CPE_ENC_5_AXIS E_AXIS + #endif + #ifndef I2CPE_DEF_TYPE + #define I2CPE_DEF_TYPE I2CPE_ENC_TYPE_LINEAR + #endif + #ifndef I2CPE_DEF_ENC_TICKS_UNIT + #define I2CPE_DEF_ENC_TICKS_UNIT 2048 + #endif + #ifndef I2CPE_DEF_TICKS_REV + #define I2CPE_DEF_TICKS_REV (16 * 200) + #endif + #ifndef I2CPE_DEF_EC_METHOD + #define I2CPE_DEF_EC_METHOD I2CPE_ECM_NONE + #endif + #ifndef I2CPE_DEF_EC_THRESH + #define I2CPE_DEF_EC_THRESH 0.1 + #endif + #ifndef I2CPE_TIME_TRUSTED + #define I2CPE_TIME_TRUSTED 10000 + #endif + #ifndef I2CPE_MIN_UPD_TIME_MS + #define I2CPE_MIN_UPD_TIME_MS 4 + #endif + #ifndef I2CPE_ERR_ROLLING_AVERAGE + #define I2CPE_ERR_ROLLING_AVERAGE + #endif +#endif +#if ENABLED(JOYSTICK) + #ifndef JOY_X_PIN + #define JOY_X_PIN 5 + #endif + #ifndef JOY_Y_PIN + #define JOY_Y_PIN 10 + #endif + #ifndef JOY_Z_PIN + #define JOY_Z_PIN 12 + #endif + #ifndef JOY_EN_PIN + #define JOY_EN_PIN 44 + #endif + #ifndef JOY_X_LIMITS + #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } + #endif + #ifndef JOY_Y_LIMITS + #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 } + #endif + #ifndef JOY_Z_LIMITS + #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 } + #endif +#endif +#if ENABLED(MECHANICAL_GANTRY_CALIBRATION) + #ifndef GANTRY_CALIBRATION_CURRENT + #define GANTRY_CALIBRATION_CURRENT 600 + #endif + #ifndef GANTRY_CALIBRATION_EXTRA_HEIGHT + #define GANTRY_CALIBRATION_EXTRA_HEIGHT 15 + #endif + #ifndef GANTRY_CALIBRATION_FEEDRATE + #define GANTRY_CALIBRATION_FEEDRATE 500 + #endif + #ifndef GANTRY_CALIBRATION_COMMANDS_POST + #define GANTRY_CALIBRATION_COMMANDS_POST "G28" + #endif +#endif +#if ENABLED(FREEZE_FEATURE) + #ifndef FREEZE_STATE + #define FREEZE_STATE LOW + #endif +#endif +#if ENABLED(MAX7219_DEBUG) + #ifndef MAX7219_CLK_PIN + #define MAX7219_CLK_PIN 64 + #endif + #ifndef MAX7219_DIN_PIN + #define MAX7219_DIN_PIN 57 + #endif + #ifndef MAX7219_LOAD_PIN + #define MAX7219_LOAD_PIN 44 + #endif + #ifndef MAX7219_INIT_TEST + #define MAX7219_INIT_TEST 2 + #endif + #ifndef MAX7219_NUMBER_UNITS + #define MAX7219_NUMBER_UNITS 1 + #endif + #ifndef MAX7219_ROTATE + #define MAX7219_ROTATE 0 + #endif + #ifndef MAX7219_DEBUG_PRINTER_ALIVE + #define MAX7219_DEBUG_PRINTER_ALIVE + #endif + #ifndef MAX7219_DEBUG_PLANNER_HEAD + #define MAX7219_DEBUG_PLANNER_HEAD 2 + #endif + #ifndef MAX7219_DEBUG_PLANNER_TAIL + #define MAX7219_DEBUG_PLANNER_TAIL 4 + #endif + #ifndef MAX7219_DEBUG_PLANNER_QUEUE + #define MAX7219_DEBUG_PLANNER_QUEUE 0 + #endif + #ifndef MAX7219_DEBUG_PROFILE + #define MAX7219_DEBUG_PROFILE 6 + #endif +#endif +#if HAS_ETHERNET + #ifndef MAC_ADDRESS + #define MAC_ADDRESS { 0xDE, 0xAD, 0xBE, 0xEF, 0xF0, 0x0D } + #endif +#endif +#if !(HAS_PRUSA_MMU1) && (HAS_PRUSA_MMU2) + + #ifndef MMU2_SERIAL_PORT + #define MMU2_SERIAL_PORT 2 + #endif + #ifndef MMU2_FILAMENT_RUNOUT_SCRIPT + #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600" + #endif + #ifndef MMU2_FILAMENTCHANGE_EJECT_FEED + #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0 + #endif + #ifndef MMU2_LOAD_TO_NOZZLE_SEQUENCE + #define MMU2_LOAD_TO_NOZZLE_SEQUENCE { 7.2, 1145 }, { 14.4, 871 }, { 36.0, 1393 }, { 14.4, 871 }, { 50.0, 198 } + #endif + #ifndef MMU2_RAMMING_SEQUENCE + #define MMU2_RAMMING_SEQUENCE { 1.0, 1000 }, { 1.0, 1500 }, { 2.0, 2000 }, { 1.5, 3000 }, { 2.5, 4000 }, { -15.0, 5000 }, { -14.0, 1200 }, { -6.0, 600 }, { 10.0, 700 }, { -10.0, 400 }, { -50.0, 2000 } + #endif + #if HAS_PRUSA_MMU2S + #ifndef MMU2_C0_RETRY + #define MMU2_C0_RETRY 5 + #endif + #ifndef MMU2_CAN_LOAD_FEEDRATE + #define MMU2_CAN_LOAD_FEEDRATE 800 + #endif + #ifndef MMU2_CAN_LOAD_SEQUENCE + #define MMU2_CAN_LOAD_SEQUENCE { 0.1, MMU2_CAN_LOAD_FEEDRATE }, { 60.0, MMU2_CAN_LOAD_FEEDRATE }, { -52.0, MMU2_CAN_LOAD_FEEDRATE } + #endif + #ifndef MMU2_CAN_LOAD_RETRACT + #define MMU2_CAN_LOAD_RETRACT 6.0 + #endif + #ifndef MMU2_CAN_LOAD_DEVIATION + #define MMU2_CAN_LOAD_DEVIATION 0.8 + #endif + #ifndef MMU2_CAN_LOAD_INCREMENT + #define MMU2_CAN_LOAD_INCREMENT 0.2 + #endif + #ifndef MMU2_CAN_LOAD_INCREMENT_SEQUENCE + #define MMU2_CAN_LOAD_INCREMENT_SEQUENCE { -MMU2_CAN_LOAD_INCREMENT, MMU2_CAN_LOAD_FEEDRATE } + #endif + #else + #if ENABLED(MMU_EXTRUDER_SENSOR) + #ifndef MMU_LOADING_ATTEMPTS_NR + #define MMU_LOADING_ATTEMPTS_NR 5 + #endif + #endif + #endif +#endif +#if ENABLED(PRINTCOUNTER) + #ifndef SERVICE_WARNING_BUZZES + #define SERVICE_WARNING_BUZZES 3 + #endif +#endif diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index fa4e0a4c3c..d58f82a7a9 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -1534,12 +1534,6 @@ #if ANY(Z_PROBE_ALLEN_KEY, MAG_MOUNTED_PROBE) #define PROBE_TRIGGERED_WHEN_STOWED_TEST 1 // Extra test for Allen Key Probe #endif - #ifndef Z_CLEARANCE_BETWEEN_PROBES - #define Z_CLEARANCE_BETWEEN_PROBES 5 - #endif - #ifndef Z_CLEARANCE_MULTI_PROBE - #define Z_CLEARANCE_MULTI_PROBE 5 - #endif #ifndef Z_PROBE_ERROR_TOLERANCE #define Z_PROBE_ERROR_TOLERANCE Z_CLEARANCE_MULTI_PROBE #endif @@ -1558,6 +1552,8 @@ #undef HOMING_Z_WITH_PROBE #undef Z_CLEARANCE_MULTI_PROBE #undef Z_PROBE_ERROR_TOLERANCE + #undef Z_AFTER_PROBING + #undef Z_PROBE_LOW_POINT #undef MULTIPLE_PROBING #undef EXTRA_PROBING #undef PROBE_OFFSET_ZMIN @@ -1567,6 +1563,8 @@ #undef PROBING_HEATERS_OFF #undef WAIT_FOR_BED_HEATER #undef WAIT_FOR_HOTEND + #undef PROBING_FANS_OFF + #undef PROBING_ESTEPPERS_OFF #undef PROBING_STEPPERS_OFF #undef DELAY_BEFORE_PROBING #undef PREHEAT_BEFORE_PROBING @@ -1575,13 +1573,6 @@ #undef NOZZLE_TO_PROBE_OFFSET #endif -#ifndef Z_CLEARANCE_DEPLOY_PROBE - #define Z_CLEARANCE_DEPLOY_PROBE 10 -#endif -#ifndef Z_PROBE_LOW_POINT - #define Z_PROBE_LOW_POINT -5 -#endif - #if ENABLED(BELTPRINTER) && !defined(HOME_Y_BEFORE_X) #define HOME_Y_BEFORE_X #endif @@ -1642,6 +1633,71 @@ #undef MESH_INSET #endif +#if NONE(PROBE_SELECTED, AUTO_BED_LEVELING_UBL) + #undef Z_CLEARANCE_BETWEEN_PROBES +#endif + +#if NONE(PROBE_SELECTED, DELTA_AUTO_CALIBRATION, DELTA_CALIBRATION_MENU) + #undef PROBING_MARGIN + #undef PROBING_MARGIN_LEFT + #undef PROBING_MARGIN_RIGHT + #undef PROBING_MARGIN_FRONT + #undef PROBING_MARGIN_BACK + #undef XY_PROBE_FEEDRATE +#endif + +#if !(ANY(HAS_BED_PROBE, HAS_LEVELING) || ALL(AUTO_BED_LEVELING_UBL, HAS_MARLINUI_MENU)) + #undef Z_CLEARANCE_DEPLOY_PROBE +#endif + +#if !(ANY(HAS_BED_PROBE, BACKLASH_GCODE) || (ENABLED(EXTENSIBLE_UI) && ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL))) + #undef Z_PROBE_FEEDRATE_FAST + #undef Z_PROBE_FEEDRATE_SLOW +#endif + +/** + * Z_CLEARANCE_FOR_HOMING + */ +#ifndef Z_CLEARANCE_FOR_HOMING + #ifdef Z_CLEARANCE_BETWEEN_PROBES + #define Z_CLEARANCE_FOR_HOMING Z_CLEARANCE_BETWEEN_PROBES + #else + #define Z_CLEARANCE_FOR_HOMING 5 + #endif +#endif + +/** + * Z_CLEARANCE_BETWEEN_PROBES + */ +#if PROBE_SELECTED || (HAS_MARLINUI_MENU && ANY(DELTA_CALIBRATION_MENU, DELTA_AUTO_CALIBRATION)) + #ifndef Z_CLEARANCE_BETWEEN_PROBES + #define Z_CLEARANCE_BETWEEN_PROBES Z_CLEARANCE_FOR_HOMING + #endif +#endif + +/** + * Z_CLEARANCE_BETWEEN_MANUAL_PROBES / Z_CLEARANCE_MULTI_PROBE + */ +#if PROBE_SELECTED + #if ANY(MESH_BED_LEVELING, PROBE_MANUALLY) + #if Z_CLEARANCE_BETWEEN_PROBES > Z_CLEARANCE_FOR_HOMING + #define Z_CLEARANCE_BETWEEN_MANUAL_PROBES Z_CLEARANCE_BETWEEN_PROBES + #else + #define Z_CLEARANCE_BETWEEN_MANUAL_PROBES Z_CLEARANCE_FOR_HOMING + #endif + #endif + #ifndef Z_CLEARANCE_MULTI_PROBE + #ifdef Z_CLEARANCE_BETWEEN_PROBES + #define Z_CLEARANCE_MULTI_PROBE Z_CLEARANCE_BETWEEN_PROBES + #else + #define Z_CLEARANCE_MULTI_PROBE 5 + #endif + #endif +#endif +#if TOTAL_PROBING < 2 + #undef Z_CLEARANCE_MULTI_PROBE +#endif + #if DISABLED(ENABLE_LEVELING_FADE_HEIGHT) #undef DEFAULT_LEVELING_FADE_HEIGHT #endif diff --git a/Marlin/src/inc/Conditionals_adv.h b/Marlin/src/inc/Conditionals_adv.h index 5d8c492e2b..c0a6597744 100644 --- a/Marlin/src/inc/Conditionals_adv.h +++ b/Marlin/src/inc/Conditionals_adv.h @@ -746,9 +746,6 @@ #elif TEMP_SENSOR_BED == 998 || TEMP_SENSOR_BED == 999 #define TEMP_SENSOR_BED_IS_DUMMY 1 #endif -#else - #undef BED_MINTEMP - #undef BED_MAXTEMP #endif #if TEMP_SENSOR_CHAMBER == -4 @@ -766,10 +763,6 @@ #elif TEMP_SENSOR_CHAMBER == 998 || TEMP_SENSOR_CHAMBER == 999 #define TEMP_SENSOR_CHAMBER_IS_DUMMY 1 #endif -#else - #undef THERMAL_PROTECTION_CHAMBER - #undef CHAMBER_MINTEMP - #undef CHAMBER_MAXTEMP #endif #if TEMP_SENSOR_COOLER == -4 @@ -787,10 +780,6 @@ #if TEMP_SENSOR_COOLER == 1000 #define TEMP_SENSOR_COOLER_IS_CUSTOM 1 #endif -#else - #undef THERMAL_PROTECTION_COOLER - #undef COOLER_MINTEMP - #undef COOLER_MAXTEMP #endif #if TEMP_SENSOR_PROBE == -4 @@ -836,6 +825,46 @@ #undef TEMP_SENSOR_AD8495_OFFSET #endif +#if !HAS_HOTEND + #undef THERMAL_PROTECTION_PERIOD + #undef THERMAL_PROTECTION_HYSTERESIS + #undef WATCH_TEMP_PERIOD + #undef WATCH_TEMP_INCREASE + #undef ADAPTIVE_FAN_SLOWING + #undef REPORT_ADAPTIVE_FAN_SLOWING + #undef TEMP_TUNING_MAINTAIN_FAN +#endif + +#if !TEMP_SENSOR_BED + #undef THERMAL_PROTECTION_BED + #undef THERMAL_PROTECTION_BED_PERIOD + #undef THERMAL_PROTECTION_BED_HYSTERESIS + #undef WATCH_BED_TEMP_PERIOD + #undef WATCH_BED_TEMP_INCREASE + #undef BED_MINTEMP + #undef BED_MAXTEMP +#endif + +#if !TEMP_SENSOR_CHAMBER + #undef THERMAL_PROTECTION_CHAMBER + #undef THERMAL_PROTECTION_CHAMBER_PERIOD + #undef THERMAL_PROTECTION_CHAMBER_HYSTERESIS + #undef WATCH_CHAMBER_TEMP_PERIOD + #undef WATCH_CHAMBER_TEMP_INCREASE + #undef CHAMBER_MINTEMP + #undef CHAMBER_MAXTEMP +#endif + +#if !TEMP_SENSOR_COOLER + #undef THERMAL_PROTECTION_COOLER + #undef THERMAL_PROTECTION_COOLER_PERIOD + #undef THERMAL_PROTECTION_COOLER_HYSTERESIS + #undef WATCH_COOLER_TEMP_PERIOD + #undef WATCH_COOLER_TEMP_INCREASE + #undef COOLER_MINTEMP + #undef COOLER_MAXTEMP +#endif + #if HAS_MULTI_EXTRUDER || HAS_MULTI_HOTEND || HAS_PRUSA_MMU2 || (ENABLED(MIXING_EXTRUDER) && MIXING_VIRTUAL_TOOLS > 1) #define HAS_TOOLCHANGE 1 #endif diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index ecd84d6e26..1028814c31 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -3383,34 +3383,6 @@ #undef SOUND_ON_DEFAULT #endif -/** - * Z_CLEARANCE_FOR_HOMING / Z_CLEARANCE_BETWEEN_PROBES - */ -#ifndef Z_CLEARANCE_FOR_HOMING - #ifdef Z_CLEARANCE_BETWEEN_PROBES - #define Z_CLEARANCE_FOR_HOMING Z_CLEARANCE_BETWEEN_PROBES - #else - #define Z_CLEARANCE_FOR_HOMING 0 - #endif -#endif - -#ifndef Z_CLEARANCE_BETWEEN_PROBES - #define Z_CLEARANCE_BETWEEN_PROBES Z_CLEARANCE_FOR_HOMING -#endif -#if PROBE_SELECTED - #if Z_CLEARANCE_BETWEEN_PROBES > Z_CLEARANCE_FOR_HOMING - #define Z_CLEARANCE_BETWEEN_MANUAL_PROBES Z_CLEARANCE_BETWEEN_PROBES - #else - #define Z_CLEARANCE_BETWEEN_MANUAL_PROBES Z_CLEARANCE_FOR_HOMING - #endif - #ifndef Z_CLEARANCE_MULTI_PROBE - #define Z_CLEARANCE_MULTI_PROBE Z_CLEARANCE_BETWEEN_PROBES - #endif - #if ENABLED(BLTOUCH) && !defined(BLTOUCH_DELAY) - #define BLTOUCH_DELAY 500 - #endif -#endif - // Define a starting height for measuring manual probe points #ifndef MANUAL_PROBE_START_Z #if ANY(MESH_BED_LEVELING, PROBE_MANUALLY) diff --git a/Marlin/src/inc/MarlinConfigPre.h b/Marlin/src/inc/MarlinConfigPre.h index c2191ab1b7..4750a2e3f6 100644 --- a/Marlin/src/inc/MarlinConfigPre.h +++ b/Marlin/src/inc/MarlinConfigPre.h @@ -25,6 +25,11 @@ #define __MARLIN_FIRMWARE__ #endif +#if __has_include("../../Config.h") + #define USE_BASE_CONFIGS 1 + #include "../../Config.h" +#endif + // // Prefix header to acquire configurations // @@ -36,7 +41,12 @@ #include "../core/macros.h" #include "../core/boards.h" -#include "../../Configuration.h" + +#if USE_BASE_CONFIGS + #include "BaseConfiguration.h" +#else + #include "../../Configuration.h" +#endif #ifdef CUSTOM_VERSION_FILE #if __has_include(STRINGIFY(../../CUSTOM_VERSION_FILE)) @@ -53,7 +63,12 @@ #endif #include "../core/drivers.h" -#include "../../Configuration_adv.h" + +#if USE_BASE_CONFIGS + #include "BaseConfiguration_adv.h" +#else + #include "../../Configuration_adv.h" +#endif #include "Conditionals_adv.h" diff --git a/Marlin/src/inc/Warnings.cpp b/Marlin/src/inc/Warnings.cpp index 520b5704ab..b76d3497c0 100644 --- a/Marlin/src/inc/Warnings.cpp +++ b/Marlin/src/inc/Warnings.cpp @@ -60,6 +60,21 @@ #endif #endif +#if USE_BASE_CONFIGS + #if __has_include("../../Configuration.h") + #define HAS_IGNORED_CONFIGS + #elif __has_include("../../Configuration_adv.h") + #define HAS_IGNORED_CONFIGS + #endif + #ifdef HAS_IGNORED_CONFIGS + #warning "Configuration.h and Configuration_adv.h are being ignored, overridden by Config.h." + #endif +#endif + +#if CONFIG_EXPORT % 100 == 5 + #warning "Rename 'Config-export.h' to 'Config.h' to override Configuration.h and Configuration_adv.h." +#endif + #if DISABLED(DEBUG_FLAGS_GCODE) #warning "DEBUG_FLAGS_GCODE is recommended if you have space. Some hosts rely on it." #endif diff --git a/Marlin/src/lcd/menu/menu_delta_calibrate.cpp b/Marlin/src/lcd/menu/menu_delta_calibrate.cpp index c7da12a61e..5ffd052e14 100644 --- a/Marlin/src/lcd/menu/menu_delta_calibrate.cpp +++ b/Marlin/src/lcd/menu/menu_delta_calibrate.cpp @@ -32,6 +32,7 @@ #include "../../module/delta.h" #include "../../module/motion.h" #include "../../module/planner.h" +#include "../../module/probe.h" #if HAS_LEVELING #include "../../feature/bedlevel/bedlevel.h" @@ -41,10 +42,6 @@ #include "../extui/ui_api.h" #endif -#if HAS_PROBE_XY_OFFSET - #include "../../module/probe.h" -#endif - void _man_probe_pt(const xy_pos_t &xy) { if (!ui.wait_for_move) { ui.wait_for_move = true; diff --git a/buildroot/bin/mftest b/buildroot/bin/mftest index 5ccfd1df55..9048d8a244 100755 --- a/buildroot/bin/mftest +++ b/buildroot/bin/mftest @@ -158,8 +158,11 @@ if ((AUTO_BUILD)); then *) SYS='uni' ;; esac echo ; echo -n "Auto " ; ((AUTO_BUILD == 2)) && echo "Upload..." || echo "Build..." - MB=$( grep -E "^\s*#define MOTHERBOARD" Marlin/Configuration.h | awk '{ print $3 }' | $SED 's/BOARD_//;s/\r//' ) - [[ -z $MB ]] && { echo "Error - Can't read MOTHERBOARD setting." ; exit 1 ; } + MB=$( grep -E "^\s*#define MOTHERBOARD" Marlin/Configuration.h 2>/dev/null | awk '{ print $3 }' | $SED 's/BOARD_//;s/\r//' ) + [[ -z $MB ]] && { + MB=$( grep -E "^\s*#define MOTHERBOARD" Marlin/Config.h 2>/dev/null | awk '{ print $3 }' | $SED 's/BOARD_//;s/\r//' ) + [[ -z $MB ]] && { echo "Error - Can't read MOTHERBOARD setting." ; exit 1 ; } + } BLINE=$( grep -E "define\s+BOARD_$MB\b" Marlin/src/core/boards.h ) BNUM=$( $SED -E 's/^.+BOARD_[^ ]+ +([0-9]+).+$/\1/' <<<"$BLINE" ) BDESC=$( $SED -E 's/^.+\/\/ *(.+)$/\1/' <<<"$BLINE" ) diff --git a/buildroot/share/PlatformIO/scripts/signature.py b/buildroot/share/PlatformIO/scripts/signature.py index 2df4e099f8..1a6c262dba 100755 --- a/buildroot/share/PlatformIO/scripts/signature.py +++ b/buildroot/share/PlatformIO/scripts/signature.py @@ -7,6 +7,7 @@ import schema import subprocess,re,json,hashlib from datetime import datetime from pathlib import Path +from functools import reduce def enabled_defines(filepath): ''' @@ -208,7 +209,29 @@ def compute_build_signature(env): conf_schema = None # - # Produce an INI file if CONFIG_EXPORT == 2 + # CONFIG_EXPORT 2 = config.ini, 5 = Config.h + # Get sections using the schema class + # + if extended_dump and config_dump in (2, 5): + if not conf_schema: exit(1) + + # Start with a preferred @section ordering + preorder = ('info','machine','extruder','stepper drivers','geometry','homing','endstops','probes','lcd','interface','host','reporting') + sections = { key:{} for key in preorder } + + # Group options by schema @section + for header in real_config: + for name in real_config[header]: + #print(f" name: {name}") + if name in ignore: continue + ddict = real_config[header][name] + #print(f" real_config[{header}][{name}]:", ddict) + sect = ddict['section'] + if sect not in sections: sections[sect] = {} + sections[sect][name] = ddict + + # + # CONFIG_EXPORT 2 = config.ini # if config_dump == 2: print(yellow + "Generating config.ini ...") @@ -333,6 +356,54 @@ f'''# if val == '': val = 'on' outfile.write(ini_fmt.format(name.lower(), val) + '\n') + # + # CONFIG_EXPORT 5 = Config.h + # + if config_dump == 5: + print(yellow + "Generating Config-export.h ...") + + config_h = Path('Marlin', 'Config-export.h') + with config_h.open('w') as outfile: + filegrp = { 'Configuration.h':'config:basic', 'Configuration_adv.h':'config:advanced' } + vers = build_defines["CONFIGURATION_H_VERSION"] + dt_string = datetime.now().strftime("%Y-%m-%d at %H:%M:%S") + + out_text = f'''/** + * Config.h - Marlin Firmware distilled configuration + * Usage: Place this file in the 'Marlin' folder with the name 'Config.h'. + * + * Exported by Marlin build on {dt_string}. + */ +''' + + subs = (('Bltouch','BLTouch'),('hchop','hChop'),('Eeprom','EEPROM'),('Gcode','G-code'),('lguard','lGuard'),('Idex','IDEX'),('Lcd','LCD'),('Mpc','MPC'),('Pid','PID'),('Psu','PSU'),('Scara','SCARA'),('Spi','SPI'),('Tmc','TMC'),('Tpara','TPARA')) + define_fmt = '#define {0:40} {1}' + if extended_dump: + # Loop through the sections + for skey in sections: + #print(f" skey: {skey}") + opts = sections[skey] + headed = False + for name in sorted(opts): + if name in ignore: continue + val = opts[name]['value'] + if not headed: + head = reduce(lambda s, r: s.replace(*r), subs, skey.title()) + out_text += f"\n//\n// {head}\n//\n" + headed = True + out_text += define_fmt.format(name, val).strip() + '\n' + + else: + # Dump config options in just two sections, by file + for header in real_config: + out_text += f'\n/**\n * Overrides for {header}\n */\n' + for name in sorted(real_config[header]): + if name in ignore: continue + val = real_config[header][name]['value'] + out_text += define_fmt.format(name, val).strip() + '\n' + + outfile.write(out_text) + # # CONFIG_EXPORT 3 = schema.json, 4 = schema.yml # diff --git a/buildroot/share/scripts/makeBaseConfigs.py b/buildroot/share/scripts/makeBaseConfigs.py new file mode 100755 index 0000000000..75d0d78685 --- /dev/null +++ b/buildroot/share/scripts/makeBaseConfigs.py @@ -0,0 +1,94 @@ +#!/usr/bin/env python3 +# +# makeBaseConfigs.py +# +# Create "base" config files that can be overridden by a minimal config file. +# The intention is to include base config files as part of the Marlin package +# so users can use a minimal configuration with the familiar header format. +# This provides an Arduino-compatible way to apply configurations without the +# complications that come from a plain config.ini solution. +# +import re +from pathlib import Path + +def make_base_configs(): + no_disabled = True + + # Create a regex to match options and capture line parts + define_patt = re.compile(r'^(\s*)((//\s*)?#define\s+)([A-Z0-9_]+\b)(\s*)(.*?)(\s*)(//.*)?$', re.IGNORECASE) + ifndef_patt = re.compile(r'^(\s*#ifndef\s*.*?)(\s*//.*)?$', re.IGNORECASE) + ifstat_patt = re.compile(r'^(\s*#(if|ifn?def|else|elif|endif)\s*.*?)(\s*//.*)?$', re.IGNORECASE) + coment_patt = re.compile(r'/\*.*?\*/', re.DOTALL) + contin_patt = re.compile(r'\\\n\s*') + + # Wrap all config options in #ifndef + for file in ('Configuration.h', 'Configuration_adv.h'): + fullpath = Path('Marlin', file) + fulltext = fullpath.read_text(encoding='utf-8') + fulltext = coment_patt.sub('', fulltext) + fulltext = contin_patt.sub(' ', fulltext) + + is_ifndef = False + + lines_out = [] + for line in fulltext.split('\n'): + + was_ifndef = is_ifndef # Previous line was #ifndef? + is_ifndef = ifndef_patt.match(line) # This line is #ifndef? + + m = ifstat_patt.match(line) + if m: lines_out += [m[1]] ; continue + + m = define_patt.match(line) + if m: + if no_disabled and line.strip().startswith('//'): continue + + name = m[4] + if name in ('CONFIG_EXAMPLES_DIR', 'CONFIG_EXPORT'): continue + if name.startswith('_'): continue + + if not was_ifndef: lines_out += [f'{m[1]}#ifndef {name}'] + + entab = '' if was_ifndef else ' ' + indented = f'{entab}{m[1]}{m[2]}{m[4]} {m[6]}'.rstrip() + lines_out += [indented] + + if not was_ifndef: lines_out += [f'{m[1]}#endif'] + + # Final text needs some additional cleanup to remove empty blocks + empty_patt = re.compile(r'(\s*#if.+)(\n\s*#el.+)*(\n\s*#endif.*)') + ifelse_patt = re.compile(r'(\s*#(el)?if\s+)(.+)\n\s*#else') + ifelif_patt = re.compile(r'(\s*#if\s+)(.+)\n\s*#elif\s*(.+)') + out_text = '\n'.join(lines_out) + old_text = '' + while out_text != old_text: + old_text = out_text + out_text = ifelse_patt.sub(r'\1!(\3)', out_text) + out_text = ifelif_patt.sub(r'\1!(\2) && (\3)\n', out_text) + out_text = empty_patt.sub('', out_text) + + # Store the final result to Marlin/src/inc/BaseConfiguration.h BaseConfiguration_adv.h + outname = f'Base{file}' + outpath = Path('Marlin', 'src', 'inc', outname) + + with outpath.open('w') as outfile: + + from datetime import datetime + header_tpl = Path('buildroot', 'share', 'extras', 'file_header.h').read_text(encoding='utf-8') + header_tpl = re.sub(r'(\(c\))\s*\d+\s*(MarlinFirmware)', rf'\1 {datetime.now().year} \2', header_tpl) + header_tpl = re.sub(r'\*/\n+/\*\*', '*/\n#pragma once\n\n/**', header_tpl) + header_tpl = header_tpl.replace(r'$(filename)', f"{outname} - Generated using makeBaseConfigs.py") + + outfile.write(header_tpl + out_text + '\n') + +# Always run from the command line. +# Later we can add a "minimal" flag to config to do this automatically. +if __name__ == "__main__": + import sys + args = sys.argv[1:] + if len(args) > 0: + print(f"Usage: {sys.argv[0]}") + elif not Path('Marlin', 'src').is_dir(): + print(f"Please run {sys.argv[0]} from the root of the Marlin workspace.") + else: + make_base_configs() diff --git a/docs/Maintenance.md b/docs/Maintenance.md new file mode 100644 index 0000000000..a0bb62b779 --- /dev/null +++ b/docs/Maintenance.md @@ -0,0 +1,14 @@ +# Marlin Code Maintenance + +In addition to the general work of fixing bugs, supporting new hardware, developing new features, and refining existing features we have to also maintain supporting files that change in tandem with the codebase. Some of this maintenance can be done as part of CI, and we may even generate commits to the development branch using periodic checks whenever any auto-generated files need to be regenerated. (See `bump-date.yml` for one example.) + +## Configuration Tasks + +- Add CI build tests and Unit Testing to catch future breaking changes. +- Periodically run `buildroot/bin/build_all_examples` to make sure configs and code are buildable. +- Periodically run `buildroot/share/scripts/makeBaseConfigs.py` to generate new base configurations. + +## Documentation Tasks + +- For any G-code command changes update G-code pages and the RepRap wiki G-code page. +- For a new feature or changes to an existing feature update Configuration page and any articles about the feature.