diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 837716120d..8723b6947a 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -36,6 +36,7 @@ * Advanced settings can be found in Configuration_adv.h */ #define CONFIGURATION_H_VERSION 02010300 +#define PRUSA_AIO_VERSION 20240423 //=========================================================================== //============================= Getting Started ============================= @@ -61,14 +62,14 @@ // @section info // Author info of this build printed to the host during boot and M115 -#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. +#define STRING_CONFIG_H_AUTHOR "(thisiskeithb)" // Who made the changes. //#define CUSTOM_VERSION_FILE Version.h // Path from the root directory (no quotes) // @section machine // Choose the name from boards.h that matches your setup #ifndef MOTHERBOARD - #define MOTHERBOARD BOARD_RAMPS_14_EFB + //#define MOTHERBOARD BOARD_RAMPS_14_EFB #endif /** @@ -79,7 +80,7 @@ * * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] */ -#define SERIAL_PORT 0 +#define SERIAL_PORT PRUSA_AIO_USB_SERIAL_PORT /** * Serial Port Baud Rate @@ -92,7 +93,7 @@ * * :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000] */ -#define BAUDRATE 250000 +#define BAUDRATE 115200 //#define BAUD_RATE_GCODE // Enable G-code M575 to set the baud rate @@ -126,7 +127,7 @@ //#define BLUETOOTH // Name displayed in the LCD "Ready" message and Info menu -//#define CUSTOM_MACHINE_NAME "3D Printer" +#define CUSTOM_MACHINE_NAME PRUSA_AIO_CUSTOM_PRINTER_NAME // Printer's unique ID, used by some programs to differentiate between machines. // Choose your own or use a service like https://www.uuidgenerator.net/version4 @@ -149,9 +150,9 @@ * TMC5160, TMC5160_STANDALONE * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC2209', 'TMC2209_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE'] */ -#define X_DRIVER_TYPE A4988 -#define Y_DRIVER_TYPE A4988 -#define Z_DRIVER_TYPE A4988 +#define X_DRIVER_TYPE PRUSA_AIO_DRIVER_TYPE +#define Y_DRIVER_TYPE PRUSA_AIO_DRIVER_TYPE +#define Z_DRIVER_TYPE PRUSA_AIO_DRIVER_TYPE //#define X2_DRIVER_TYPE A4988 //#define Y2_DRIVER_TYPE A4988 //#define Z2_DRIVER_TYPE A4988 @@ -163,7 +164,7 @@ //#define U_DRIVER_TYPE A4988 //#define V_DRIVER_TYPE A4988 //#define W_DRIVER_TYPE A4988 -#define E0_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE PRUSA_AIO_DRIVER_TYPE //#define E1_DRIVER_TYPE A4988 //#define E2_DRIVER_TYPE A4988 //#define E3_DRIVER_TYPE A4988 @@ -563,7 +564,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. */ -#define TEMP_SENSOR_0 1 +#define TEMP_SENSOR_0 PRUSA_AIO_TEMP_SENSOR_0 #define TEMP_SENSOR_1 0 #define TEMP_SENSOR_2 0 #define TEMP_SENSOR_3 0 @@ -572,7 +573,7 @@ #define TEMP_SENSOR_6 0 #define TEMP_SENSOR_7 0 #define TEMP_SENSOR_BED 1 -#define TEMP_SENSOR_PROBE 0 +#define TEMP_SENSOR_PROBE PRUSA_AIO_TEMP_SENSOR_PROBE #define TEMP_SENSOR_CHAMBER 0 #define TEMP_SENSOR_COOLER 0 #define TEMP_SENSOR_BOARD 0 @@ -598,15 +599,15 @@ #endif #if HAS_E_TEMP_SENSOR - #define TEMP_RESIDENCY_TIME 10 // (seconds) Time to wait for hotend to "settle" in M109 - #define TEMP_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer - #define TEMP_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target + #define TEMP_RESIDENCY_TIME 2 // (seconds) Time to wait for hotend to "settle" in M109 + #define TEMP_WINDOW 2 // (°C) Temperature proximity for the "temperature reached" timer + #define TEMP_HYSTERESIS 2 // (°C) Temperature proximity considered "close enough" to the target #endif #if TEMP_SENSOR_BED - #define TEMP_BED_RESIDENCY_TIME 10 // (seconds) Time to wait for bed to "settle" in M190 - #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer - #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target + #define TEMP_BED_RESIDENCY_TIME 2 // (seconds) Time to wait for bed to "settle" in M190 + #define TEMP_BED_WINDOW 3 // (°C) Temperature proximity for the "temperature reached" timer + #define TEMP_BED_HYSTERESIS 7 // (°C) Temperature proximity considered "close enough" to the target #endif #if TEMP_SENSOR_CHAMBER @@ -633,7 +634,7 @@ // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. -#define HEATER_0_MINTEMP 5 +#define HEATER_0_MINTEMP PRUSA_AIO_HEATER_0_MINTEMP #define HEATER_1_MINTEMP 5 #define HEATER_2_MINTEMP 5 #define HEATER_3_MINTEMP 5 @@ -647,7 +648,7 @@ // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. // (Use MINTEMP for thermistor short/failure protection.) -#define HEATER_0_MAXTEMP 275 +#define HEATER_0_MAXTEMP PRUSA_AIO_HEATER_0_MAXTEMP #define HEATER_1_MAXTEMP 275 #define HEATER_2_MAXTEMP 275 #define HEATER_3_MAXTEMP 275 @@ -655,7 +656,7 @@ #define HEATER_5_MAXTEMP 275 #define HEATER_6_MAXTEMP 275 #define HEATER_7_MAXTEMP 275 -#define BED_MAXTEMP 150 +#define BED_MAXTEMP 130 // 120 + 10 #define CHAMBER_MAXTEMP 60 /** @@ -681,7 +682,7 @@ * PIDTEMP : PID temperature control (~4.1K) * MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune) */ -#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning +//#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning //#define MPCTEMP // See https://marlinfw.org/docs/features/model_predictive_control.html #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current @@ -699,9 +700,9 @@ #define DEFAULT_Ki_LIST { 1.08, 1.08 } #define DEFAULT_Kd_LIST { 114.00, 114.00 } #else - #define DEFAULT_Kp 22.20 - #define DEFAULT_Ki 1.08 - #define DEFAULT_Kd 114.00 + #define DEFAULT_Kp PRUSA_AIO_DEFAULT_Kp + #define DEFAULT_Ki PRUSA_AIO_DEFAULT_Ki + #define DEFAULT_Kd PRUSA_AIO_DEFAULT_Kd #endif #else #define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current @@ -717,20 +718,20 @@ */ #if ENABLED(MPCTEMP) #define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash) - //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash) - //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) + #define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash) + #define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) #define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active. - #define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers. + #define MPC_HEATER_POWER PRUSA_AIO_CUSTOM_MPC_HEATER_POWER // (W) Heat cartridge powers. #define MPC_INCLUDE_FAN // Model the fan speed? // Measured physical constants from M306 - #define MPC_BLOCK_HEAT_CAPACITY { 16.7f } // (J/K) Heat block heat capacities. - #define MPC_SENSOR_RESPONSIVENESS { 0.22f } // (K/s per ∆K) Rate of change of sensor temperature from heat block. - #define MPC_AMBIENT_XFER_COEFF { 0.068f } // (W/K) Heat transfer coefficients from heat block to room air with fan off. + #define MPC_BLOCK_HEAT_CAPACITY PRUSA_AIO_CUSTOM_MPC_BLOCK_HEAT_CAPACITY // (J/K) Heat block heat capacities. + #define MPC_SENSOR_RESPONSIVENESS PRUSA_AIO_CUSTOM_MPC_SENSOR_RESPONSIVENESS // (K/s per ∆K) Rate of change of sensor temperature from heat block. + #define MPC_AMBIENT_XFER_COEFF PRUSA_AIO_CUSTOM_MPC_AMBIENT_XFER_COEFF // (W/K) Heat transfer coefficients from heat block to room air with fan off. #if ENABLED(MPC_INCLUDE_FAN) - #define MPC_AMBIENT_XFER_COEFF_FAN255 { 0.097f } // (W/K) Heat transfer coefficients from heat block to room air with fan on full. + #define MPC_AMBIENT_XFER_COEFF_FAN255 PRUSA_AIO_CUSTOM_MPC_AMBIENT_XFER_COEFF_FAN255 // (W/K) Heat transfer coefficients from heat block to room air with fan on full. #endif // For one fan and multiple hotends MPC needs to know how to apply the fan cooling effect. @@ -741,10 +742,10 @@ // Filament Heat Capacity (joules/kelvin/mm) // Set at runtime with M306 H - #define FILAMENT_HEAT_CAPACITY_PERMM { 5.6e-3f } // 0.0056 J/K/mm for 1.75mm PLA (0.0149 J/K/mm for 2.85mm PLA). - // 0.0036 J/K/mm for 1.75mm PETG (0.0094 J/K/mm for 2.85mm PETG). - // 0.00515 J/K/mm for 1.75mm ABS (0.0137 J/K/mm for 2.85mm ABS). - // 0.00522 J/K/mm for 1.75mm Nylon (0.0138 J/K/mm for 2.85mm Nylon). + #define FILAMENT_HEAT_CAPACITY_PERMM PRUSA_AIO_CUSTOM_FILAMENT_HEAT_CAPACITY_PERMM // 0.0056 J/K/mm for 1.75mm PLA (0.0149 J/K/mm for 2.85mm PLA). + // 0.0036 J/K/mm for 1.75mm PETG (0.0094 J/K/mm for 2.85mm PETG). + // 0.00515 J/K/mm for 1.75mm ABS (0.0137 J/K/mm for 2.85mm ABS). + // 0.00522 J/K/mm for 1.75mm Nylon (0.0138 J/K/mm for 2.85mm Nylon). // Advanced options #define MPC_SMOOTHING_FACTOR 0.5f // (0.0...1.0) Noisy temperature sensors may need a lower value for stabilization. @@ -781,7 +782,7 @@ * * With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis. */ -//#define PIDTEMPBED +#define PIDTEMPBED #if ENABLED(PIDTEMPBED) //#define MIN_BED_POWER 0 @@ -789,9 +790,9 @@ // 120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) // from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) - #define DEFAULT_bedKp 10.00 - #define DEFAULT_bedKi .023 - #define DEFAULT_bedKd 305.4 + #define DEFAULT_bedKp PRUSA_AIO_DEFAULT_bedKp + #define DEFAULT_bedKi PRUSA_AIO_DEFAULT_bedKi + #define DEFAULT_bedKd PRUSA_AIO_DEFAULT_bedKd // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. #else @@ -849,11 +850,11 @@ #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 - #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature + #define PID_FUNCTIONAL_RANGE 5 // If the temperature difference between the target temperature and the actual temperature // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max. - //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of flash) - //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of flash) + #define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of flash) + #define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of flash) #endif // @section safety @@ -1180,9 +1181,9 @@ * Endstop "Hit" State * Set to the state (HIGH or LOW) that applies to each endstop. */ -#define X_MIN_ENDSTOP_HIT_STATE HIGH +#define X_MIN_ENDSTOP_HIT_STATE PRUSA_AIO_XY_MIN_ENDSTOP_HIT_STATE #define X_MAX_ENDSTOP_HIT_STATE HIGH -#define Y_MIN_ENDSTOP_HIT_STATE HIGH +#define Y_MIN_ENDSTOP_HIT_STATE PRUSA_AIO_XY_MIN_ENDSTOP_HIT_STATE #define Y_MAX_ENDSTOP_HIT_STATE HIGH #define Z_MIN_ENDSTOP_HIT_STATE HIGH #define Z_MAX_ENDSTOP_HIT_STATE HIGH @@ -1246,7 +1247,7 @@ * Override with M92 (when enabled below) * X, Y, Z [, I [, J [, K...]]], E0 [, E1[, E2...]] */ -#define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 400, 500 } +#define DEFAULT_AXIS_STEPS_PER_UNIT PRUSA_AIO_DEFAULT_AXIS_STEPS_PER_UNIT /** * Enable support for M92. Disable to save at least ~530 bytes of flash. @@ -1258,11 +1259,11 @@ * Override with M203 * X, Y, Z [, I [, J [, K...]]], E0 [, E1[, E2...]] */ -#define DEFAULT_MAX_FEEDRATE { 300, 300, 5, 25 } +#define DEFAULT_MAX_FEEDRATE { 200, 200, 30, 80 } -//#define LIMITED_MAX_FR_EDITING // Limit edit via M203 or LCD to DEFAULT_MAX_FEEDRATE * 2 +#define LIMITED_MAX_FR_EDITING // Limit edit via M203 or LCD to DEFAULT_MAX_FEEDRATE * 2 #if ENABLED(LIMITED_MAX_FR_EDITING) - #define MAX_FEEDRATE_EDIT_VALUES { 600, 600, 10, 50 } // ...or, set your own edit limits + #define MAX_FEEDRATE_EDIT_VALUES { 300, 300, 10, 100 } // ...or, set your own edit limits #endif /** @@ -1271,11 +1272,11 @@ * Override with M201 * X, Y, Z [, I [, J [, K...]]], E0 [, E1[, E2...]] */ -#define DEFAULT_MAX_ACCELERATION { 3000, 3000, 100, 10000 } +#define DEFAULT_MAX_ACCELERATION { 2500, 2500, 100, 10000 } -//#define LIMITED_MAX_ACCEL_EDITING // Limit edit via M201 or LCD to DEFAULT_MAX_ACCELERATION * 2 +#define LIMITED_MAX_ACCEL_EDITING // Limit edit via M201 or LCD to DEFAULT_MAX_ACCELERATION * 2 #if ENABLED(LIMITED_MAX_ACCEL_EDITING) - #define MAX_ACCEL_EDIT_VALUES { 6000, 6000, 200, 20000 } // ...or, set your own edit limits + #define MAX_ACCEL_EDIT_VALUES { 4000, 4000, 200, 20000 } // ...or, set your own edit limits #endif /** @@ -1286,9 +1287,9 @@ * M204 R Retract Acceleration * M204 T Travel Acceleration */ -#define DEFAULT_ACCELERATION 3000 // X, Y, Z and E acceleration for printing moves -#define DEFAULT_RETRACT_ACCELERATION 3000 // E acceleration for retracts -#define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration for travel (non printing) moves +#define DEFAULT_ACCELERATION 2000 // X, Y, Z and E acceleration for printing moves +#define DEFAULT_RETRACT_ACCELERATION 2000 // E acceleration for retracts +#define DEFAULT_TRAVEL_ACCELERATION 2000 // X, Y, Z acceleration for travel (non printing) moves /** * Default Jerk limits (mm/s) @@ -1298,12 +1299,12 @@ * When changing speed and direction, if the difference is less than the * value set here, it may happen instantaneously. */ -//#define CLASSIC_JERK +#define CLASSIC_JERK #if ENABLED(CLASSIC_JERK) - #define DEFAULT_XJERK 10.0 - #define DEFAULT_YJERK 10.0 + #define DEFAULT_XJERK 6.0 + #define DEFAULT_YJERK 6.0 #define DEFAULT_ZJERK 0.3 - #define DEFAULT_EJERK 5.0 + #define DEFAULT_EJERK 4.0 //#define DEFAULT_IJERK 0.3 //#define DEFAULT_JJERK 0.3 //#define DEFAULT_KJERK 0.3 @@ -1327,7 +1328,7 @@ * https://blog.kyneticcnc.com/2018/10/computing-junction-deviation-for-marlin.html */ #if DISABLED(CLASSIC_JERK) - #define JUNCTION_DEVIATION_MM 0.013 // (mm) Distance from real junction edge + #define JUNCTION_DEVIATION_MM 0.012 // (mm) Distance from real junction edge #define JD_HANDLE_SMALL_SEGMENTS // Use curvature estimation instead of just the junction angle // for small segments (< 1mm) with large junction angles (> 135°). #endif @@ -1356,10 +1357,10 @@ * The probe replaces the Z-MIN endstop and is used for Z homing. * (Automatically enables USE_PROBE_FOR_Z_HOMING.) */ -#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN +//#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN // Force the use of the probe for Z-axis homing -//#define USE_PROBE_FOR_Z_HOMING +#define USE_PROBE_FOR_Z_HOMING /** * Z_MIN_PROBE_PIN @@ -1591,7 +1592,7 @@ * | [-] | * O-- FRONT --+ */ -#define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 } +#define NOZZLE_TO_PROBE_OFFSET PRUSA_AIO_NOZZLE_TO_PROBE_OFFSET // Enable and set to use a specific tool for probing. Disable to allow any tool. #define PROBING_TOOL 0 @@ -1601,13 +1602,13 @@ // Most probes should stay away from the edges of the bed, but // with NOZZLE_AS_PROBE this can be negative for a wider probing area. -#define PROBING_MARGIN 10 +#define PROBING_MARGIN PRUSA_AIO_PROBING_MARGIN // X and Y axis travel speed (mm/min) between probes -#define XY_PROBE_FEEDRATE (133*60) +#define XY_PROBE_FEEDRATE (180*60) // Feedrate (mm/min) for the first approach when double-probing (MULTIPLE_PROBING == 2) -#define Z_PROBE_FEEDRATE_FAST (4*60) +#define Z_PROBE_FEEDRATE_FAST (15*60) // Feedrate (mm/min) for the "accurate" probe of each point #define Z_PROBE_FEEDRATE_SLOW (Z_PROBE_FEEDRATE_FAST / 2) @@ -1657,7 +1658,7 @@ * A total of 2 does fast/slow probes with a weighted average. * A total of 3 or more adds more slow probes, taking the average. */ -//#define MULTIPLE_PROBING 2 +#define MULTIPLE_PROBING 3 //#define EXTRA_PROBING 1 /** @@ -1674,24 +1675,24 @@ * Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle. * But: `M851 Z+1` with a CLEARANCE of 2 => 2mm from bed to nozzle. */ -#define Z_CLEARANCE_DEPLOY_PROBE 10 // (mm) Z Clearance for Deploy/Stow -#define Z_CLEARANCE_BETWEEN_PROBES 5 // (mm) Z Clearance between probe points -#define Z_CLEARANCE_MULTI_PROBE 5 // (mm) Z Clearance between multiple probes -#define Z_PROBE_ERROR_TOLERANCE 3 // (mm) Tolerance for early trigger (<= -probe.offset.z + ZPET) +#define Z_CLEARANCE_DEPLOY_PROBE PRUSA_AIO_Z_CLEARANCE_DEPLOY_PROBE // (mm) Z Clearance for Deploy/Stow +#define Z_CLEARANCE_BETWEEN_PROBES PRUSA_AIO_Z_CLEARANCE_BETWEEN_PROBES // (mm) Z Clearance between probe points +#define Z_CLEARANCE_MULTI_PROBE PRUSA_AIO_Z_CLEARANCE_MULTI_PROBE // (mm) Z Clearance between multiple probes +//#define Z_PROBE_ERROR_TOLERANCE 3 // (mm) Tolerance for early trigger (<= -probe.offset.z + ZPET) //#define Z_AFTER_PROBING 5 // (mm) Z position after probing is done -#define Z_PROBE_LOW_POINT -2 // (mm) Farthest distance below the trigger-point to go before stopping +#define Z_PROBE_LOW_POINT -4 // (mm) Farthest distance below the trigger-point to go before stopping // For M851 provide ranges for adjusting the X, Y, and Z probe offsets //#define PROBE_OFFSET_XMIN -50 // (mm) //#define PROBE_OFFSET_XMAX 50 // (mm) //#define PROBE_OFFSET_YMIN -50 // (mm) //#define PROBE_OFFSET_YMAX 50 // (mm) -//#define PROBE_OFFSET_ZMIN -20 // (mm) -//#define PROBE_OFFSET_ZMAX 20 // (mm) +#define PROBE_OFFSET_ZMIN -5 // (mm) +#define PROBE_OFFSET_ZMAX 1 // (mm) // Enable the M48 repeatability test to test probe accuracy -//#define Z_MIN_PROBE_REPEATABILITY_TEST +#define Z_MIN_PROBE_REPEATABILITY_TEST // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW @@ -1759,9 +1760,9 @@ // @section motion // Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way. -#define INVERT_X_DIR false -#define INVERT_Y_DIR true -#define INVERT_Z_DIR false +//#define INVERT_X_DIR false +//#define INVERT_Y_DIR true +//#define INVERT_Z_DIR false //#define INVERT_I_DIR false //#define INVERT_J_DIR false //#define INVERT_K_DIR false @@ -1772,7 +1773,7 @@ // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. -#define INVERT_E0_DIR false +//#define INVERT_E0_DIR false #define INVERT_E1_DIR false #define INVERT_E2_DIR false #define INVERT_E3_DIR false @@ -1831,16 +1832,16 @@ // @section geometry // The size of the printable area -#define X_BED_SIZE 200 -#define Y_BED_SIZE 200 +#define X_BED_SIZE 250 +#define Y_BED_SIZE 210 // Travel limits (linear=mm, rotational=°) after homing, corresponding to endstop positions. #define X_MIN_POS 0 -#define Y_MIN_POS 0 +#define Y_MIN_POS -4 #define Z_MIN_POS 0 -#define X_MAX_POS X_BED_SIZE -#define Y_MAX_POS Y_BED_SIZE -#define Z_MAX_POS 200 +#define X_MAX_POS (X_BED_SIZE + 4) +#define Y_MAX_POS (Y_BED_SIZE + 2.5) +#define Z_MAX_POS PRUSA_AIO_Z_MAX_POS //#define I_MIN_POS 0 //#define I_MAX_POS 50 //#define J_MIN_POS 0 @@ -1892,7 +1893,7 @@ #endif #if ANY(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) - //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD + #define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif /** @@ -1908,12 +1909,12 @@ * RAMPS-based boards use SERVO3_PIN for the first runout sensor. * For other boards you may need to define FIL_RUNOUT_PIN, FIL_RUNOUT2_PIN, etc. */ -//#define FILAMENT_RUNOUT_SENSOR +#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_ENABLED_DEFAULT true // Enable the sensor on startup. Override with M412 followed by M500. #define NUM_RUNOUT_SENSORS 1 // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each. - #define FIL_RUNOUT_STATE LOW // Pin state indicating that filament is NOT present. + #define FIL_RUNOUT_STATE HIGH // Pin state indicating that filament is NOT present. #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. //#define WATCH_ALL_RUNOUT_SENSORS // Execute runout script on any triggering sensor, not only for the active extruder. @@ -1960,7 +1961,7 @@ // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. - //#define FILAMENT_RUNOUT_DISTANCE_MM 25 + #define FILAMENT_RUNOUT_DISTANCE_MM 2 #ifdef FILAMENT_RUNOUT_DISTANCE_MM // Enable this option to use an encoder disc that toggles the runout pin @@ -2067,7 +2068,7 @@ * leveling immediately after G28. */ //#define RESTORE_LEVELING_AFTER_G28 -//#define ENABLE_LEVELING_AFTER_G28 +#define ENABLE_LEVELING_AFTER_G28 /** * Auto-leveling needs preheating @@ -2112,11 +2113,11 @@ /** * Enable the G26 Mesh Validation Pattern tool. */ - //#define G26_MESH_VALIDATION + #define G26_MESH_VALIDATION #if ENABLED(G26_MESH_VALIDATION) #define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle. #define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for G26. - #define MESH_TEST_HOTEND_TEMP 205 // (°C) Default nozzle temperature for G26. + #define MESH_TEST_HOTEND_TEMP 210 // (°C) Default nozzle temperature for G26. #define MESH_TEST_BED_TEMP 60 // (°C) Default bed temperature for G26. #define G26_XY_FEEDRATE 20 // (mm/s) Feedrate for G26 XY moves. #define G26_XY_FEEDRATE_TRAVEL 100 // (mm/s) Feedrate for G26 XY travel moves. @@ -2128,7 +2129,7 @@ #if ANY(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. - #define GRID_MAX_POINTS_X 3 + #define GRID_MAX_POINTS_X 7 #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X // Probe along the Y axis, advancing X after each column @@ -2138,13 +2139,13 @@ // Beyond the probed grid, continue the implied tilt? // Default is to maintain the height of the nearest edge. - //#define EXTRAPOLATE_BEYOND_GRID + #define EXTRAPOLATE_BEYOND_GRID // // Subdivision of the grid by Catmull-Rom method. // Synthesizes intermediate points to produce a more detailed mesh. // - //#define ABL_BILINEAR_SUBDIVISION + #define ABL_BILINEAR_SUBDIVISION #if ENABLED(ABL_BILINEAR_SUBDIVISION) // Number of subdivisions between probe points #define BILINEAR_SUBDIVISIONS 3 @@ -2160,11 +2161,11 @@ //#define MESH_EDIT_GFX_OVERLAY // Display a graphics overlay while editing the mesh - #define MESH_INSET 1 // Set Mesh bounds as an inset region of the bed - #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. + #define MESH_INSET 0 // Set Mesh bounds as an inset region of the bed + #define GRID_MAX_POINTS_X 9 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X - //#define UBL_HILBERT_CURVE // Use Hilbert distribution for less travel when probing multiple points + #define UBL_HILBERT_CURVE // Use Hilbert distribution for less travel when probing multiple points //#define UBL_TILT_ON_MESH_POINTS // Use nearest mesh points with G29 J for better Z reference //#define UBL_TILT_ON_MESH_POINTS_3POINT // Use nearest mesh points with G29 J0 (3-point) @@ -2172,10 +2173,10 @@ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 - //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used - // as the Z-Height correction value. + #define UBL_Z_RAISE_WHEN_OFF_MESH 0 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. - //#define UBL_MESH_WIZARD // Run several commands in a row to get a complete mesh + #define UBL_MESH_WIZARD // Run several commands in a row to get a complete mesh /** * Probing not allowed within the position of an obstacle. @@ -2214,12 +2215,12 @@ * Add a bed leveling sub-menu for ABL or MBL. * Include a guided procedure if manual probing is enabled. */ -//#define LCD_BED_LEVELING +#define LCD_BED_LEVELING #if ENABLED(LCD_BED_LEVELING) #define MESH_EDIT_Z_STEP 0.025 // (mm) Step size while manually probing Z axis. #define LCD_PROBE_Z_RANGE 4 // (mm) Z Range centered on Z_MIN_POS for LCD Z adjustment - //#define MESH_EDIT_MENU // Add a menu to edit mesh points + #define MESH_EDIT_MENU // Add a menu to edit mesh points #endif // Add a menu item to move between bed corners for manual bed adjustment @@ -2264,8 +2265,8 @@ // Manually set the home position. Leave these undefined for automatic settings. // For DELTA this is the top-center of the Cartesian print volume. -//#define MANUAL_X_HOME_POS 0 -//#define MANUAL_Y_HOME_POS 0 +#define MANUAL_X_HOME_POS 0 +#define MANUAL_Y_HOME_POS -4 //#define MANUAL_Z_HOME_POS 0 //#define MANUAL_I_HOME_POS 0 //#define MANUAL_J_HOME_POS 0 @@ -2281,7 +2282,7 @@ * - Allows Z homing only when XY positions are known and trusted. * - If stepper drivers sleep, XY homing may be required again before Z homing. */ -//#define Z_SAFE_HOMING +#define Z_SAFE_HOMING #if ENABLED(Z_SAFE_HOMING) #define Z_SAFE_HOMING_X_POINT X_CENTER // (mm) X point for Z homing @@ -2290,7 +2291,7 @@ #endif // Homing speeds (linear=mm/min, rotational=°/min) -#define HOMING_FEEDRATE_MM_M { (50*60), (50*60), (4*60) } +#define HOMING_FEEDRATE_MM_M PRUSA_AIO_HOMING_FEEDRATE_MM_M // Validate that endstops are triggered on homing moves #define VALIDATE_HOMING_ENDSTOPS @@ -2325,7 +2326,7 @@ * +-------------->X +-------------->X +-------------->Y * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR */ -//#define SKEW_CORRECTION +#define SKEW_CORRECTION #if ENABLED(SKEW_CORRECTION) // Input all length measurements here: @@ -2334,9 +2335,9 @@ #define XY_SIDE_AD 200 // Or, set the XY skew factor directly: - //#define XY_SKEW_FACTOR 0.0 + #define XY_SKEW_FACTOR 0.0 - //#define SKEW_CORRECTION_FOR_Z + #define SKEW_CORRECTION_FOR_Z #if ENABLED(SKEW_CORRECTION_FOR_Z) #define XZ_DIAG_AC 282.8427124746 #define XZ_DIAG_BD 282.8427124746 @@ -2345,12 +2346,12 @@ #define YZ_SIDE_AD 200 // Or, set the Z skew factors directly: - //#define XZ_SKEW_FACTOR 0.0 - //#define YZ_SKEW_FACTOR 0.0 + #define XZ_SKEW_FACTOR 0.0 + #define YZ_SKEW_FACTOR 0.0 #endif // Enable this option for M852 to set skew at runtime - //#define SKEW_CORRECTION_GCODE + #define SKEW_CORRECTION_GCODE #endif //============================================================================= @@ -2368,13 +2369,13 @@ * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) */ -//#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 //#define DISABLE_M503 // Saves ~2700 bytes of flash. Disable for release! #define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save flash. #define EEPROM_BOOT_SILENT // Keep M503 quiet and only give errors during first load #if ENABLED(EEPROM_SETTINGS) - //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. - //#define EEPROM_INIT_NOW // Init EEPROM on first boot after a new build. + #define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. + #define EEPROM_INIT_NOW // Init EEPROM on first boot after a new build. #endif // @section host @@ -2407,17 +2408,59 @@ // Preheat Constants - Up to 10 are supported without changes // #define PREHEAT_1_LABEL "PLA" -#define PREHEAT_1_TEMP_HOTEND 180 -#define PREHEAT_1_TEMP_BED 70 -#define PREHEAT_1_TEMP_CHAMBER 35 +#define PREHEAT_1_TEMP_HOTEND 215 +#define PREHEAT_1_TEMP_BED 60 +#define PREHEAT_1_TEMP_CHAMBER 0 #define PREHEAT_1_FAN_SPEED 0 // Value from 0 to 255 -#define PREHEAT_2_LABEL "ABS" -#define PREHEAT_2_TEMP_HOTEND 240 -#define PREHEAT_2_TEMP_BED 110 -#define PREHEAT_2_TEMP_CHAMBER 35 +#define PREHEAT_2_LABEL "PET" +#define PREHEAT_2_TEMP_HOTEND 230 +#define PREHEAT_2_TEMP_BED 85 +#define PREHEAT_2_TEMP_CHAMBER 0 #define PREHEAT_2_FAN_SPEED 0 // Value from 0 to 255 +#define PREHEAT_3_LABEL "ASA" +#define PREHEAT_3_TEMP_HOTEND 260 +#define PREHEAT_3_TEMP_BED 105 +#define PREHEAT_3_TEMP_CHAMBER 0 +#define PREHEAT_3_FAN_SPEED 0 // Value from 0 to 255 + +#define PREHEAT_4_LABEL "PC" +#define PREHEAT_4_TEMP_HOTEND 275 +#define PREHEAT_4_TEMP_BED 110 +#define PREHEAT_4_TEMP_CHAMBER 0 +#define PREHEAT_4_FAN_SPEED 0 // Value from 0 to 255 + +#define PREHEAT_5_LABEL "ABS" +#define PREHEAT_5_TEMP_HOTEND 255 +#define PREHEAT_5_TEMP_BED 100 +#define PREHEAT_5_TEMP_CHAMBER 0 +#define PREHEAT_5_FAN_SPEED 0 // Value from 0 to 255 + +#define PREHEAT_6_LABEL "HIPS" +#define PREHEAT_6_TEMP_HOTEND 220 +#define PREHEAT_6_TEMP_BED 100 +#define PREHEAT_6_TEMP_CHAMBER 0 +#define PREHEAT_6_FAN_SPEED 0 // Value from 0 to 255 + +#define PREHEAT_7_LABEL "PP" +#define PREHEAT_7_TEMP_HOTEND 254 +#define PREHEAT_7_TEMP_BED 100 +#define PREHEAT_7_TEMP_CHAMBER 0 +#define PREHEAT_7_FAN_SPEED 0 // Value from 0 to 255 + +#define PREHEAT_8_LABEL "FLEX" +#define PREHEAT_8_TEMP_HOTEND 240 +#define PREHEAT_8_TEMP_BED 50 +#define PREHEAT_8_TEMP_CHAMBER 0 +#define PREHEAT_8_FAN_SPEED 0 // Value from 0 to 255 + +#define PREHEAT_9_LABEL "PVB" +#define PREHEAT_9_TEMP_HOTEND 215 +#define PREHEAT_9_TEMP_BED 75 +#define PREHEAT_9_TEMP_CHAMBER 0 +#define PREHEAT_9_FAN_SPEED 0 // Value from 0 to 255 + // @section motion /** @@ -2431,11 +2474,11 @@ * P1 Raise the nozzle always to Z-park height. * P2 Raise the nozzle by Z-park amount, limited to Z_MAX_POS. */ -//#define NOZZLE_PARK_FEATURE +#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) // Specify a park position as { X, Y, Z_raise } - #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } + #define NOZZLE_PARK_POINT { (X_MAX_POS - 10), (Y_MIN_POS + 10), 20 } #define NOZZLE_PARK_MOVE 0 // Park motion: 0 = XY Move, 1 = X Only, 2 = Y Only, 3 = X before Y, 4 = Y before X #define NOZZLE_PARK_Z_RAISE_MIN 2 // (mm) Always raise Z by at least this distance #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) @@ -2565,9 +2608,9 @@ * * View the current statistics with M78. */ -//#define PRINTCOUNTER +#define PRINTCOUNTER #if ENABLED(PRINTCOUNTER) - #define PRINTCOUNTER_SAVE_INTERVAL 60 // (minutes) EEPROM save interval during print. A value of 0 will save stats at end of print. + #define PRINTCOUNTER_SAVE_INTERVAL TERN(PRUSA_AIO_REAL_EEPROM, 60, 0) // (minutes) EEPROM save interval during print. A value of 0 will save stats at end of print. #endif // @section security @@ -2619,7 +2662,7 @@ * * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek (Greece)', 'el_CY':'Greek (Cyprus)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'hu':'Hungarian', 'it':'Italian', 'jp_kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt_br':'Portuguese (Brazilian)', 'ro':'Romanian', 'ru':'Russian', 'sk':'Slovak', 'sv':'Swedish', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)' } */ -#define LCD_LANGUAGE en +#define LCD_LANGUAGE PRUSA_AIO_LCD_LANGUAGE /** * LCD Character Set @@ -2658,14 +2701,14 @@ * SD Card support is disabled by default. If your controller has an SD slot, * you must uncomment the following option or it won't work. */ -//#define SDSUPPORT +#define SDSUPPORT /** * SD CARD: ENABLE CRC * * Use CRC checks and retries on the SD communication. */ -//#define SD_CHECK_AND_RETRY +#define SD_CHECK_AND_RETRY /** * LCD Menu Items @@ -2738,7 +2781,7 @@ // // Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu. // -//#define INDIVIDUAL_AXIS_HOMING_MENU +#define INDIVIDUAL_AXIS_HOMING_MENU //#define INDIVIDUAL_AXIS_HOMING_SUBMENU // @@ -2747,7 +2790,7 @@ // If you have a speaker that can produce tones, enable it here. // By default Marlin assumes you have a buzzer with a fixed frequency. // -//#define SPEAKER +#define SPEAKER // // The duration and frequency for the UI feedback sound. @@ -3442,7 +3485,7 @@ #endif #if ENABLED(TFT_COLOR_UI) - //#define SINGLE_TOUCH_NAVIGATION + #define SINGLE_TOUCH_NAVIGATION #endif #endif @@ -3466,7 +3509,7 @@ // Set number of user-controlled fans. Disable to use all board-defined fans. // :[1,2,3,4,5,6,7,8] -//#define NUM_M106_FANS 1 +#define NUM_M106_FANS 1 // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency // which is not as annoying as with the hardware PWM. On the other hand, if this frequency @@ -3478,7 +3521,7 @@ // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. // :[0,1,2,3,4,5,6,7] -#define SOFT_PWM_SCALE 0 +#define SOFT_PWM_SCALE PRUSA_AIO_SOFT_PWM_SCALE // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can // be used to mitigate the associated resolution loss. If enabled, @@ -3551,23 +3594,23 @@ // Support for Adafruit NeoPixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) - #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW, NEO_RGBW, NEO_GRB, NEO_RBG, etc. + //#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW, NEO_RGBW, NEO_GRB, NEO_RBG, etc. // See https://github.com/adafruit/Adafruit_NeoPixel/blob/master/Adafruit_NeoPixel.h //#define NEOPIXEL_PIN 4 // LED driving pin //#define NEOPIXEL2_TYPE NEOPIXEL_TYPE //#define NEOPIXEL2_PIN 5 - #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip. (Longest strip when NEOPIXEL2_SEPARATE is disabled.) - #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. - #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) - //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup + //#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip. (Longest strip when NEOPIXEL2_SEPARATE is disabled.) + //#define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. + //#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) + //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup // Support for second Adafruit NeoPixel LED driver controlled with M150 S1 ... //#define NEOPIXEL2_SEPARATE #if ENABLED(NEOPIXEL2_SEPARATE) - #define NEOPIXEL2_PIXELS 15 // Number of LEDs in the second strip - #define NEOPIXEL2_BRIGHTNESS 127 // Initial brightness (0-255) - #define NEOPIXEL2_STARTUP_TEST // Cycle through colors at startup - #define NEOPIXEL_M150_DEFAULT -1 // Default strip for M150 without 'S'. Use -1 to set all by default. + //#define NEOPIXEL2_PIXELS 15 // Number of LEDs in the second strip + //#define NEOPIXEL2_BRIGHTNESS 127 // Initial brightness (0-255) + //#define NEOPIXEL2_STARTUP_TEST // Cycle through colors at startup + #define NEOPIXEL_M150_DEFAULT -1 // Default strip for M150 without 'S'. Use -1 to set all by default. #else //#define NEOPIXEL2_INSERIES // Default behavior is NeoPixel 2 in parallel #endif diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index cf203c447d..58e943113a 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -31,6 +31,7 @@ * Basic settings can be found in Configuration.h */ #define CONFIGURATION_ADV_H_VERSION 02010300 +#define PRUSA_AIO_VERSION 20240423 // @section develop @@ -304,8 +305,8 @@ * THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD */ #if ENABLED(THERMAL_PROTECTION_HOTENDS) - #define THERMAL_PROTECTION_PERIOD 40 // (seconds) - #define THERMAL_PROTECTION_HYSTERESIS 4 // (°C) + #define THERMAL_PROTECTION_PERIOD 60 // (seconds) + #define THERMAL_PROTECTION_HYSTERESIS 10 // (°C) //#define ADAPTIVE_FAN_SLOWING // Slow down the part-cooling fan if the temperature drops #if ENABLED(ADAPTIVE_FAN_SLOWING) @@ -335,8 +336,8 @@ * Thermal Protection parameters for the bed are just as above for hotends. */ #if ENABLED(THERMAL_PROTECTION_BED) - #define THERMAL_PROTECTION_BED_PERIOD 20 // (seconds) - #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // (°C) + #define THERMAL_PROTECTION_BED_PERIOD 60 // (seconds) + #define THERMAL_PROTECTION_BED_HYSTERESIS 8 // (°C) /** * As described above, except for the bed (M140/M190/M303). @@ -547,7 +548,7 @@ * Hotend Idle Timeout * Prevent filament in the nozzle from charring and causing a critical jam. */ -//#define HOTEND_IDLE_TIMEOUT +#define HOTEND_IDLE_TIMEOUT #if ENABLED(HOTEND_IDLE_TIMEOUT) #define HOTEND_IDLE_TIMEOUT_SEC (5*60) // (seconds) Time without extruder movement to trigger protection #define HOTEND_IDLE_MIN_TRIGGER 180 // (°C) Minimum temperature to enable hotend protection @@ -590,7 +591,7 @@ // Use TEMP_SENSOR_SOC as a trigger for enabling the controller fan //#define CONTROLLER_FAN_MIN_SOC_TEMP 40 // (°C) Turn on the fan if the SoC reaches this temperature - //#define CONTROLLER_FAN_EDITABLE // Enable M710 configurable settings + #define CONTROLLER_FAN_EDITABLE // Enable M710 configurable settings #if ENABLED(CONTROLLER_FAN_EDITABLE) #define CONTROLLER_FAN_MENU // Enable the Controller Fan submenu #endif @@ -602,7 +603,7 @@ * gets it spinning reliably for a short time before setting the requested speed. * (Does not work on Sanguinololu with FAN_SOFT_PWM.) */ -//#define FAN_KICKSTART_TIME 100 // (ms) +#define FAN_KICKSTART_TIME 100 // (ms) //#define FAN_KICKSTART_POWER 180 // 64-255 //#define FAN_KICKSTART_LINEAR // Set kickstart time linearly based on the speed, e.g., for 20% (51) it will be FAN_KICKSTART_TIME * 0.2. // Useful for quick speed up to low speed. Kickstart power must be set to 255. @@ -622,7 +623,7 @@ * * Define one or both of these to override the default 0-255 range. */ -//#define FAN_MIN_PWM 50 +#define FAN_MIN_PWM PRUSA_AIO_FAN_MIN_PWM //#define FAN_MAX_PWM 128 /** @@ -683,7 +684,7 @@ * Multiple extruders can be assigned to the same pin in which case * the fan will turn on when any selected extruder is above the threshold. */ -#define E0_AUTO_FAN_PIN -1 +#define E0_AUTO_FAN_PIN PRUSA_AIO_E0_AUTO_FAN_PIN #define E1_AUTO_FAN_PIN -1 #define E2_AUTO_FAN_PIN -1 #define E3_AUTO_FAN_PIN -1 @@ -925,12 +926,12 @@ * the position of the toolhead relative to the workspace. */ -//#define SENSORLESS_BACKOFF_MM { 2, 2, 0 } // (linear=mm, rotational=°) Backoff from endstops before sensorless homing +#define SENSORLESS_BACKOFF_MM { 2, 2, 0 } // (linear=mm, rotational=°) Backoff from endstops before sensorless homing -#define HOMING_BUMP_MM { 5, 5, 2 } // (linear=mm, rotational=°) Backoff from endstops after first bump -#define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) +#define HOMING_BUMP_MM { 0, 0, 2 } // (linear=mm, rotational=°) Backoff from endstops after first bump +#define HOMING_BUMP_DIVISOR { 1, 1, 1 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) -//#define HOMING_BACKOFF_POST_MM { 2, 2, 2 } // (linear=mm, rotational=°) Backoff from endstops after homing +#define HOMING_BACKOFF_POST_MM { 2, 2, 0 } // (linear=mm, rotational=°) Backoff from endstops after homing //#define XY_COUNTERPART_BACKOFF_MM 0 // (mm) Backoff X after homing Y, and vice-versa //#define QUICK_HOME // If G28 contains XY do a diagonal move first @@ -1005,7 +1006,7 @@ * * Set the default state here, change with 'M401 S' or UI, use M500 to save, M502 to reset. */ - //#define BLTOUCH_HS_MODE true + #define BLTOUCH_HS_MODE true #ifdef BLTOUCH_HS_MODE // The probe Z offset (M851 Z) is the height at which the probe triggers. @@ -1201,12 +1202,12 @@ //#define INPUT_SHAPING_Z #if ANY(INPUT_SHAPING_X, INPUT_SHAPING_Y, INPUT_SHAPING_Z) #if ENABLED(INPUT_SHAPING_X) - #define SHAPING_FREQ_X 40.0 // (Hz) The default dominant resonant frequency on the X axis. - #define SHAPING_ZETA_X 0.15 // Damping ratio of the X axis (range: 0.0 = no damping to 1.0 = critical damping). + #define SHAPING_FREQ_X PRUSA_AIO_SHAPING_FREQ_X // (Hz) The default dominant resonant frequency on the X axis. + #define SHAPING_ZETA_X PRUSA_AIO_SHAPING_ZETA_X // Damping ratio of the X axis (range: 0.0 = no damping to 1.0 = critical damping). #endif #if ENABLED(INPUT_SHAPING_Y) - #define SHAPING_FREQ_Y 40.0 // (Hz) The default dominant resonant frequency on the Y axis. - #define SHAPING_ZETA_Y 0.15 // Damping ratio of the Y axis (range: 0.0 = no damping to 1.0 = critical damping). + #define SHAPING_FREQ_Y PRUSA_AIO_SHAPING_FREQ_Y // (Hz) The default dominant resonant frequency on the Y axis. + #define SHAPING_ZETA_Y PRUSA_AIO_SHAPING_ZETA_Y // Damping ratio of the Y axis (range: 0.0 = no damping to 1.0 = critical damping). #endif #if ENABLED(INPUT_SHAPING_Z) #define SHAPING_FREQ_Z 40.0 // (Hz) The default dominant resonant frequency on the Z axis. @@ -1214,7 +1215,7 @@ #endif //#define SHAPING_MIN_FREQ 20.0 // (Hz) By default the minimum of the shaping frequencies. Override to affect SRAM usage. //#define SHAPING_MAX_STEPRATE 10000 // By default the maximum total step rate of the shaped axes. Override to affect SRAM usage. - //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. + #define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif // @section motion @@ -1244,7 +1245,7 @@ #define DEFAULT_STEPPER_TIMEOUT_SEC 120 #define DISABLE_IDLE_X #define DISABLE_IDLE_Y -#define DISABLE_IDLE_Z // Disable if the nozzle could fall onto your printed part! +//#define DISABLE_IDLE_Z // Disable if the nozzle could fall onto your printed part! //#define DISABLE_IDLE_I //#define DISABLE_IDLE_J //#define DISABLE_IDLE_K @@ -1264,7 +1265,7 @@ // Increase the slowdown divisor for larger buffer sizes. #define SLOWDOWN #if ENABLED(SLOWDOWN) - #define SLOWDOWN_DIVISOR 2 + #define SLOWDOWN_DIVISOR 4 #endif /** @@ -1393,7 +1394,7 @@ * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the * lowest stepping frequencies. */ -//#define ADAPTIVE_STEP_SMOOTHING +#define ADAPTIVE_STEP_SMOOTHING /** * Custom Microstepping @@ -1492,14 +1493,14 @@ #endif #if HAS_BED_PROBE && ANY(HAS_MARLINUI_MENU, HAS_TFT_LVGL_UI) - //#define PROBE_OFFSET_WIZARD // Add a Probe Z Offset calibration option to the LCD menu + #define PROBE_OFFSET_WIZARD // Add a Probe Z Offset calibration option to the LCD menu #if ENABLED(PROBE_OFFSET_WIZARD) /** * Enable to init the Probe Z-Offset when starting the Wizard. * Use a height slightly above the estimated nozzle-to-probe Z offset. * For example, with an offset of -5, consider a starting height of -4. */ - //#define PROBE_OFFSET_WIZARD_START_Z -4.0 + #define PROBE_OFFSET_WIZARD_START_Z -0.0 // Set a convenient position to do the calibration (probing point and nozzle/bed-distance) //#define PROBE_OFFSET_WIZARD_XY_POS { X_CENTER, Y_CENTER } @@ -1528,7 +1529,7 @@ #endif // Include a page of printer information in the LCD Main Menu - //#define LCD_INFO_MENU + #define LCD_INFO_MENU #if ENABLED(LCD_INFO_MENU) //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages #endif @@ -1578,10 +1579,10 @@ #if ENABLED(SHOW_BOOTSCREEN) #define BOOTSCREEN_TIMEOUT 3000 // (ms) Total Duration to display the boot screen(s) #if ANY(HAS_MARLINUI_U8GLIB, TFT_COLOR_UI) - #define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving lots of flash) + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving lots of flash) #endif - #if HAS_MARLINUI_U8GLIB - //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~3260 (or ~940) bytes of flash. + #if HAS_MARLINUI_U8GLIB && DISABLED(PRUSA_AIO_SMALL_FLASH) + #define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~3260 (or ~940) bytes of flash. #endif #if ANY(HAS_MARLINUI_U8GLIB, TOUCH_UI_FTDI_EVE, HAS_MARLINUI_HD44780) //#define SHOW_CUSTOM_BOOTSCREEN // Show the bitmap in Marlin/_Bootscreen.h on startup. @@ -1592,7 +1593,7 @@ //#define CUSTOM_STATUS_SCREEN_IMAGE // Show the bitmap in Marlin/_Statusscreen.h on the status screen. #endif - //#define SOUND_MENU_ITEM // Add a mute option to the LCD menu + #define SOUND_MENU_ITEM // Add a mute option to the LCD menu #define SOUND_ON_DEFAULT // Buzzer/speaker default enabled state #if HAS_WIRED_LCD @@ -1603,7 +1604,7 @@ //#define LCD_TIMEOUT_TO_STATUS 15000 // (ms) // Scroll a longer status message into view - //#define STATUS_MESSAGE_SCROLLING + #define STATUS_MESSAGE_SCROLLING // Apply a timeout to low-priority status messages //#define STATUS_MESSAGE_TIMEOUT_SEC 30 // (seconds) @@ -1623,23 +1624,23 @@ */ //#define LED_CONTROL_MENU #if ENABLED(LED_CONTROL_MENU) - #define LED_COLOR_PRESETS // Enable the Preset Color menu option + //#define LED_COLOR_PRESETS // Enable the Preset Color menu option //#define NEO2_COLOR_PRESETS // Enable a second NeoPixel Preset Color menu option #if ENABLED(LED_COLOR_PRESETS) - #define LED_USER_PRESET_RED 255 // User defined RED value - #define LED_USER_PRESET_GREEN 128 // User defined GREEN value - #define LED_USER_PRESET_BLUE 0 // User defined BLUE value - #define LED_USER_PRESET_WHITE 255 // User defined WHITE value + #define LED_USER_PRESET_RED PRUSA_AIO_LED_USER_PRESET_RED // User defined RED value + #define LED_USER_PRESET_GREEN PRUSA_AIO_LED_USER_PRESET_GREEN // User defined GREEN value + #define LED_USER_PRESET_BLUE PRUSA_AIO_LED_USER_PRESET_BLUE // User defined BLUE value + #define LED_USER_PRESET_WHITE PRUSA_AIO_LED_USER_PRESET_WHITE // User defined WHITE value #define LED_USER_PRESET_BRIGHTNESS 255 // User defined intensity - //#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup + #define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup #endif #if ENABLED(NEO2_COLOR_PRESETS) - #define NEO2_USER_PRESET_RED 255 // User defined RED value - #define NEO2_USER_PRESET_GREEN 128 // User defined GREEN value - #define NEO2_USER_PRESET_BLUE 0 // User defined BLUE value - #define NEO2_USER_PRESET_WHITE 255 // User defined WHITE value - #define NEO2_USER_PRESET_BRIGHTNESS 255 // User defined intensity - //#define NEO2_USER_PRESET_STARTUP // Have the printer display the user preset color on startup for the second strip + #define NEO2_USER_PRESET_RED PRUSA_AIO_NEO2_USER_PRESET_RED // User defined RED value + #define NEO2_USER_PRESET_GREEN PRUSA_AIO_NEO2_USER_PRESET_GREEN // User defined GREEN value + #define NEO2_USER_PRESET_BLUE PRUSA_AIO_NEO2_USER_PRESET_BLUE // User defined BLUE value + #define NEO2_USER_PRESET_WHITE PRUSA_AIO_NEO2_USER_PRESET_WHITE // User defined WHITE value + #define NEO2_USER_PRESET_BRIGHTNESS 255 // User defined intensity + #define NEO2_USER_PRESET_STARTUP // Have the printer display the user preset color on startup for the second strip #endif #endif @@ -1655,7 +1656,7 @@ #endif // Add 'M73' to set print job progress, overrides Marlin's built-in estimate -//#define SET_PROGRESS_MANUALLY +#define SET_PROGRESS_MANUALLY #if ENABLED(SET_PROGRESS_MANUALLY) #define SET_PROGRESS_PERCENT // Add 'P' parameter to set percentage done #define SET_REMAINING_TIME // Add 'R' parameter to set remaining time @@ -1670,7 +1671,7 @@ #if HAS_DISPLAY && ANY(HAS_MEDIA, SET_PROGRESS_MANUALLY) #define SHOW_PROGRESS_PERCENT // Show print progress percentage (doesn't affect progress bar) #define SHOW_ELAPSED_TIME // Display elapsed printing time (prefix 'E') - //#define SHOW_REMAINING_TIME // Display estimated time to completion (prefix 'R') + #define SHOW_REMAINING_TIME // Display estimated time to completion (prefix 'R') #if ENABLED(SET_INTERACTION_TIME) #define SHOW_INTERACTION_TIME // Display time until next user interaction ('C' = filament change) #endif @@ -1712,7 +1713,7 @@ #define SD_PROCEDURE_DEPTH 1 // Increase if you need more nested M32 calls #define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished - #define SD_FINISHED_RELEASECOMMAND "M84" // Use "M84XYE" to keep Z enabled so your bed stays in place + #define SD_FINISHED_RELEASECOMMAND "M84XYE" // Use "M84XYE" to keep Z enabled so your bed stays in place // Reverse SD sort to show "more recent" files first, according to the card's FAT. // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. @@ -1728,7 +1729,7 @@ //#define MEDIA_MENU_AT_TOP // Force the media menu to be listed on the top of the main menu - #define EVENT_GCODE_SD_ABORT "G28XY" // G-code to run on SD Abort Print (e.g., "G28XY" or "G27") + #define EVENT_GCODE_SD_ABORT "G27 P2\n" SD_FINISHED_RELEASECOMMAND // G-code to run on SD Abort Print (e.g., "G28XY" or "G27") #if ENABLED(PRINTER_EVENT_LEDS) #define PE_LEDS_COMPLETED_TIME (30*60) // (seconds) Time to keep the LED "done" color before restoring normal illumination @@ -1814,11 +1815,11 @@ // LCD's font must contain the characters. Check your selected LCD language. //#define UTF_FILENAME_SUPPORT - //#define LONG_FILENAME_HOST_SUPPORT // Get the long filename of a file/folder with 'M33 ' and list long filenames with 'M20 L' - //#define LONG_FILENAME_WRITE_SUPPORT // Create / delete files with long filenames via M28, M30, and Binary Transfer Protocol - //#define M20_TIMESTAMP_SUPPORT // Include timestamps by adding the 'T' flag to M20 commands + #define LONG_FILENAME_HOST_SUPPORT // Get the long filename of a file/folder with 'M33 ' and list long filenames with 'M20 L' + #define LONG_FILENAME_WRITE_SUPPORT // Create / delete files with long filenames via M28, M30, and Binary Transfer Protocol + #define M20_TIMESTAMP_SUPPORT // Include timestamps by adding the 'T' flag to M20 commands - //#define SCROLL_LONG_FILENAMES // Scroll long filenames in the SD card menu + #define SCROLL_LONG_FILENAMES // Scroll long filenames in the SD card menu //#define SD_ABORT_NO_COOLDOWN // Leave the heaters on after Stop Print (not recommended!) @@ -1870,7 +1871,7 @@ /** * Native USB Host supported by some boards (USB OTG) */ - //#define USE_OTG_USB_HOST + #define USE_OTG_USB_HOST #if DISABLED(USE_OTG_USB_HOST) #define USB_CS_PIN SDSS @@ -1903,11 +1904,11 @@ //#define CONFIGURATION_EMBEDDING // Add an optimized binary file transfer mode, initiated with 'M28 B1' - //#define BINARY_FILE_TRANSFER + #define BINARY_FILE_TRANSFER #if ENABLED(BINARY_FILE_TRANSFER) // Include extra facilities (e.g., 'M20 F') supporting firmware upload via BINARY_FILE_TRANSFER - //#define CUSTOM_FIRMWARE_UPLOAD + #define CUSTOM_FIRMWARE_UPLOAD #endif /** @@ -1919,7 +1920,7 @@ * * :[ 'LCD', 'ONBOARD', 'CUSTOM_CABLE' ] */ - //#define SDCARD_CONNECTION LCD + #define SDCARD_CONNECTION PRUSA_AIO_SDCARD_CONNECTION // Enable if SD detect is rendered useless (e.g., by using an SD extender) //#define NO_SD_DETECT @@ -1963,7 +1964,7 @@ // A bigger font is available for edit items. Costs 3120 bytes of flash. // Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese. - //#define USE_BIG_EDIT_FONT + #define USE_BIG_EDIT_FONT // A smaller font may be used on the Info Screen. Costs 2434 bytes of flash. // Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese. @@ -2011,7 +2012,7 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames // Only one STATUS_HEAT_* option can be enabled - //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + #define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define STATUS_HEAT_POWER // Show heater output power as a vertical bar // Frivolous Game Options @@ -2265,9 +2266,9 @@ * * Warning: Does not respect endstops! */ -//#define BABYSTEPPING +#define BABYSTEPPING #if ENABLED(BABYSTEPPING) - //#define EP_BABYSTEPPING // M293/M294 babystepping with EMERGENCY_PARSER support + #define EP_BABYSTEPPING // M293/M294 babystepping with EMERGENCY_PARSER support //#define BABYSTEP_WITHOUT_HOMING //#define BABYSTEP_ALWAYS_AVAILABLE // Allow babystepping at all times (not just during movement) //#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA! @@ -2276,19 +2277,19 @@ #define BABYSTEP_MULTIPLICATOR_Z 1 // (steps or mm) Steps or millimeter distance for each Z babystep #define BABYSTEP_MULTIPLICATOR_XY 1 // (steps or mm) Steps or millimeter distance for each XY babystep - //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping. + #define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping. #if ENABLED(DOUBLECLICK_FOR_Z_BABYSTEPPING) - #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds. + #define DOUBLECLICK_MAX_INTERVAL 800 // Maximum interval between clicks, in milliseconds. // Note: Extra time may be added to mitigate controller latency. - //#define MOVE_Z_WHEN_IDLE // Jump to the move Z menu on double-click when printer is idle. + #define MOVE_Z_WHEN_IDLE // Jump to the move Z menu on double-click when printer is idle. #if ENABLED(MOVE_Z_WHEN_IDLE) - #define MOVE_Z_IDLE_MULTIPLICATOR 1 // Multiply 1mm by this factor for the move step size. + #define MOVE_Z_IDLE_MULTIPLICATOR 10 // Multiply 1mm by this factor for the move step size. #endif #endif //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 - //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping + #define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets //#define BABYSTEP_GFX_OVERLAY // Enable graphical overlay on Z-offset editor @@ -2312,12 +2313,12 @@ * * See https://marlinfw.org/docs/features/lin_advance.html for full instructions. */ -//#define LIN_ADVANCE +#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) #if ENABLED(DISTINCT_E_FACTORS) #define ADVANCE_K { 0.22 } // (mm) Compression length per 1mm/s extruder speed, per extruder #else - #define ADVANCE_K 0.22 // (mm) Compression length applying to all extruders + #define ADVANCE_K 0.00 // (mm) Compression length applying to all extruders #endif //#define ADVANCE_K_EXTRA // Add a second linear advance constant, configurable with M900 L. //#define LA_DEBUG // Print debug information to serial during operation. Disable for production use. @@ -2404,15 +2405,15 @@ */ //#define G29_RETRY_AND_RECOVER #if ENABLED(G29_RETRY_AND_RECOVER) - #define G29_MAX_RETRIES 3 + #define G29_MAX_RETRIES 0 #define G29_HALT_ON_FAILURE /** * Specify the GCODE commands that will be executed when leveling succeeds, * between attempts, and after the maximum number of retries have been tried. */ - #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." - #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" - #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" + //#define G29_SUCCESS_COMMANDS "M117 Bed leveling done." + //#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" + //#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 @@ -2501,7 +2502,7 @@ #define MIN_CIRCLE_SEGMENTS 72 // Minimum number of segments in a complete circle //#define ARC_SEGMENTS_PER_SEC 50 // Use the feedrate to choose the segment length #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections - //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles + #define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define SF_ARC_FIX // Enable only if using SkeinForge with "Arc Point" fillet procedure #endif @@ -2599,7 +2600,7 @@ #if ALL(HAS_MEDIA, DIRECT_STEPPING) #define BLOCK_BUFFER_SIZE 8 #elif HAS_MEDIA - #define BLOCK_BUFFER_SIZE 16 + #define BLOCK_BUFFER_SIZE 32 #else #define BLOCK_BUFFER_SIZE 16 #endif @@ -2608,7 +2609,7 @@ // The ASCII buffer for serial input #define MAX_CMD_SIZE 96 -#define BUFSIZE 4 +#define BUFSIZE 32 // Transmission to Host Buffer Size // To save 386 bytes of flash (and TX_BUFFER_SIZE+3 bytes of RAM) set to 0. @@ -2617,7 +2618,7 @@ // For debug-echo: 128 bytes for the optimal speed. // Other output doesn't need to be that speedy. // :[0, 2, 4, 8, 16, 32, 64, 128, 256] -#define TX_BUFFER_SIZE 0 +#define TX_BUFFER_SIZE 32 // Host Receive Buffer Size // Without XON/XOFF flow control (see SERIAL_XON_XOFF below) 32 bytes should be enough. @@ -2655,7 +2656,7 @@ * Currently handles M108, M112, M410, M876 * NOTE: Not yet implemented for all platforms. */ -//#define EMERGENCY_PARSER +#define EMERGENCY_PARSER /** * Realtime Reporting (requires EMERGENCY_PARSER) @@ -2686,7 +2687,7 @@ //#define NO_TIMEOUTS 1000 // (ms) // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. -//#define ADVANCED_OK +#define ADVANCED_OK // Printrun may have trouble receiving long strings all at once. // This option inserts short delays between lines of serial output. @@ -2888,28 +2889,28 @@ * * Enable PARK_HEAD_ON_PAUSE to add the G-code M125 Pause and Park. */ -//#define ADVANCED_PAUSE_FEATURE +#define ADVANCED_PAUSE_FEATURE #if ENABLED(ADVANCED_PAUSE_FEATURE) - #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate. + #define PAUSE_PARK_RETRACT_FEEDRATE 40 // (mm/s) Initial retract feedrate. #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract. // This short retract is done immediately, before parking the nozzle. - #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast. + #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 20 // (mm/s) Unload filament feedrate. This can be pretty fast. #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate. - #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload. + #define FILAMENT_CHANGE_UNLOAD_LENGTH 120 // (mm) The length of filament for a complete unload. // For Bowden, the full length of the tube and nozzle. // For direct drive, the full length of the nozzle. // Set to 0 for manual unloading. - #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load. - #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material. + #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 10 // (mm/s) Slow move when starting load. + #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 20 // (mm) Slow length, to allow time to insert material. // 0 to disable start loading and skip to fast load only - #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast. + #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 20 // (mm/s) Load filament feedrate. This can be pretty fast. #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate. - #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle. + #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 60 // (mm) Load length of filament, from extruder gear to nozzle. // For Bowden, the full length of the tube and nozzle. // For direct drive, the full length of the nozzle. //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted. #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate. - #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading. + #define ADVANCED_PAUSE_PURGE_LENGTH 35 // (mm) Length to extrude after loading. // Set to 0 for manual extrusion. // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. @@ -2917,21 +2918,21 @@ //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: - #define FILAMENT_UNLOAD_PURGE_RETRACT 13 // (mm) Unload initial retract length. + #define FILAMENT_UNLOAD_PURGE_RETRACT 5 // (mm) Unload initial retract length. #define FILAMENT_UNLOAD_PURGE_DELAY 5000 // (ms) Delay for the filament to cool after retract. #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged. #define FILAMENT_UNLOAD_PURGE_FEEDRATE 25 // (mm/s) feedrate to purge before unload - #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety. - #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed. + #define PAUSE_PARK_NOZZLE_TIMEOUT (3*60) // (seconds) Time limit before the nozzle is turned off for safety. + #define FILAMENT_CHANGE_ALERT_BEEPS 20 // Number of alert beeps to play when a response is needed. #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. - //#define FILAMENT_CHANGE_RESUME_ON_INSERT // Automatically continue / load filament when runout sensor is triggered again. - //#define PAUSE_REHEAT_FAST_RESUME // Reduce number of waits by not prompting again post-timeout before continuing. + #define FILAMENT_CHANGE_RESUME_ON_INSERT // Automatically continue / load filament when runout sensor is triggered again. + #define PAUSE_REHEAT_FAST_RESUME // Reduce number of waits by not prompting again post-timeout before continuing. - //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. - //#define HOME_BEFORE_FILAMENT_CHANGE // If needed, home before parking for filament change + #define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. + #define HOME_BEFORE_FILAMENT_CHANGE // If needed, home before parking for filament change - //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu. + #define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu. //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) #define CONFIGURE_FILAMENT_CHANGE // Add M603 G-code and menu items. Requires ~1.3K bytes of flash. #endif @@ -2970,10 +2971,10 @@ #define INTERPOLATE true #if AXIS_IS_TMC_CONFIG(X) - #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. - #define X_CURRENT_HOME X_CURRENT // (mA) RMS current for sensorless homing + #define X_CURRENT PRUSA_AIO_X_CURRENT // (mA) RMS current. Multiply by 1.414 for peak current. + #define X_CURRENT_HOME PRUSA_AIO_X_CURRENT_HOME // (mA) RMS current for sensorless homing #define X_MICROSTEPS 16 // 0..256 - #define X_RSENSE 0.11 + #define X_RSENSE PRUSA_AIO_DRIVER_RSENSE #define X_CHAIN_POS -1 // -1..0: Not chained. 1: MCU MOSI connected. 2: Next in chain, ... //#define X_INTERPOLATE true // Enable to override 'INTERPOLATE' for the X axis //#define X_HOLD_MULTIPLIER 0.5 // Enable to override 'HOLD_MULTIPLIER' for the X axis @@ -2990,10 +2991,10 @@ #endif #if AXIS_IS_TMC_CONFIG(Y) - #define Y_CURRENT 800 - #define Y_CURRENT_HOME Y_CURRENT + #define Y_CURRENT PRUSA_AIO_Y_CURRENT + #define Y_CURRENT_HOME PRUSA_AIO_Y_CURRENT_HOME #define Y_MICROSTEPS 16 - #define Y_RSENSE 0.11 + #define Y_RSENSE PRUSA_AIO_DRIVER_RSENSE #define Y_CHAIN_POS -1 //#define Y_INTERPOLATE true //#define Y_HOLD_MULTIPLIER 0.5 @@ -3010,10 +3011,10 @@ #endif #if AXIS_IS_TMC_CONFIG(Z) - #define Z_CURRENT 800 + #define Z_CURRENT 450 #define Z_CURRENT_HOME Z_CURRENT #define Z_MICROSTEPS 16 - #define Z_RSENSE 0.11 + #define Z_RSENSE PRUSA_AIO_DRIVER_RSENSE #define Z_CHAIN_POS -1 //#define Z_INTERPOLATE true //#define Z_HOLD_MULTIPLIER 0.5 @@ -3023,7 +3024,7 @@ #define Z2_CURRENT Z_CURRENT #define Z2_CURRENT_HOME Z_CURRENT_HOME #define Z2_MICROSTEPS Z_MICROSTEPS - #define Z2_RSENSE Z_RSENSE + #define Z2_RSENSE PRUSA_AIO_DRIVER_RSENSE #define Z2_CHAIN_POS -1 //#define Z2_INTERPOLATE true //#define Z2_HOLD_MULTIPLIER 0.5 @@ -3110,9 +3111,9 @@ #endif #if AXIS_IS_TMC_CONFIG(E0) - #define E0_CURRENT 800 - #define E0_MICROSTEPS 16 - #define E0_RSENSE 0.11 + #define E0_CURRENT PRUSA_AIO_E0_CURRENT + #define E0_MICROSTEPS PRUSA_AIO_E0_MICROSTEPS + #define E0_RSENSE PRUSA_AIO_DRIVER_RSENSE #define E0_CHAIN_POS -1 //#define E0_INTERPOLATE true //#define E0_HOLD_MULTIPLIER 0.5 @@ -3301,13 +3302,13 @@ * Define your own with: * { , , hysteresis_start[1..8] } */ - #define CHOPPER_TIMING CHOPPER_DEFAULT_12V // All axes (override below) - //#define CHOPPER_TIMING_X CHOPPER_TIMING // For X Axes (override below) + //#define CHOPPER_TIMING CHOPPER_DEFAULT_12V // All axes (override below) + #define CHOPPER_TIMING_X PRUSA_AIO_CHOPPER_TIMING_X // For X Axes (override below) //#define CHOPPER_TIMING_X2 CHOPPER_TIMING_X - //#define CHOPPER_TIMING_Y CHOPPER_TIMING // For Y Axes (override below) + #define CHOPPER_TIMING_Y PRUSA_AIO_CHOPPER_TIMING_Y // For Y Axes (override below) //#define CHOPPER_TIMING_Y2 CHOPPER_TIMING_Y - //#define CHOPPER_TIMING_Z CHOPPER_TIMING // For Z Axes (override below) - //#define CHOPPER_TIMING_Z2 CHOPPER_TIMING_Z + #define CHOPPER_TIMING_Z PRUSA_AIO_CHOPPER_TIMING_Z // For Z Axes (override below) + #define CHOPPER_TIMING_Z2 CHOPPER_TIMING_Z //#define CHOPPER_TIMING_Z3 CHOPPER_TIMING_Z //#define CHOPPER_TIMING_Z4 CHOPPER_TIMING_Z //#define CHOPPER_TIMING_I CHOPPER_TIMING // For I Axis @@ -3316,7 +3317,7 @@ //#define CHOPPER_TIMING_U CHOPPER_TIMING // For U Axis //#define CHOPPER_TIMING_V CHOPPER_TIMING // For V Axis //#define CHOPPER_TIMING_W CHOPPER_TIMING // For W Axis - //#define CHOPPER_TIMING_E CHOPPER_TIMING // For Extruders (override below) + #define CHOPPER_TIMING_E PRUSA_AIO_CHOPPER_TIMING_E // For Extruders (override below) //#define CHOPPER_TIMING_E1 CHOPPER_TIMING_E //#define CHOPPER_TIMING_E2 CHOPPER_TIMING_E //#define CHOPPER_TIMING_E3 CHOPPER_TIMING_E @@ -3357,11 +3358,11 @@ */ //#define HYBRID_THRESHOLD - #define X_HYBRID_THRESHOLD 100 // [mm/s] + #define X_HYBRID_THRESHOLD 160 // [mm/s] #define X2_HYBRID_THRESHOLD 100 - #define Y_HYBRID_THRESHOLD 100 + #define Y_HYBRID_THRESHOLD 160 #define Y2_HYBRID_THRESHOLD 100 - #define Z_HYBRID_THRESHOLD 3 + #define Z_HYBRID_THRESHOLD 40 #define Z2_HYBRID_THRESHOLD 3 #define Z3_HYBRID_THRESHOLD 3 #define Z4_HYBRID_THRESHOLD 3 @@ -3410,9 +3411,9 @@ #if ANY(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 - #define X_STALL_SENSITIVITY 8 + #define X_STALL_SENSITIVITY PRUSA_AIO_X_STALL_SENSITIVITY #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY - #define Y_STALL_SENSITIVITY 8 + #define Y_STALL_SENSITIVITY PRUSA_AIO_Y_STALL_SENSITIVITY #define Y2_STALL_SENSITIVITY Y_STALL_SENSITIVITY //#define Z_STALL_SENSITIVITY 8 //#define Z2_STALL_SENSITIVITY Z_STALL_SENSITIVITY @@ -3425,7 +3426,7 @@ //#define V_STALL_SENSITIVITY 8 //#define W_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130/TMC5160 only - //#define IMPROVE_HOMING_RELIABILITY + #define IMPROVE_HOMING_RELIABILITY #endif // @section tmc/config @@ -3445,7 +3446,7 @@ /** * Step on both rising and falling edge signals (as with a square wave). */ - //#define EDGE_STEPPING + #define EDGE_STEPPING /** * Enable M122 debugging command for TMC stepper drivers. @@ -3882,7 +3883,7 @@ /** * Extra options for the M114 "Current Position" report */ -//#define M114_DETAIL // Use 'M114` for details to check planner calculations +#define M114_DETAIL // Use 'M114` for details to check planner calculations //#define M114_REALTIME // Real current position based on forward kinematics //#define M114_LEGACY // M114 used to synchronize on every call. Enable if needed. @@ -3892,7 +3893,7 @@ */ //#define AUTO_REPORT_FANS -//#define REPORT_FAN_CHANGE // Report the new fan speed when changed by M106 (and others) +#define REPORT_FAN_CHANGE // Report the new fan speed when changed by M106 (and others) /** * Auto-report temperatures with M155 S @@ -3919,7 +3920,7 @@ // Include capabilities in M115 output #define EXTENDED_CAPABILITIES_REPORT #if ENABLED(EXTENDED_CAPABILITIES_REPORT) - //#define M115_GEOMETRY_REPORT + #define M115_GEOMETRY_REPORT #endif #endif @@ -3982,7 +3983,7 @@ * * Execute certain G-code commands immediately after power-on. */ -//#define STARTUP_COMMANDS "M17 Z" +#define STARTUP_COMMANDS "M17 Z" /** * G-code Macros @@ -4006,31 +4007,119 @@ // Custom Menu: Main Menu //#define CUSTOM_MENU_MAIN #if ENABLED(CUSTOM_MENU_MAIN) - //#define CUSTOM_MENU_MAIN_TITLE "Custom Commands" - #define CUSTOM_MENU_MAIN_SCRIPT_DONE "M117 User Script Done" + #define CUSTOM_MENU_MAIN_TITLE "Calibration" + //#define CUSTOM_MENU_MAIN_SCRIPT_DONE "M117 Completed" #define CUSTOM_MENU_MAIN_SCRIPT_AUDIBLE_FEEDBACK - //#define CUSTOM_MENU_MAIN_SCRIPT_RETURN // Return to status screen after a script + #define CUSTOM_MENU_MAIN_SCRIPT_RETURN // Return to status screen after a script #define CUSTOM_MENU_MAIN_ONLY_IDLE // Only show custom menu when the machine is idle - #define MAIN_MENU_ITEM_1_DESC "Home & UBL Info" - #define MAIN_MENU_ITEM_1_GCODE "G28\nG29 W" - //#define MAIN_MENU_ITEM_1_CONFIRM // Show a confirmation dialog before this action - - #define MAIN_MENU_ITEM_2_DESC "Preheat for " PREHEAT_1_LABEL - #define MAIN_MENU_ITEM_2_GCODE "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND) - //#define MAIN_MENU_ITEM_2_CONFIRM - - //#define MAIN_MENU_ITEM_3_DESC "Preheat for " PREHEAT_2_LABEL - //#define MAIN_MENU_ITEM_3_GCODE "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND) - //#define MAIN_MENU_ITEM_3_CONFIRM - - //#define MAIN_MENU_ITEM_4_DESC "Heat Bed/Home/Level" - //#define MAIN_MENU_ITEM_4_GCODE "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29" - //#define MAIN_MENU_ITEM_4_CONFIRM - - //#define MAIN_MENU_ITEM_5_DESC "Home & Info" - //#define MAIN_MENU_ITEM_5_GCODE "G28\nM503" - //#define MAIN_MENU_ITEM_5_CONFIRM + // Based on Prusa's "meander" first layer calibration: https://github.com/prusa3d/Prusa-Firmware/blob/MK3/Firmware/first_lay_cal.cpp + #define Z_CAL_DESC " Z Calibration" + #define Z_CAL_PRE_UBL "G28\nM107\nG29 L1\nG29 J2\nG0 X2.0 Y-2.0 Z0.60 F3000\nM140 S" + #define Z_CAL_PRE_ABL "G28\nM107\nM140 S" + #define Z_CAL_END "\nM0 Click to continue...\nG92 E0.00\nG1 Z0.2 X60 E9.0 F1000.0\nG1 X100.0 E12.5 F1000.0\nG92 E0.0\nG21\nG90\nM83\nG1 E-1.50000 F2100.00000\nG1 Z0.150 F7200.000\nM204 S1000\nG1 F4000\nG1 X50 Y155\nG1 F1080\nG1 X75 Y155 E2.5\nG1 X100 Y155 E2\nG1 X200 Y155 E2.62773\nG1 X200 Y135 E0.66174\nG1 X50 Y135 E3.62773\nG1 X50 Y115 E0.49386\nG1 X200 Y115 E3.62773\nG1 X200 Y95 E0.49386\nG1 X50 Y95 E3.62773\nG1 X50 Y75 E0.49386\nG1 X200 Y75 E3.62773\nG1 X200 Y55 E0.49386\nG1 X50 Y55 E3.62773\nG1 X50 Y35 E0.49386\nG1 X70 Y35 E0.49386\nG1 X70 Y34.6 E0\nG1 X50 Y34.6 E0.49386\nG1 X50 Y34.2 E0\nG1 X70 Y34.2 E0.49386\nG1 X70 Y33.8 E0\nG1 X50 Y33.8 E0.49386\nG1 X50 Y33.4 E0\nG1 X70 Y33.4 E0.49386\nG1 X70 Y33.0 E0\nG1 X50 Y33.0 E0.49386\nG1 X50 Y32.6 E0\nG1 X70 Y32.6 E0.49386\nG1 X70 Y32.2 E0\nG1 X50 Y32.2 E0.49386\nG1 X50 Y31.8 E0\nG1 X70 Y31.8 E0.49386\nG1 X70 Y31.4 E0\nG1 X50 Y31.4 E0.49386\nG1 X50 Y31.0 E0\nG1 X70 Y31.0 E0.49386\nG1 X70 Y30.6 E0\nG1 X50 Y30.6 E0.49386\nG1 X50 Y30.2 E0\nG1 X70 Y30.2 E0.49386\nG1 X70 Y29.8 E0\nG1 X50 Y29.8 E0.49386\nG1 X50 Y29.4 E0\nG1 X70 Y29.4 E0.49386\nG1 X70 Y29.0 E0\nG1 X50 Y29.0 E0.49386\nG1 X50 Y28.6 E0\nG1 X70 Y28.6 E0.49386\nG1 X70 Y28.2 E0\nG1 X50 Y28.2 E0.49386\nG1 X50 Y27.8 E0\nG1 X70 Y27.8 E0.49386\nG1 X70 Y27.4 E0\nG1 X50 Y27.4 E0.49386\nG1 X50 Y27.0 E0\nG1 X70 Y27.0 E0.49386\nG1 X70 Y26.6 E0\nG1 X50 Y26.6 E0.49386\nG1 X50 Y26.2 E0\nG1 X70 Y26.2 E0.49386\nG1 X70 Y25.8 E0\nG1 X50 Y25.8 E0.49386\nG1 X50 Y25.4 E0\nG1 X70 Y25.4 E0.49386\nG1 X70 Y25.0 E0\nG1 X50 Y25.0 E0.49386\nG1 X50 Y24.6 E0\nG1 X70 Y24.6 E0.49386\nG1 X70 Y24.2 E0\nG1 X50 Y24.2 E0.49386\nG1 X50 Y23.8 E0\nG1 X70 Y23.8 E0.49386\nG1 X70 Y23.4 E0\nG1 X50 Y23.4 E0.49386\nG1 X50 Y23.0 E0\nG1 X70 Y23.0 E0.49386\nG1 X70 Y22.6 E0\nG1 X50 Y22.6 E0.49386\nG1 X50 Y22.2 E0\nG1 X70 Y22.2 E0.49386\nG1 X70 Y21.8 E0\nG1 X50 Y21.8 E0.49386\nG1 X50 Y21.4 E0\nG1 X70 Y21.4 E0.49386\nG1 X70 Y21.0 E0\nG1 X50 Y21.0 E0.49386\nG1 X50 Y20.6 E0\nG1 X70 Y20.6 E0.49386\nG1 X70 Y20.2 E0\nG1 X50 Y20.2 E0.49386\nG1 X50 Y19.8 E0\nG1 X70 Y19.8 E0.49386\nG1 X70 Y19.4 E0\nG1 X50 Y19.4 E0.49386\nG1 E-0.07500 F2100.00000\nG4\nM107\nM104 S0\nM140 S0\nG1 X10 Y180 F4000\nG1 Z10 F1300.000\nM500\nM0 Happy Printing\nM84 XYE" + + #define MAIN_MENU_ITEM_1_DESC "Nozzle Change" + #define MAIN_MENU_ITEM_1_GCODE "G28\nG0 Z140 F2000\nM104 S275\nM117 Heating to 275C\nG4 s10\nM0 Click when finished...\nM104 S0" + #define MAIN_MENU_ITEM_1_CONFIRM + + #define MAIN_MENU_ITEM_2_DESC "Full Calibration" + #define MAIN_MENU_ITEM_2_GCODE "M140 S60\nM190 S60\nG28\nG34\nG29\nM500\nM140 S0\nG28" + #define MAIN_MENU_ITEM_2_CONFIRM + + #define MAIN_MENU_ITEM_3_DESC "Auto Cold Pull" + #define MAIN_MENU_ITEM_3_GCODE "G28\nM83\nG92 E0.00\nG21\nG0 Z30\nM109 S250\nG1 E10.00 F6.5\nM109 S95\nM18 E\nM0 Remove filament...\nM106 S0\nM104 S0" + #define MAIN_MENU_ITEM_3_CONFIRM + + #if ENABLED(PRUSA_AIO_BED_LEVELING_BILINEAR) + #define MAIN_MENU_ITEM_4_DESC PREHEAT_1_LABEL Z_CAL_DESC + #define MAIN_MENU_ITEM_4_GCODE Z_CAL_PRE_ABL STRINGIFY(PREHEAT_1_TEMP_BED) "\nM190 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S160\nM109 S160\nG29\nG1 X2.0 Y-2.0 Z0.60\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND) "\nM109 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND) Z_CAL_END + #define MAIN_MENU_ITEM_4_CONFIRM + + #define MAIN_MENU_ITEM_5_DESC PREHEAT_2_LABEL Z_CAL_DESC + #define MAIN_MENU_ITEM_5_GCODE Z_CAL_PRE_ABL STRINGIFY(PREHEAT_2_TEMP_BED) "\nM190 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S160\nM109 S160\nG29\nG1 X2.0 Y-2.0 Z0.60\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND) "\nM109 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND) Z_CAL_END + #define MAIN_MENU_ITEM_5_CONFIRM + + #define MAIN_MENU_ITEM_6_DESC PREHEAT_3_LABEL Z_CAL_DESC + #define MAIN_MENU_ITEM_6_GCODE Z_CAL_PRE_ABL STRINGIFY(PREHEAT_3_TEMP_BED) "\nM190 S" STRINGIFY(PREHEAT_3_TEMP_BED) "\nM104 S160\nM109 S160\nG29\nG1 X2.0 Y-2.0 Z0.60\nM104 S" STRINGIFY(PREHEAT_3_TEMP_HOTEND) "\nM109 S" STRINGIFY(PREHEAT_3_TEMP_HOTEND) Z_CAL_END + #define MAIN_MENU_ITEM_6_CONFIRM + + #define MAIN_MENU_ITEM_7_DESC PREHEAT_4_LABEL Z_CAL_DESC + #define MAIN_MENU_ITEM_7_GCODE Z_CAL_PRE_ABL STRINGIFY(PREHEAT_4_TEMP_BED) "\nM190 S" STRINGIFY(PREHEAT_4_TEMP_BED) "\nM104 S160\nM109 S160\nG29\nG1 X2.0 Y-2.0 Z0.60\nM104 S" STRINGIFY(PREHEAT_4_TEMP_HOTEND) "\nM109 S" STRINGIFY(PREHEAT_4_TEMP_HOTEND) Z_CAL_END + #define MAIN_MENU_ITEM_7_CONFIRM + + #define MAIN_MENU_ITEM_8_DESC PREHEAT_5_LABEL Z_CAL_DESC + #define MAIN_MENU_ITEM_8_GCODE Z_CAL_PRE_ABL STRINGIFY(PREHEAT_5_TEMP_BED) "\nM190 S" STRINGIFY(PREHEAT_5_TEMP_BED) "\nM104 S160\nM109 S160\nG29\nG1 X2.0 Y-2.0 Z0.60\nM104 S" STRINGIFY(PREHEAT_5_TEMP_HOTEND) "\nM109 S" STRINGIFY(PREHEAT_5_TEMP_HOTEND) Z_CAL_END + #define MAIN_MENU_ITEM_8_CONFIRM + + #define MAIN_MENU_ITEM_9_DESC PREHEAT_6_LABEL Z_CAL_DESC + #define MAIN_MENU_ITEM_9_GCODE Z_CAL_PRE_ABL STRINGIFY(PREHEAT_6_TEMP_BED) "\nM190 S" STRINGIFY(PREHEAT_6_TEMP_BED) "\nM104 S160\nM109 S160\nG29\nG1 X2.0 Y-2.0 Z0.60\nM104 S" STRINGIFY(PREHEAT_6_TEMP_HOTEND) "\nM109 S" STRINGIFY(PREHEAT_6_TEMP_HOTEND) Z_CAL_END + #define MAIN_MENU_ITEM_9_CONFIRM + + #define MAIN_MENU_ITEM_10_DESC PREHEAT_7_LABEL Z_CAL_DESC + #define MAIN_MENU_ITEM_10_GCODE Z_CAL_PRE_ABL STRINGIFY(PREHEAT_7_TEMP_BED) "\nM190 S" STRINGIFY(PREHEAT_7_TEMP_BED) "\nM104 S160\nM109 S160\nG29\nG1 X2.0 Y-2.0 Z0.60\nM104 S" STRINGIFY(PREHEAT_7_TEMP_HOTEND) "\nM109 S" STRINGIFY(PREHEAT_7_TEMP_HOTEND) Z_CAL_END + #define MAIN_MENU_ITEM_10_CONFIRM + + #define MAIN_MENU_ITEM_11_DESC PREHEAT_8_LABEL Z_CAL_DESC + #define MAIN_MENU_ITEM_11_GCODE Z_CAL_PRE_ABL STRINGIFY(PREHEAT_8_TEMP_BED) "\nM190 S" STRINGIFY(PREHEAT_8_TEMP_BED) "\nM104 S160\nM109 S160\nG29\nG1 X2.0 Y-2.0 Z0.60\nM104 S" STRINGIFY(PREHEAT_8_TEMP_HOTEND) "\nM109 S" STRINGIFY(PREHEAT_8_TEMP_HOTEND) Z_CAL_END + #define MAIN_MENU_ITEM_11_CONFIRM + + #define MAIN_MENU_ITEM_12_DESC PREHEAT_9_LABEL Z_CAL_DESC + #define MAIN_MENU_ITEM_12_GCODE Z_CAL_PRE_ABL STRINGIFY(PREHEAT_9_TEMP_BED) "\nM190 S" STRINGIFY(PREHEAT_9_TEMP_BED) "\nM104 S160\nM109 S160\nG29\nG1 X2.0 Y-2.0 Z0.60\nM104 S" STRINGIFY(PREHEAT_9_TEMP_HOTEND) "\nM109 S" STRINGIFY(PREHEAT_9_TEMP_HOTEND) Z_CAL_END + #define MAIN_MENU_ITEM_12_CONFIRM + + #define MAIN_MENU_ITEM_13_DESC "Reset EEPROM" + #define MAIN_MENU_ITEM_13_GCODE "M502\nM500" + #define MAIN_MENU_ITEM_13_CONFIRM + #elif ENABLED(PRUSA_AIO_BED_LEVELING_UBL) + #define MAIN_MENU_ITEM_4_DESC PREHEAT_1_LABEL Z_CAL_DESC + #define MAIN_MENU_ITEM_4_GCODE Z_CAL_PRE_UBL STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND) "\nM190 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM109 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND) Z_CAL_END + #define MAIN_MENU_ITEM_4_CONFIRM + + #define MAIN_MENU_ITEM_5_DESC PREHEAT_2_LABEL Z_CAL_DESC + #define MAIN_MENU_ITEM_5_GCODE Z_CAL_PRE_UBL STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND) "\nM190 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM109 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND) Z_CAL_END + #define MAIN_MENU_ITEM_5_CONFIRM + + #define MAIN_MENU_ITEM_6_DESC PREHEAT_3_LABEL Z_CAL_DESC + #define MAIN_MENU_ITEM_6_GCODE Z_CAL_PRE_UBL STRINGIFY(PREHEAT_3_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_3_TEMP_HOTEND) "\nM190 S" STRINGIFY(PREHEAT_3_TEMP_BED) "\nM109 S" STRINGIFY(PREHEAT_3_TEMP_HOTEND) Z_CAL_END + #define MAIN_MENU_ITEM_6_CONFIRM + + #define MAIN_MENU_ITEM_7_DESC PREHEAT_4_LABEL Z_CAL_DESC + #define MAIN_MENU_ITEM_7_GCODE Z_CAL_PRE_UBL STRINGIFY(PREHEAT_4_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_4_TEMP_HOTEND) "\nM190 S" STRINGIFY(PREHEAT_4_TEMP_BED) "\nM109 S" STRINGIFY(PREHEAT_4_TEMP_HOTEND) Z_CAL_END + #define MAIN_MENU_ITEM_7_CONFIRM + + #define MAIN_MENU_ITEM_8_DESC PREHEAT_5_LABEL Z_CAL_DESC + #define MAIN_MENU_ITEM_8_GCODE Z_CAL_PRE_UBL STRINGIFY(PREHEAT_5_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_5_TEMP_HOTEND) "\nM190 S" STRINGIFY(PREHEAT_5_TEMP_BED) "\nM109 S" STRINGIFY(PREHEAT_5_TEMP_HOTEND) Z_CAL_END + #define MAIN_MENU_ITEM_8_CONFIRM + + #define MAIN_MENU_ITEM_9_DESC PREHEAT_6_LABEL Z_CAL_DESC + #define MAIN_MENU_ITEM_9_GCODE Z_CAL_PRE_UBL STRINGIFY(PREHEAT_6_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_6_TEMP_HOTEND) "\nM190 S" STRINGIFY(PREHEAT_6_TEMP_BED) "\nM109 S" STRINGIFY(PREHEAT_6_TEMP_HOTEND) Z_CAL_END + #define MAIN_MENU_ITEM_9_CONFIRM + + #define MAIN_MENU_ITEM_10_DESC PREHEAT_7_LABEL Z_CAL_DESC + #define MAIN_MENU_ITEM_10_GCODE Z_CAL_PRE_UBL STRINGIFY(PREHEAT_7_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_7_TEMP_HOTEND) "\nM190 S" STRINGIFY(PREHEAT_7_TEMP_BED) "\nM109 S" STRINGIFY(PREHEAT_7_TEMP_HOTEND) Z_CAL_END + #define MAIN_MENU_ITEM_10_CONFIRM + + #define MAIN_MENU_ITEM_11_DESC PREHEAT_8_LABEL Z_CAL_DESC + #define MAIN_MENU_ITEM_11_GCODE Z_CAL_PRE_UBL STRINGIFY(PREHEAT_8_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_8_TEMP_HOTEND) "\nM190 S" STRINGIFY(PREHEAT_8_TEMP_BED) "\nM109 S" STRINGIFY(PREHEAT_8_TEMP_HOTEND) Z_CAL_END + #define MAIN_MENU_ITEM_11_CONFIRM + + #define MAIN_MENU_ITEM_12_DESC PREHEAT_9_LABEL Z_CAL_DESC + #define MAIN_MENU_ITEM_12_GCODE Z_CAL_PRE_UBL STRINGIFY(PREHEAT_9_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_9_TEMP_HOTEND) "\nM190 S" STRINGIFY(PREHEAT_9_TEMP_BED) "\nM109 S" STRINGIFY(PREHEAT_9_TEMP_HOTEND) Z_CAL_END + #define MAIN_MENU_ITEM_12_CONFIRM + + #define MAIN_MENU_ITEM_13_DESC "UBL Mesh Wizard" + #define MAIN_MENU_ITEM_13_GCODE "M1004" + #define MAIN_MENU_ITEM_13_CONFIRM + + #define MAIN_MENU_ITEM_14_DESC "Adjust Point Near" + #define MAIN_MENU_ITEM_14_GCODE "G29 P4\nM500" + #define MAIN_MENU_ITEM_14_CONFIRM + + #define MAIN_MENU_ITEM_15_DESC "Reset EEPROM" + #define MAIN_MENU_ITEM_15_GCODE "M502\nM500" + #define MAIN_MENU_ITEM_15_CONFIRM + #endif #endif // @section custom config menu @@ -4038,18 +4127,18 @@ // Custom Menu: Configuration Menu //#define CUSTOM_MENU_CONFIG #if ENABLED(CUSTOM_MENU_CONFIG) - //#define CUSTOM_MENU_CONFIG_TITLE "Custom Commands" - #define CUSTOM_MENU_CONFIG_SCRIPT_DONE "M117 Wireless Script Done" - #define CUSTOM_MENU_CONFIG_SCRIPT_AUDIBLE_FEEDBACK - //#define CUSTOM_MENU_CONFIG_SCRIPT_RETURN // Return to status screen after a script + #define CUSTOM_MENU_CONFIG_TITLE "Sheet Profiles" + #define CUSTOM_MENU_CONFIG_SCRIPT_DONE "M500\nM117 Sheet Loaded" + //#define CUSTOM_MENU_CONFIG_SCRIPT_AUDIBLE_FEEDBACK + #define CUSTOM_MENU_CONFIG_SCRIPT_RETURN // Return to status screen after a script #define CUSTOM_MENU_CONFIG_ONLY_IDLE // Only show custom menu when the machine is idle - #define CONFIG_MENU_ITEM_1_DESC "Wifi ON" - #define CONFIG_MENU_ITEM_1_GCODE "M118 [ESP110] WIFI-STA pwd=12345678" + //#define CONFIG_MENU_ITEM_1_DESC "Wifi ON" + //#define CONFIG_MENU_ITEM_1_GCODE "M118 [ESP110] WIFI-STA pwd=12345678" //#define CONFIG_MENU_ITEM_1_CONFIRM // Show a confirmation dialog before this action - #define CONFIG_MENU_ITEM_2_DESC "Bluetooth ON" - #define CONFIG_MENU_ITEM_2_GCODE "M118 [ESP110] BT pwd=12345678" + //#define CONFIG_MENU_ITEM_2_DESC "Bluetooth ON" + //#define CONFIG_MENU_ITEM_2_GCODE "M118 [ESP110] BT pwd=12345678" //#define CONFIG_MENU_ITEM_2_CONFIRM //#define CONFIG_MENU_ITEM_3_DESC "Radio OFF" @@ -4114,12 +4203,12 @@ * Host Prompt Support enables Marlin to use the host for user prompts so * filament runout and other processes can be managed from the host side. */ -//#define HOST_ACTION_COMMANDS +#define HOST_ACTION_COMMANDS #if ENABLED(HOST_ACTION_COMMANDS) //#define HOST_PAUSE_M76 // Tell the host to pause in response to M76 - //#define HOST_PROMPT_SUPPORT // Initiate host prompts to get user feedback + #define HOST_PROMPT_SUPPORT // Initiate host prompts to get user feedback #if ENABLED(HOST_PROMPT_SUPPORT) - //#define HOST_STATUS_NOTIFICATIONS // Send some status messages to the host as notifications + #define HOST_STATUS_NOTIFICATIONS // Send some status messages to the host as notifications #endif //#define HOST_START_MENU_ITEM // Add a menu item that tells the host to start //#define HOST_SHUTDOWN_MENU_ITEM // Add a menu item that tells the host to shut down @@ -4132,7 +4221,7 @@ * * Implement M486 to allow Marlin to skip objects */ -//#define CANCEL_OBJECTS +#define CANCEL_OBJECTS #if ENABLED(CANCEL_OBJECTS) #define CANCEL_OBJECTS_REPORTING // Emit the current object as a status message #endif @@ -4249,7 +4338,7 @@ */ //#define MECHANICAL_GANTRY_CALIBRATION #if ENABLED(MECHANICAL_GANTRY_CALIBRATION) - #define GANTRY_CALIBRATION_CURRENT 600 // Default calibration current in ma + #define GANTRY_CALIBRATION_CURRENT (Z_CURRENT/2) // Default calibration current in ma #define GANTRY_CALIBRATION_EXTRA_HEIGHT 15 // Extra distance in mm past Z_###_POS to move #define GANTRY_CALIBRATION_FEEDRATE 500 // Feedrate for correction move //#define GANTRY_CALIBRATION_TO_MIN // Enable to calibrate Z in the MIN direction diff --git a/Marlin/Prusa_AIO_Configuration.h b/Marlin/Prusa_AIO_Configuration.h new file mode 100644 index 0000000000..811b79a854 --- /dev/null +++ b/Marlin/Prusa_AIO_Configuration.h @@ -0,0 +1,549 @@ +#pragma once + +/** + * Prusa_AIO_Configuration.h + * + * This file includes basic settings like: + * + * - Getting Started with Prusa All-in-One Firmware + * - Custom Printer Name + * - Tall Bear + * - Motherboard + * - USB Flash Drive + * - ESP WiFi Addon + * - Stepper Drivers + * - Stepper Motors + * - Extruder + * - Probe & Bed Leveling + * - Fans + * - Thermal & PID Settings + * - LCD / TFT / Controller + * - Custom Menus + * - NeoPixels + * - Input Shaping + * - MK2.5S Support + */ +#define CONFIGURATION_H_VERSION 02010300 +#define PRUSA_AIO_VERSION 20240423 + +//=========================================================================== +//============= Getting Started with Prusa All-in-One Firmware ============== +//=========================================================================== + +/** + * If you find this project helpful, please consider donating: + * + * Keith Bennett, Prusa AIO creator: https://github.com/sponsors/thisiskeithb + * https://ko-fi.com/thisiskeithb + * + * Here are some standard links to get your machine set up: + * + * Prusa AIO Wiki: https://github.com/thisiskeithb/PrusaAIO/wiki/ + * Prusa AIO Discussions: https://github.com/thisiskeithb/PrusaAIO/discussions + * + * Thank you and Happy Printing! + */ + +//=========================================================================== +//=========================== Custom Printer Name =========================== +//=========================================================================== + +// Uncomment to set a custom printer name. +//#define PRUSA_AIO_CUSTOM_PRINTER_NAME "AIO Bear" + +//=========================================================================== +//================================ Tall Bear ================================ +//=========================================================================== + +// Stock Bear frame (210mm Z) is assumed by default. Uncomment PRUSA_AIO_FRAME_BEAR_320 to enable 320mm Z support. +//#define PRUSA_AIO_FRAME_BEAR_320 + +//=========================================================================== +//=============================== Motherboard =============================== +//=========================================================================== + +/** + * Motherboard Options + * + * BigTreeTech + * + * - SKR 3.0 (STM32H723VG/STM32H743VI) + * - SKR 3.0 EZ (STM32H723VG/STM32H743VI) + * - SKR 2.0 Rev. B (STM32F407VG/STM32F429VG) + * - SKR 1.4 (LPC1768) + * - SKR 1.4 Turbo (LPC1769) + * - BTT002 1.0 (STM32F407VG/STM32F407VE) + * - SKR Mini E3 V3 (STM32G0B1RE) + * - SKR Mini E3 V3.0.1 (STM32F401RC) + * - SKR Mini E3 V2 (STM32F103RC/STM32F103RE) + * + * Makerbase / MKS + * + * - Robin Nano V3 (STM32F407VG) + * - Robin Nano V3.1 (STM32F407VE) + * - Eagle V1.0 (STM32F407VE) + * - SGEN_L V2 (LPC1769) + * - Robin E3 1.0 (STM32F103RC) + * - Robin E3 1.1 (STM32F103RC) + * - Robin E3D 1.0 (STM32F103RC) + * - Robin E3D 1.1 (STM32F103RC) + * + * Motherboard Cases: https://github.com/thisiskeithb/PrusaAIO/wiki/Recommended-Motherboard-Cases + * Wiring Guide: https://github.com/thisiskeithb/PrusaAIO/wiki/Supported-Motherboards-&-Wiring-Guide + */ +//#define PRUSA_AIO_MOTHERBOARD_BTT_SKR_V3_0 +#define PRUSA_AIO_MOTHERBOARD_BTT_SKR_V3_0_EZ +//#define PRUSA_AIO_MOTHERBOARD_BTT_SKR_V2_0_REV_B +//#define PRUSA_AIO_MOTHERBOARD_BTT_SKR_1_4 +//#define PRUSA_AIO_MOTHERBOARD_BTT_SKR_1_4_TURBO +//#define PRUSA_AIO_MOTHERBOARD_BTT_BTT002 +//#define PRUSA_AIO_MOTHERBOARD_BTT_SKR_MINI_E3_V3_0 +//#define PRUSA_AIO_MOTHERBOARD_BTT_SKR_MINI_E3_V3_0_1 +//#define PRUSA_AIO_MOTHERBOARD_BTT_SKR_MINI_E3_V2_0 +//#define PRUSA_AIO_MOTHERBOARD_MKS_ROBIN_NANO_V3 +//#define PRUSA_AIO_MOTHERBOARD_MKS_ROBIN_NANO_V3_1 +//#define PRUSA_AIO_MOTHERBOARD_MKS_EAGLE_V1_0 +//#define PRUSA_AIO_MOTHERBOARD_MKS_SGEN_L_V2 +//#define PRUSA_AIO_MOTHERBOARD_MKS_ROBIN_E3 +//#define PRUSA_AIO_MOTHERBOARD_MKS_ROBIN_E3_V1_1 +//#define PRUSA_AIO_MOTHERBOARD_MKS_ROBIN_E3D +//#define PRUSA_AIO_MOTHERBOARD_MKS_ROBIN_E3D_V1_1 + +//=========================================================================== +//============================= USB Flash Drive ============================= +//=========================================================================== + +/** + * BigTreeTech SKR V2, MKS Robin Nano V3.x, and MKS Eagle only + * + * Disabled by default. Uncomment PRUSA_AIO_FLASH_DRIVE_SUPPORT to enable support. + */ +//#define PRUSA_AIO_FLASH_DRIVE_SUPPORT + +//=========================================================================== +//============================= ESP WiFi Addon ============================== +//=========================================================================== + +/** + * BigTreeTech SKR V3/EZ, SKR V2, SKR V1.4/Turbo, BTT002, MKS Robin Nano V3.x, MKS Eagle, and MKS SGEN_L V2 only + * + * ESP3D download: https://github.com/luc-github/ESP3D + * ESP3D WEBUI download: https://github.com/luc-github/ESP3D-WEBUI + * + * Disabled by default. Uncomment PRUSA_AIO_WIFI_SUPPORT to enable support. + */ +//#define PRUSA_AIO_WIFI_SUPPORT + +//=========================================================================== +//============================= Stepper Drivers ============================= +//=========================================================================== + +/** + * Trinamic Drivers with Sensorless Homing + * + * - TMC2209 / EZ2209 + * - TMC2226 / EZ2226 + * - TMC5160 / EZ5160 + * - TMC2130 / EZ2130 - Active cooling is essential or drivers will overheat! + * + * Supported Drivers: https://github.com/thisiskeithb/PrusaAIO/wiki/Supported-Drivers + * Note: If your motherboard supports five drivers, all five driver slots must be populated. + */ +#define PRUSA_AIO_DRIVERS_TMC2209 // TMC2209 / BTT EZ2209 with 0.11 Ohm RSENSE resistors +//#define PRUSA_AIO_DRIVERS_TMC2226_015_RSENSE // BTT TMC2226 with 0.15 Ohm RSENSE resistors +//#define PRUSA_AIO_DRIVERS_TMC2226_011_RSENSE // MKS TMC2226 / BTT EZ2226 with 0.11 Ohm RSENSE resistors +//#define PRUSA_AIO_DRIVERS_TMC5160 // TMC5160 / BTT EZ5160 with 0.075 Ohm RSENSE resistors +//#define PRUSA_AIO_DRIVERS_TMC2130 // TMC2130 / BTT EZ2130 with 0.11 Ohm RSENSE resistors + +//=========================================================================== +//============================= Stepper Motors ============================== +//=========================================================================== + +/** + * Extruder Stepper Motor + * + * - Stock 1.8° + * - Bondtech 1.8° pancake + * - LDO 0.9° Slim Power pancake + * - LDO Planetary Geared + * + * Supported Motors: https://github.com/thisiskeithb/PrusaAIO/wiki/Supported-Motors + * Wiring Guide: https://github.com/thisiskeithb/PrusaAIO/wiki/Supported-Motherboards-&-Wiring-Guide + */ +#define PRUSA_AIO_E_STEPPER_STOCK +//#define PRUSA_AIO_E_STEPPER_BONDTECH +//#define PRUSA_AIO_E_STEPPER_LDO_0_9 +//#define PRUSA_AIO_E_STEPPER_LDO_PLANETARY + +/** + * X/Y Stepper Motors + * + * - Stock 1.8° + * - LDO 0.9° + * - Moons 0.9° + * + * Supported Motors: https://github.com/thisiskeithb/PrusaAIO/wiki/Supported-Motors + * Wiring Guide: https://github.com/thisiskeithb/PrusaAIO/wiki/Supported-Motherboards-&-Wiring-Guide + */ +#define PRUSA_AIO_XY_STEPPERS_STOCK +//#define PRUSA_AIO_XY_STEPPERS_LDO_0_9 +//#define PRUSA_AIO_XY_STEPPERS_MOONS_0_9 + +// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way. +//#define PRUSA_AIO_INVERT_X_DIR +//#define PRUSA_AIO_INVERT_Y_DIR +//#define PRUSA_AIO_INVERT_Z_DIR +//#define PRUSA_AIO_INVERT_E_DIR + +/** + * Sensorless Homing + * + * Sensitivity TMC2209 TMC5160 + * TMC2226 TMC2130 + * HIGHEST 255 -64 (Too sensitive => False positive) + * LOWEST 0 63 (Too insensitive => No trigger) + * + * If needed, uncomment PRUSA_AIO_*_STALL sensorless (StallGuard) settings below. + * Settings can also be customized via LCD under Configuration -> Advanced Settings -> TMC Drivers -> Sensorless Homing + */ +//#define PRUSA_AIO_X_STALL_SENSITIVITY 90 +//#define PRUSA_AIO_Y_STALL_SENSITIVITY 100 + +// If needed, uncomment PRUSA_AIO_HOMING_FEEDRATE_MM_M to customize Homing speeds (mm/min) +//#define PRUSA_AIO_HOMING_FEEDRATE_MM_M { (50*60), (50*60), (4*60) } + +//=========================================================================== +//================================ Extruder ================================= +//=========================================================================== + +/** + * Extruder + * + * - Bear extruder w/ SuperPINDA or PINDA V2 + * - Bear extruder w/ integrated BLTouch mount by Vertigo 235 https://www.printables.com/model/6606 + * - Bondtech BMG extruder w/ SuperPINDA or PINDA V2 https://www.bondtech.se/product/prusa-i3-mk3s-extruder-upgrade/ + * - Bondtech BMG extruder w/ BLTouch mount by Vertigo 235 https://www.printables.com/model/6623 + * + * Supported Extruders: https://github.com/thisiskeithb/PrusaAIO/wiki/Supported-Extruders + * Wiring Guide: https://github.com/thisiskeithb/PrusaAIO/wiki/Supported-Motherboards-&-Wiring-Guide + */ +#define PRUSA_AIO_EXTRUDER_BEAR_PINDA +//#define PRUSA_AIO_EXTRUDER_BEAR_BLTOUCH +//#define PRUSA_AIO_EXTRUDER_BMG_PINDA +//#define PRUSA_AIO_EXTRUDER_BMG_BLTOUCH + +//=========================================================================== +//========================== Probe & Bed Leveling =========================== +//=========================================================================== + +/** + * PINDA Probe + * + * - SuperPINDA (3 wires) + * - PINDA V2 w/ Thermistor (4 wires) + * + * Wiring Guide: https://github.com/thisiskeithb/PrusaAIO/wiki/Supported-Motherboards-&-Wiring-Guide + */ +#if ANY(PRUSA_AIO_EXTRUDER_BEAR_PINDA, PRUSA_AIO_EXTRUDER_BMG_PINDA) + #define PRUSA_AIO_PROBE_SUPERPINDA + //#define PRUSA_AIO_PROBE_PINDA_V2 +#endif + +/** + * Probe Connection + * + * Connect probe to ZPROBE (5-pin) or SERVO (3-pin) + ZPROBE (2-pin) by default. + * Uncomment if connecting probe to SERVO + Z MIN/Z STOP instead. + */ +//#define PRUSA_AIO_PROBE_USES_Z_MIN_ENDSTOP_PIN + +/* + * Custom Probe Offset + * + * Default probe offsets will be used based on the extruder selection above. + * + * If needed, uncomment to customize probe offset. This can also be customized via LCD + * under Configuration -> Advanced Settings -> Probe Offsets + */ +//#define PRUSA_AIO_NOZZLE_TO_PROBE_OFFSET { 23, 5, 0 } + +/** + * Bed Leveling Type + * + * - Bilinear + * - Unified Bed Leveling + */ +#define PRUSA_AIO_BED_LEVELING_BILINEAR +//#define PRUSA_AIO_BED_LEVELING_UBL + +//=========================================================================== +//================================== Fans =================================== +//=========================================================================== + +/** + * Part Cooling Fan + * + * 24V Options: + * + * - Generic (No minimum PWM limit is applied) + * - 24V Mechatronics B5015E24B-BSR + * - 24V Delta BFB0524HH + * - 24V SoundOriginal + * + * 12V Options (MK2.5S only): + * + * - Generic (No minimum PWM limit is applied) + * - 12V SoundOriginal + * + * 5V Options (BigTreeTech BTT002 1.0 & SKR V3/EZ with DC Mode addon board only): + * + * - Generic (No minimum PWM limit is applied) + * - 5V Stock Prusa 5015 + * - 5V LDO DF5015H05S + * + * Supported Fans: https://github.com/thisiskeithb/PrusaAIO/wiki/Supported-Fans + * Wiring Guide: https://github.com/thisiskeithb/PrusaAIO/wiki/Supported-Motherboards-&-Wiring-Guide + */ +#define PRUSA_AIO_PART_COOLING_FAN_GENERIC +//#define PRUSA_AIO_PART_COOLING_FAN_24V_MECHATRONICS_B5015E24B_BSR +//#define PRUSA_AIO_PART_COOLING_FAN_24V_DELTA_BFB0524HH +//#define PRUSA_AIO_PART_COOLING_FAN_24V_SOUNDORIGINAL +//#define PRUSA_AIO_PART_COOLING_FAN_12V_STOCK_PRUSA_MK25S_5015 +//#define PRUSA_AIO_PART_COOLING_FAN_12V_SOUNDORIGINAL +//#define PRUSA_AIO_PART_COOLING_FAN_5V_STOCK_PRUSA_MK3S_5015 +//#define PRUSA_AIO_PART_COOLING_FAN_5V_LDO_DF5015H05S + +/** + * Motherboard Cooling Fan + * + * Wiring Guide: https://github.com/thisiskeithb/PrusaAIO/wiki/Supported-Motherboards-&-Wiring-Guide + */ +//#define PRUSA_AIO_MOTHERBOARD_FAN + +//=========================================================================== +//========================= Thermal & PID Settings ========================== +//=========================================================================== + +/** + * Standard Thermistor + * + * - Stock V6 Semitec 104NT + * - Generic NTC 100K (Type 1) + * + * High Temperature Thermistor + * + * - Slice Engineering's 450°C High Temperature Thermistor + * - Trianglelab T-D500 500°C High Temperature Thermistor (Cartridge-based Dyze Design thermistor) + * + * Supported Thermistors: https://github.com/thisiskeithb/PrusaAIO/wiki/Supported-Thermistors + * Wiring Guide: https://github.com/thisiskeithb/PrusaAIO/wiki/Supported-Motherboards-&-Wiring-Guide + */ +#define PRUSA_AIO_THERMISTOR_STOCK_SEMITEC_104NT +//#define PRUSA_AIO_THERMISTOR_GENERIC_100K +//#define PRUSA_AIO_THERMISTOR_SLICE_450C +//#define PRUSA_AIO_THERMISTOR_TL_T_D500 + +/** + * Custom PID Settings + * + * Stock E3D V6 hotend and Prusa MK52 bed PID settings are enabled by default. + * + * If needed, uncomment PRUSA_AIO_CUSTOM_HOTEND_PID or PRUSA_AIO_CUSTOM_BED_PID to customize PID settings. + */ +//#define PRUSA_AIO_CUSTOM_HOTEND_PID +#if ENABLED(PRUSA_AIO_CUSTOM_HOTEND_PID) + #define PRUSA_AIO_DEFAULT_Kp 16.50 + #define PRUSA_AIO_DEFAULT_Ki 1.16 + #define PRUSA_AIO_DEFAULT_Kd 58.80 + // Find your own by running "M303 E0 C8 S210" via serial to run autotune on the hotend at 210 °C for 8 cycles. +#endif + +//#define PRUSA_AIO_CUSTOM_BED_PID +#if ENABLED(PRUSA_AIO_CUSTOM_BED_PID) + #define PRUSA_AIO_DEFAULT_bedKp 28.13 + #define PRUSA_AIO_DEFAULT_bedKi 2.09 + #define PRUSA_AIO_DEFAULT_bedKd 483.07 + // Find your own by running "M303 E-1 C8 S65" via serial to run autotune on the bed at 65 °C for 8 cycles. +#endif + +/** + * Model Predictive Control for Hotend + * + * Stock E3D V6 hotend with 40W heater cartridge is configured by default. + * + * Note: Replaces PID for the hotend + */ +//#define PRUSA_AIO_HOTEND_MPCTEMP + +// If needed, uncomment PRUSA_AIO_CUSTOM_HOTEND_MPCTEMP to customize MPCTEMP settings. +// Use M306 T to autotune the model. See https://marlinfw.org/docs/gcode/M306.html for full details. +//#define PRUSA_AIO_CUSTOM_HOTEND_MPCTEMP +#if ALL(PRUSA_AIO_HOTEND_MPCTEMP, PRUSA_AIO_CUSTOM_HOTEND_MPCTEMP) + #define PRUSA_AIO_CUSTOM_MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge power. + #define PRUSA_AIO_CUSTOM_MPC_BLOCK_HEAT_CAPACITY { 16.7f } // (J/K) Heat block heat capacity. Use M306 T to autotune the model. + #define PRUSA_AIO_CUSTOM_MPC_SENSOR_RESPONSIVENESS { 0.22f } // (K/s per ∆K) Rate of change of sensor temperature from heat block. + #define PRUSA_AIO_CUSTOM_MPC_AMBIENT_XFER_COEFF { 0.068f } // (W/K) Heat transfer coefficients from heat block to room air with fan off. + #define PRUSA_AIO_CUSTOM_MPC_AMBIENT_XFER_COEFF_FAN255 { 0.097f } // (W/K) Heat transfer coefficients from heat block to room air with fan on full. + + + // Filament Heat Capacity (joules/kelvin/mm) + // Set with M306 H in your filament or start G-code. + #define PRUSA_AIO_CUSTOM_FILAMENT_HEAT_CAPACITY_PERMM { 5.6e-3f } // PLA = 5.6e-3f (0.0056) J/K/mm + // PETG = 3.6e-3f (0.0036) J/K/mm + // ABS = 5.15e-3f (0.00515) J/K/mm + // Nylon = 5.22e-3f (0.00522) J/K/mm +#endif + +//=========================================================================== +//========================= LCD / TFT / Controller ========================== +//=========================================================================== + +/** + * LCD / TFT / Controller + * + * - Stock RepRapDiscount smart controller + * - OLED RepRapDiscount smart controller // OLED screen is only compatible with LPC-based motherboards. + * - BigTreeTech Dual Mode TFT // BigTreeTech TFT35, TFT50, TFT70, etc. + * - BTT Mini 12864 with NeoPixel RGB // BigTreeTech Mini 12864 V1/V2 with NeoPixel RGB + * - Fysetc Mini 12864 with NeoPixel RGB // Fysetc Mini 12864 V2.1 with NeoPixel RGB + * - MKS Mini 12864 with NeoPixel RGB // MKS Mini 12864 V3 with NeoPixel RGB + * + * LCD Covers: https://github.com/thisiskeithb/PrusaAIO/wiki/Recommended-LCD-Covers + */ +#define PRUSA_AIO_DISPLAY_STOCK_REPRAP_DISCOUNT_SMART_CONTROLLER +//#define PRUSA_AIO_DISPLAY_OLED_REPRAP_DISCOUNT_SMART_CONTROLLER +//#define PRUSA_AIO_DISPLAY_BTT_DUAL_MODE_TFT +//#define PRUSA_AIO_DISPLAY_BTT_MINI_12864_NEOPIXEL +//#define PRUSA_AIO_DISPLAY_FYSETC_MINI_12864_NEOPIXEL +//#define PRUSA_AIO_DISPLAY_MKS_MINI_12864_NEOPIXEL + +// +// Reverse the encoder direction everywhere. +// +//#define PRUSA_AIO_REVERSE_ENCODER_DIRECTION + +/** + * LCD LANGUAGE + * + * Select the language to display on the LCD. These languages are available: + * + * en, an, bg, ca, cz, da, de, el, el_CY, es, eu, fi, fr, gl, hr, hu, it, + * jp_kana, ko_KR, nl, pl, pt, pt_br, ro, ru, sk, sv, tr, uk, vi, zh_CN, zh_TW + * + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek (Greece)', 'el_CY':'Greek (Cyprus)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'hu':'Hungarian', 'it':'Italian', 'jp_kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt_br':'Portuguese (Brazilian)', 'ro':'Romanian', 'ru':'Russian', 'sk':'Slovak', 'sv':'Swedish', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)' } + */ +#define PRUSA_AIO_LCD_LANGUAGE en + +//=========================================================================== +//============================== Custom Menus =============================== +//=========================================================================== + +/** + * Sheet Profiles Menu + * + * Automatically adjust Z Probe Offset with M851 based on selected Sheet Profile. + * Up to 10 are supported without changes. + */ +//#define PRUSA_AIO_SHEET_PROFILES_MENU +#if ENABLED(PRUSA_AIO_SHEET_PROFILES_MENU) + #define PRUSA_AIO_SHEET_1_DESC "Smooth" // Short description of Sheet + #define PRUSA_AIO_SHEET_1_OFFSET -0.000 // Sheet offset. This should be a negative value. + + #define PRUSA_AIO_SHEET_2_DESC "Textured" + #define PRUSA_AIO_SHEET_2_OFFSET -0.000 + + //#define PRUSA_AIO_SHEET_3_DESC "Satin" + //#define PRUSA_AIO_SHEET_3_OFFSET -0.000 +#endif + +/** + * Calibration Menu + * + * Top-level menu with first layer calibration, nozzle change, automated cold pull, and more. + */ +//#define PRUSA_AIO_CALIBRATION_MENU + +//=========================================================================== +//================================ NeoPixels ================================ +//=========================================================================== + +/** + * Default LCD NeoPixel Color (Mini 12864 with NeoPixel RGB only) + * + * - WHITE, RED, ORANGE, YELLOW, GREEN, BLUE, INDIGO, VIOLET + */ +#if ANY(PRUSA_AIO_DISPLAY_BTT_MINI_12864_NEOPIXEL, PRUSA_AIO_DISPLAY_FYSETC_MINI_12864_NEOPIXEL, PRUSA_AIO_DISPLAY_MKS_MINI_12864_NEOPIXEL) + #define PRUSA_AIO_LCD_NEOPIXEL_COLOR_WHITE + //#define PRUSA_AIO_LCD_NEOPIXEL_COLOR_RED + //#define PRUSA_AIO_LCD_NEOPIXEL_COLOR_ORANGE + //#define PRUSA_AIO_LCD_NEOPIXEL_COLOR_YELLOW + //#define PRUSA_AIO_LCD_NEOPIXEL_COLOR_GREEN + //#define PRUSA_AIO_LCD_NEOPIXEL_COLOR_BLUE + //#define PRUSA_AIO_LCD_NEOPIXEL_COLOR_INDIGO + //#define PRUSA_AIO_LCD_NEOPIXEL_COLOR_VIOLET +#endif + +// NeoPixel strip is disabled by default. Uncomment to enable. +//#define PRUSA_AIO_NEOPIXEL_STRIP +#if ENABLED(PRUSA_AIO_NEOPIXEL_STRIP) + /** + * NeoPixel Strip Type + * + * - NEO_GRBW, NEO_RGBW, NEO_GRB, NEO_RBG, etc. + * + * 60 LEDs/meter: https://www.amazon.com/dp/B018X04ES2 + * Wiring Guide: https://github.com/thisiskeithb/PrusaAIO/wiki/Supported-Motherboards-&-Wiring-Guide + */ + #define PRUSA_AIO_NEOPIXEL_STRIP_TYPE NEO_GRB + #define PRUSA_AIO_NEOPIXEL_STRIP_LED_COUNT 17 // 17 NeoPixels fit in the top 2040 extrusion (60 LEDs/meter) + #define PRUSA_AIO_NEOPIXEL_STRIP_BRIGHTNESS 255 // 255 is max brightness + + /** + * Default NeoPixel Strip Color + * + * - WHITE, RED, ORANGE, YELLOW, GREEN, BLUE, INDIGO, VIOLET + */ + #define PRUSA_AIO_NEOPIXEL_STRIP_COLOR_WHITE + //#define PRUSA_AIO_NEOPIXEL_STRIP_COLOR_RED + //#define PRUSA_AIO_NEOPIXEL_STRIP_COLOR_ORANGE + //#define PRUSA_AIO_NEOPIXEL_STRIP_COLOR_YELLOW + //#define PRUSA_AIO_NEOPIXEL_STRIP_COLOR_GREEN + //#define PRUSA_AIO_NEOPIXEL_STRIP_COLOR_BLUE + //#define PRUSA_AIO_NEOPIXEL_STRIP_COLOR_INDIGO + //#define PRUSA_AIO_NEOPIXEL_STRIP_COLOR_VIOLET +#endif + +//=========================================================================== +//============================== Input Shaping ============================== +//=========================================================================== + +/** + * Input Shaping -- EXPERIMENTAL + * + * Zero Vibration (ZV) Input Shaping for X and/or Y movements. + * + * See https://github.com/MarlinFirmware/Marlin/pull/24797 for configuration & full details. + * + * Tune with M593 D F: + * + * D Set the zeta/damping factor. If axes (X, Y, etc.) are not specified, set for all axes. + * F Set the frequency. If axes (X, Y, etc.) are not specified, set for all axes. + * X<1> Set the given parameters only for the X axis. + * Y<1> Set the given parameters only for the Y axis. + */ +//#define PRUSA_AIO_INPUT_SHAPING +#if ENABLED(PRUSA_AIO_INPUT_SHAPING) + #define PRUSA_AIO_SHAPING_FREQ_X 40 // (Hz) The default dominant resonant frequency on the X axis. + #define PRUSA_AIO_SHAPING_FREQ_Y 40 // (Hz) The default dominant resonant frequency on the Y axis. + #define PRUSA_AIO_SHAPING_ZETA_X 0.15 // Damping ratio of the X axis (range: 0.0 = no damping to 1.0 = critical damping). + #define PRUSA_AIO_SHAPING_ZETA_Y 0.15 // Damping ratio of the Y axis (range: 0.0 = no damping to 1.0 = critical damping). + //#define PRUSA_AIO_SHAPING_MIN_FREQ 20.0 // By default the minimum of the shaping frequencies. Override to affect SRAM usage. + //#define PRUSA_AIO_SHAPING_MAX_STEPRATE 10000 // By default the maximum total step rate of the shaped axes. Override to affect SRAM usage. +#endif + +//=========================================================================== +//============================= MK2.5S Support ============================== +//=========================================================================== + +// Uncomment to enable Prusa MK2.5S support. X & Y endstops are required. +//#define PRUSA_AIO_MK25S_SUPPORT diff --git a/Marlin/src/inc/MarlinConfigPre.h b/Marlin/src/inc/MarlinConfigPre.h index c2191ab1b7..4c7112ea4c 100644 --- a/Marlin/src/inc/MarlinConfigPre.h +++ b/Marlin/src/inc/MarlinConfigPre.h @@ -36,6 +36,13 @@ #include "../core/macros.h" #include "../core/boards.h" + +// PRUSA_AIO files +#include "../../Prusa_AIO_Configuration.h" +#include "Prusa_AIO_Changes.h" +#include "Prusa_AIO_SanityCheck.h" +#include "Prusa_AIO_Conditionals.h" + #include "../../Configuration.h" #ifdef CUSTOM_VERSION_FILE diff --git a/Marlin/src/inc/Prusa_AIO_Changes.h b/Marlin/src/inc/Prusa_AIO_Changes.h new file mode 100644 index 0000000000..465c4451c5 --- /dev/null +++ b/Marlin/src/inc/Prusa_AIO_Changes.h @@ -0,0 +1,33 @@ +#pragma once +//=========================================================================== +//========================== DO NOT EDIT THIS FILE ========================== +//=========================================================================== + +/** + * Prusa_AIO_Changes.h + * Alert about Prusa_AIO_Configuration.h changes at compile-time. + */ +#define CONFIGURATION_H_VERSION 02010300 +#define PRUSA_AIO_VERSION 20240423 + +#ifdef PRUSA_AIO_PRINTER_NAME + #error "PRUSA_AIO_PRINTER_NAME is now PRUSA_AIO_CUSTOM_PRINTER_NAME. Please update your config." +#elif defined(PRUSA_AIO_FRAME_BEAR_210) + #error "PRUSA_AIO_FRAME_BEAR_210 is no longer used and 210mm Z is assumed by default. Please update your config." +#elif defined(PRUSA_AIO_E_STEPPER_BONDTECH_MOTECH) + #error "PRUSA_AIO_E_STEPPER_BONDTECH_MOTECH is now PRUSA_AIO_E_STEPPER_BONDTECH. Please update your config." +#elif defined(PRUSA_AIO_THERMISTOR_DYZE_DESIGN) + #error "PRUSA_AIO_THERMISTOR_DYZE_DESIGN is now PRUSA_AIO_THERMISTOR_TL_T_D500. Please update your config." +#elif defined(PRUSA_AIO_MOTHERBOARD_BTT_SKR_MINI_E3_V3) + #error "PRUSA_AIO_MOTHERBOARD_BTT_SKR_MINI_E3_V3 is now PRUSA_AIO_MOTHERBOARD_BTT_SKR_MINI_E3_V3_0. Please update your config." +#elif defined(PRUSA_AIO_DISPLAY_MINI_12864_NEOPIXEL) + #error "PRUSA_AIO_DISPLAY_MINI_12864_NEOPIXEL is now PRUSA_AIO_DISPLAY_BTT_MINI_12864_NEOPIXEL, PRUSA_AIO_DISPLAY_FYSETC_MINI_12864_NEOPIXEL, or PRUSA_AIO_DISPLAY_MKS_MINI_12864_NEOPIXEL. Please update your config." +#elif defined(PRUSA_AIO_DRIVERS_BTT_TMC2226) + #error "PRUSA_AIO_DRIVERS_BTT_TMC2226 is now PRUSA_AIO_DRIVERS_TMC2226_015_RSENSE. Please update your config." +#elif defined(PRUSA_AIO_DRIVERS_MKS_TMC2226) + #error "PRUSA_AIO_DRIVERS_MKS_TMC2226 is now PRUSA_AIO_DRIVERS_TMC2226_011_RSENSE. Please update your config." +#elif defined(PRUSA_AIO_FT_MOTION) + #error "PRUSA_AIO_FT_MOTION has been removed to simplify Prusa AIO configuration. Please update your config. To use Fixed-time-based Motion Control, enable FT_MOTION in Configuration_adv.h." +#elif defined(PRUSA_AIO_PART_COOLING_FAN_5V_STOCK_PRUSA_5015) + #error "PRUSA_AIO_PART_COOLING_FAN_5V_STOCK_PRUSA_5015 is now PRUSA_AIO_PART_COOLING_FAN_5V_STOCK_PRUSA_MK3S_5015. Please update your config." +#endif diff --git a/Marlin/src/inc/Prusa_AIO_Conditionals.h b/Marlin/src/inc/Prusa_AIO_Conditionals.h new file mode 100644 index 0000000000..129cfaa96c --- /dev/null +++ b/Marlin/src/inc/Prusa_AIO_Conditionals.h @@ -0,0 +1,1044 @@ +#pragma once +//=========================================================================== +//========================== DO NOT EDIT THIS FILE ========================== +//=========================================================================== + +/** + * Prusa_AIO_Conditionals.h + * Configuration logic based on Prusa_AIO_Configuration.h options at compile-time. + */ +#define CONFIGURATION_H_VERSION 02010300 +#define PRUSA_AIO_VERSION 20240423 + +//=========================================================================== +//============================ Source Code Info ============================= +//=========================================================================== + +#define SOURCE_CODE_URL "bit.ly/3FnRN20" +#define WEBSITE_URL SOURCE_CODE_URL + +//=========================================================================== +//============================== Printer Name =============================== +//=========================================================================== + +#ifndef PRUSA_AIO_CUSTOM_PRINTER_NAME + #define PRUSA_AIO_CUSTOM_PRINTER_NAME "AIO Bear" +#endif + +//=========================================================================== +//=========================== Printer/Frame Type ============================ +//=========================================================================== + +#define PRUSA_AIO_Z_MAX_POS TERN(PRUSA_AIO_FRAME_BEAR_320, 320, 210) + +//=========================================================================== +//=============================== Motherboard =============================== +//=========================================================================== + +// Define MOTHERBOARD here so preflight-checks.py works +#if ENABLED(PRUSA_AIO_MOTHERBOARD_BTT_SKR_V3_0) + #define MOTHERBOARD BOARD_BTT_SKR_V3_0 + #define PRUSA_AIO_REAL_EEPROM 1 + #define PRUSA_AIO_HAS_FIVE_DRIVERS 1 + #define PRUSA_AIO_HAS_CONTROLLER_FAN 1 + #define CONTROLLER_FAN_PIN FAN2_PIN // PB5 + #define PRUSA_AIO_HAS_ENDSTOP_INTERRUPTS_FEATURE 1 + #define PRUSA_AIO_NEEDS_ALT_DISPLAY_MINI_12864_NEOPIXEL_ORDER 1 // Incorrect RGB color workaround on SKR V3 + #define PRUSA_AIO_SDCARD_CONNECTION LCD + #define PRUSA_AIO_NEEDS_FAN_SOFT_PWM 1 + #define PRUSA_AIO_USB_SERIAL_PORT -1 + #define PRUSA_AIO_TFT_SERIAL_PORT 1 + #define PRUSA_AIO_WIFI_SERIAL_PORT 3 + #define PRUSA_AIO_BOARD_NEOPIXEL_PIN PE6 +#elif ENABLED(PRUSA_AIO_MOTHERBOARD_BTT_SKR_V3_0_EZ) + #define MOTHERBOARD BOARD_BTT_SKR_V3_0_EZ + #define PRUSA_AIO_NO_DRIVER_UART_SPI_JUMPERS 1 + #define PRUSA_AIO_REAL_EEPROM 1 + #define PRUSA_AIO_HAS_FIVE_DRIVERS 1 + #define PRUSA_AIO_HAS_CONTROLLER_FAN 1 + #define CONTROLLER_FAN_PIN FAN2_PIN // PB5 + #define PRUSA_AIO_HAS_ENDSTOP_INTERRUPTS_FEATURE 1 + #define PRUSA_AIO_NEEDS_ALT_DISPLAY_MINI_12864_NEOPIXEL_ORDER 1 // Incorrect RGB color workaround on SKR V3 + #define PRUSA_AIO_SDCARD_CONNECTION LCD + #define PRUSA_AIO_NEEDS_FAN_SOFT_PWM 1 + #define PRUSA_AIO_USB_SERIAL_PORT -1 + #define PRUSA_AIO_TFT_SERIAL_PORT 1 + #define PRUSA_AIO_WIFI_SERIAL_PORT 3 + #define PRUSA_AIO_BOARD_NEOPIXEL_PIN PE6 +#elif ENABLED(PRUSA_AIO_MOTHERBOARD_BTT_SKR_V2_0_REV_B) + #define MOTHERBOARD BOARD_BTT_SKR_V2_0_REV_B + #define PRUSA_AIO_HAS_FIVE_DRIVERS 1 + #define PRUSA_AIO_HAS_CONTROLLER_FAN 1 + #define CONTROLLER_FAN_PIN FAN2_PIN // PB5 + #define PRUSA_AIO_HAS_ENDSTOP_INTERRUPTS_FEATURE 1 + #define PRUSA_AIO_SDCARD_CONNECTION LCD + #define PRUSA_AIO_NEEDS_FAN_SOFT_PWM 1 + #define PRUSA_AIO_USB_SERIAL_PORT -1 + #define PRUSA_AIO_TFT_SERIAL_PORT 1 + #define PRUSA_AIO_WIFI_SERIAL_PORT 3 + #define PRUSA_AIO_BOARD_NEOPIXEL_PIN PE6 +#elif ENABLED(PRUSA_AIO_MOTHERBOARD_BTT_SKR_1_4) + #define MOTHERBOARD BOARD_BTT_SKR_V1_4 + #define PRUSA_AIO_HAS_FIVE_DRIVERS 1 + #define PRUSA_AIO_SDCARD_CONNECTION LCD + #define PRUSA_AIO_USB_SERIAL_PORT -1 + #define PRUSA_AIO_TFT_SERIAL_PORT 0 + #define PRUSA_AIO_WIFI_SERIAL_PORT 3 + #define PRUSA_AIO_BOARD_NEOPIXEL_PIN P1_24 +#elif ENABLED(PRUSA_AIO_MOTHERBOARD_BTT_SKR_1_4_TURBO) + #define MOTHERBOARD BOARD_BTT_SKR_V1_4_TURBO + #define PRUSA_AIO_HAS_FIVE_DRIVERS 1 + #define PRUSA_AIO_SDCARD_CONNECTION LCD + #define PRUSA_AIO_USB_SERIAL_PORT -1 + #define PRUSA_AIO_TFT_SERIAL_PORT 0 + #define PRUSA_AIO_WIFI_SERIAL_PORT 3 + #define PRUSA_AIO_BOARD_NEOPIXEL_PIN P1_24 +#elif ENABLED(PRUSA_AIO_MOTHERBOARD_BTT_BTT002) + #define MOTHERBOARD BOARD_BTT_BTT002_V1_0 + #define PRUSA_AIO_HAS_ENDSTOP_INTERRUPTS_FEATURE 1 + #define PRUSA_AIO_SDCARD_CONNECTION LCD // No onboard SD card connection + #define PRUSA_AIO_NEEDS_FAN_SOFT_PWM 1 + #define MK3_FAN_PINS // Disable this for FAN_PIN PB9 and FAN1_PIN PB8 + #define NO_MK3_FAN_PINS_WARNING + #define PRUSA_AIO_INVERTED_MOTOR_DIR_DEFAULT 1 + #define PRUSA_AIO_USB_SERIAL_PORT -1 + #define PRUSA_AIO_TFT_SERIAL_PORT 2 + #define PRUSA_AIO_WIFI_SERIAL_PORT 3 +#elif ENABLED(PRUSA_AIO_MOTHERBOARD_BTT_SKR_MINI_E3_V3_0) + #define MOTHERBOARD BOARD_BTT_SKR_MINI_E3_V3_0 + #define PRUSA_AIO_NO_DRIVER_UART_SPI_JUMPERS 1 + #define PRUSA_AIO_REAL_EEPROM 1 + #define PRUSA_AIO_HAS_CONTROLLER_FAN 1 + #define CONTROLLER_FAN_PIN FAN2_PIN // PB15 + #define PRUSA_AIO_HAS_ENDSTOP_INTERRUPTS_FEATURE 1 + #define PRUSA_AIO_SDCARD_CONNECTION ONBOARD + #define PRUSA_AIO_NEEDS_FAN_SOFT_PWM 1 + #define PRUSA_AIO_USB_SERIAL_PORT -1 + #define PRUSA_AIO_TFT_SERIAL_PORT 2 + #define PRUSA_AIO_BOARD_NEOPIXEL_PIN PA8 +#elif ENABLED(PRUSA_AIO_MOTHERBOARD_BTT_SKR_MINI_E3_V3_0_1) + #define MOTHERBOARD BOARD_BTT_SKR_MINI_E3_V3_0_1 + #define PRUSA_AIO_NO_DRIVER_UART_SPI_JUMPERS 1 + #define PRUSA_AIO_REAL_EEPROM 1 + #define PRUSA_AIO_HAS_CONTROLLER_FAN 1 + #define CONTROLLER_FAN_PIN FAN2_PIN // PC8 + #define PRUSA_AIO_HAS_ENDSTOP_INTERRUPTS_FEATURE 1 + #define PRUSA_AIO_SDCARD_CONNECTION ONBOARD + #define PRUSA_AIO_NEEDS_FAN_SOFT_PWM 1 + #define PRUSA_AIO_USB_SERIAL_PORT -1 + #define PRUSA_AIO_TFT_SERIAL_PORT 2 + #define PRUSA_AIO_BOARD_NEOPIXEL_PIN PA14 +#elif ENABLED(PRUSA_AIO_MOTHERBOARD_BTT_SKR_MINI_E3_V2_0) + #define MOTHERBOARD BOARD_BTT_SKR_MINI_E3_V2_0 + #define PRUSA_AIO_NO_DRIVER_UART_SPI_JUMPERS 1 + #define PRUSA_AIO_REAL_EEPROM 1 + #define PRUSA_AIO_HAS_ENDSTOP_INTERRUPTS_FEATURE 1 + #define PRUSA_AIO_SDCARD_CONNECTION ONBOARD + #define PRUSA_AIO_NEEDS_FAN_SOFT_PWM 1 + #define PRUSA_AIO_USB_SERIAL_PORT -1 + #define PRUSA_AIO_TFT_SERIAL_PORT 2 + #define PRUSA_AIO_BOARD_NEOPIXEL_PIN PA8 +#elif ENABLED(PRUSA_AIO_MOTHERBOARD_MKS_ROBIN_NANO_V3) + #define MOTHERBOARD BOARD_MKS_ROBIN_NANO_V3 + #define PRUSA_AIO_REAL_EEPROM 1 + #define PRUSA_AIO_HAS_FIVE_DRIVERS 1 + #define PRUSA_AIO_HAS_CONTROLLER_FAN 1 + #define CONTROLLER_FAN_PIN HEATER_1_PIN // PB0 + #define PRUSA_AIO_HAS_ENDSTOP_INTERRUPTS_FEATURE 1 + #define PRUSA_AIO_SDCARD_CONNECTION LCD + #define PRUSA_AIO_NEEDS_FAN_SOFT_PWM 1 + #define PRUSA_AIO_PROBE_USES_Z_MIN_ENDSTOP_PIN + #define PRUSA_AIO_USB_SERIAL_PORT -1 + #define PRUSA_AIO_TFT_SERIAL_PORT 3 // 4-pin header marked "5V GND TX3 RX3" + #define PRUSA_AIO_WIFI_SERIAL_PORT 1 +#elif ENABLED(PRUSA_AIO_MOTHERBOARD_MKS_ROBIN_NANO_V3_1) + #define MOTHERBOARD BOARD_MKS_ROBIN_NANO_V3_1 + #define PRUSA_AIO_REAL_EEPROM 1 + #define PRUSA_AIO_HAS_FIVE_DRIVERS 1 + #define PRUSA_AIO_HAS_CONTROLLER_FAN 1 + #define CONTROLLER_FAN_PIN HEATER_1_PIN // PB0 + #define PRUSA_AIO_HAS_ENDSTOP_INTERRUPTS_FEATURE 1 + #define PRUSA_AIO_SDCARD_CONNECTION LCD + #define PRUSA_AIO_NEEDS_FAN_SOFT_PWM 1 + #define PRUSA_AIO_PROBE_USES_Z_MIN_ENDSTOP_PIN + #define PRUSA_AIO_USB_SERIAL_PORT -1 + #define PRUSA_AIO_TFT_SERIAL_PORT 3 // 4-pin header marked "5V GND TX3 RX3" + #define PRUSA_AIO_WIFI_SERIAL_PORT 1 +#elif ENABLED(PRUSA_AIO_MOTHERBOARD_MKS_EAGLE_V1_0) + #define MOTHERBOARD BOARD_MKS_EAGLE + #define PRUSA_AIO_NO_DRIVER_UART_SPI_JUMPERS 1 + #define PRUSA_AIO_REAL_EEPROM 1 + #define PRUSA_AIO_HAS_FIVE_DRIVERS 1 + #define PRUSA_AIO_HAS_CONTROLLER_FAN 1 + #define CONTROLLER_FAN_PIN HEATER_1_PIN // PB0 + #define PRUSA_AIO_HAS_ENDSTOP_INTERRUPTS_FEATURE 1 + #define PRUSA_AIO_SDCARD_CONNECTION LCD + #define PRUSA_AIO_NEEDS_FAN_SOFT_PWM 1 + #define PRUSA_AIO_PROBE_USES_Z_MIN_ENDSTOP_PIN + #define PRUSA_AIO_INVERTED_MOTOR_DIR_DEFAULT 1 + #define PRUSA_AIO_USB_SERIAL_PORT -1 + #define PRUSA_AIO_TFT_SERIAL_PORT 3 // 4-pin header marked "5V GND TX3 RX3" + #define PRUSA_AIO_WIFI_SERIAL_PORT 1 +#elif ENABLED(PRUSA_AIO_MOTHERBOARD_MKS_SGEN_L_V2) + #define MOTHERBOARD BOARD_MKS_SGEN_L_V2 + #define PRUSA_AIO_REAL_EEPROM 1 + #define PRUSA_AIO_HAS_FIVE_DRIVERS 1 + #define PRUSA_AIO_HAS_CONTROLLER_FAN 1 + #define CONTROLLER_FAN_PIN HEATER_1_PIN // P2.6 + #define PRUSA_AIO_MEDIA_INIT_WARNING 1 // Shared SD detect + #define PRUSA_AIO_SDCARD_CONNECTION LCD + #define PRUSA_AIO_USB_SERIAL_PORT -1 + #define PRUSA_AIO_TFT_SERIAL_PORT 0 + #define PRUSA_AIO_WIFI_SERIAL_PORT 3 +#elif ENABLED(PRUSA_AIO_MOTHERBOARD_MKS_ROBIN_E3) + #define MOTHERBOARD BOARD_MKS_ROBIN_E3 + #define PRUSA_AIO_NO_DRIVER_UART_SPI_JUMPERS 1 + #define PRUSA_AIO_NO_FAN1_PIN 1 + #define PRUSA_AIO_HAS_ENDSTOP_INTERRUPTS_FEATURE 1 + #define PRUSA_AIO_SDCARD_CONNECTION ONBOARD + #define PRUSA_AIO_NEEDS_FAN_SOFT_PWM 1 + #define PRUSA_AIO_INVERTED_MOTOR_DIR_DEFAULT 1 + #define PRUSA_AIO_USB_SERIAL_PORT 1 + #define PRUSA_AIO_TFT_SERIAL_PORT 3 // AUX-1 + #define PRUSA_AIO_BOARD_NEOPIXEL_PIN PA2 +#elif ENABLED(PRUSA_AIO_MOTHERBOARD_MKS_ROBIN_E3_V1_1) + #define MOTHERBOARD BOARD_MKS_ROBIN_E3_V1_1 + #define PRUSA_AIO_NO_DRIVER_UART_SPI_JUMPERS 1 + #define PRUSA_AIO_REAL_EEPROM 1 + #define PRUSA_AIO_NO_FAN1_PIN 1 + #define PRUSA_AIO_HAS_ENDSTOP_INTERRUPTS_FEATURE 1 + #define PRUSA_AIO_SDCARD_CONNECTION ONBOARD + #define PRUSA_AIO_NEEDS_FAN_SOFT_PWM 1 + #define PRUSA_AIO_INVERTED_MOTOR_DIR_DEFAULT 1 + #define PRUSA_AIO_USB_SERIAL_PORT 1 + #define PRUSA_AIO_TFT_SERIAL_PORT 3 // AUX-1 + #define PRUSA_AIO_BOARD_NEOPIXEL_PIN PA2 +#elif ENABLED(PRUSA_AIO_MOTHERBOARD_MKS_ROBIN_E3D) + #define MOTHERBOARD BOARD_MKS_ROBIN_E3D + #define PRUSA_AIO_NO_FAN1_PIN 1 + #define PRUSA_AIO_HAS_ENDSTOP_INTERRUPTS_FEATURE 1 + #define PRUSA_AIO_SDCARD_CONNECTION ONBOARD + #define PRUSA_AIO_NEEDS_FAN_SOFT_PWM 1 + #define PRUSA_AIO_INVERTED_MOTOR_DIR_DEFAULT 1 + #define PRUSA_AIO_USB_SERIAL_PORT 1 + #define PRUSA_AIO_TFT_SERIAL_PORT 3 // AUX-1 + #define PRUSA_AIO_BOARD_NEOPIXEL_PIN PA2 +#elif ENABLED(PRUSA_AIO_MOTHERBOARD_MKS_ROBIN_E3D_V1_1) + #define MOTHERBOARD BOARD_MKS_ROBIN_E3D_V1_1 + #define PRUSA_AIO_REAL_EEPROM 1 + #define PRUSA_AIO_NO_FAN1_PIN 1 + #define PRUSA_AIO_HAS_ENDSTOP_INTERRUPTS_FEATURE 1 + #define PRUSA_AIO_SDCARD_CONNECTION ONBOARD + #define PRUSA_AIO_NEEDS_FAN_SOFT_PWM 1 + #define PRUSA_AIO_INVERTED_MOTOR_DIR_DEFAULT 1 + #define PRUSA_AIO_USB_SERIAL_PORT 1 + #define PRUSA_AIO_TFT_SERIAL_PORT 3 // AUX-1 + #define PRUSA_AIO_BOARD_NEOPIXEL_PIN PA2 +#endif + +// Remove the need to poll the interrupt pins, saving many CPU cycles +#if ENABLED(PRUSA_AIO_HAS_ENDSTOP_INTERRUPTS_FEATURE) + #define ENDSTOP_INTERRUPTS_FEATURE +#endif + +// Support for USB thumb drives +#if ENABLED(PRUSA_AIO_FLASH_DRIVE_SUPPORT) + #define USB_FLASH_DRIVE_SUPPORT +#endif + +//=========================================================================== +//============================== Serial Ports =============================== +//=========================================================================== + +#if ALL(PRUSA_AIO_DISPLAY_BTT_DUAL_MODE_TFT, PRUSA_AIO_WIFI_SUPPORT) + #define SERIAL_PORT_2 PRUSA_AIO_TFT_SERIAL_PORT + #define SERIAL_PORT_3 PRUSA_AIO_WIFI_SERIAL_PORT +#elif ENABLED(PRUSA_AIO_DISPLAY_BTT_DUAL_MODE_TFT) + #define SERIAL_PORT_2 PRUSA_AIO_TFT_SERIAL_PORT +#elif ENABLED(PRUSA_AIO_WIFI_SUPPORT) + #define SERIAL_PORT_2 PRUSA_AIO_WIFI_SERIAL_PORT +#endif + +//=========================================================================== +//============================= Stepper Drivers ============================= +//=========================================================================== + +#if ENABLED(PRUSA_AIO_HAS_FIVE_DRIVERS) + #define Z2_DRIVER_TYPE Z_DRIVER_TYPE +#endif + +#if ENABLED(PRUSA_AIO_DRIVERS_TMC5160) + #define PRUSA_AIO_DRIVER_TYPE TMC5160 + #define PRUSA_AIO_XY_MIN_ENDSTOP_HIT_STATE TERN(SENSORLESS_HOMING, LOW, HIGH) + #define TMC_USE_SW_SPI + #define PRUSA_AIO_DRIVER_RSENSE 0.075 +#elif ENABLED(PRUSA_AIO_DRIVERS_TMC2130) + #define PRUSA_AIO_DRIVER_TYPE TMC2130 + #define PRUSA_AIO_XY_MIN_ENDSTOP_HIT_STATE TERN(SENSORLESS_HOMING, LOW, HIGH) + #define TMC_USE_SW_SPI + #define PRUSA_AIO_DRIVER_RSENSE 0.11 +#elif ENABLED(PRUSA_AIO_DRIVERS_TMC2226_015_RSENSE) + #define PRUSA_AIO_DRIVER_TYPE TMC2209 + #define PRUSA_AIO_XY_MIN_ENDSTOP_HIT_STATE TERN(SENSORLESS_HOMING, HIGH, LOW) + #define PRUSA_AIO_DRIVER_RSENSE 0.15 +#elif ANY(PRUSA_AIO_DRIVERS_TMC2209, PRUSA_AIO_DRIVERS_TMC2226_011_RSENSE) + #define PRUSA_AIO_DRIVER_TYPE TMC2209 + #define PRUSA_AIO_XY_MIN_ENDSTOP_HIT_STATE TERN(SENSORLESS_HOMING, HIGH, LOW) + #define PRUSA_AIO_DRIVER_RSENSE 0.11 +#endif + +// Silence default driver warnings since they're handled in Prusa_AIO_Warnings.cpp +#define NO_AUTO_ASSIGN_WARNING +#define DIAG_JUMPERS_REMOVED +#define DIAG_PINS_REMOVED + +//=========================================================================== +//============================= Stepper Motors ============================== +//=========================================================================== + +/** + * Motor Directions + * | + | - | + * --------------------|-----|-----| + * X Motor | CW | CCW | + * Y Motor | CCW | CW | + * Z Motors | CW | CCW | + * E Motor (Stock) | CCW | CW | + * E Motor (BMG) | CW | CCW | + * E Motor (Planetary) | CW | CCW | + */ + +// Default Extruder inverting +#if ENABLED(PRUSA_AIO_DRIVERS_TMC5160) + #if ENABLED(PRUSA_AIO_INVERTED_MOTOR_DIR_DEFAULT) + #define INVERT_E0_DIR true + #else + #define INVERT_E0_DIR false + #endif +#elif ANY(PRUSA_AIO_DRIVERS_TMC2209, PRUSA_AIO_DRIVERS_TMC2226_015_RSENSE, PRUSA_AIO_DRIVERS_TMC2226_011_RSENSE, PRUSA_AIO_DRIVERS_TMC2130) + #if ENABLED(PRUSA_AIO_INVERTED_MOTOR_DIR_DEFAULT) + #define INVERT_E0_DIR false + #else + #define INVERT_E0_DIR true + #endif +#endif + +#if ENABLED(PRUSA_AIO_E_STEPPER_STOCK) + #define PRUSA_AIO_EXTRUDER_STEPS_PER_UNIT 280 + #define PRUSA_AIO_E0_CURRENT 550 + #define PRUSA_AIO_E0_MICROSTEPS 32 + + #if ENABLED(PRUSA_AIO_MK25S_SUPPORT) + #define PRUSA_AIO_CHOPPER_TIMING_E CHOPPER_DEFAULT_12V + #else + #define PRUSA_AIO_CHOPPER_TIMING_E CHOPPER_DEFAULT_24V + #endif +#elif ENABLED(PRUSA_AIO_E_STEPPER_BONDTECH) + #if INVERT_E0_DIR == true + #undef INVERT_E0_DIR // Prevent redefined warnings + #define INVERT_E0_DIR false + #elif INVERT_E0_DIR == false + #undef INVERT_E0_DIR // Prevent redefined warnings + #define INVERT_E0_DIR true + #endif + #define PRUSA_AIO_EXTRUDER_STEPS_PER_UNIT 830 + #define PRUSA_AIO_E0_CURRENT 550 + #define PRUSA_AIO_E0_MICROSTEPS 32 + + #if ENABLED(PRUSA_AIO_MK25S_SUPPORT) + #define PRUSA_AIO_CHOPPER_TIMING_E CHOPPER_DEFAULT_12V + #else + #define PRUSA_AIO_CHOPPER_TIMING_E CHOPPER_DEFAULT_24V + #endif +#elif ENABLED(PRUSA_AIO_E_STEPPER_LDO_0_9) + #if INVERT_E0_DIR == true + #undef INVERT_E0_DIR // Prevent redefined warnings + #define INVERT_E0_DIR false + #elif INVERT_E0_DIR == false + #undef INVERT_E0_DIR // Prevent redefined warnings + #define INVERT_E0_DIR true + #endif + #define PRUSA_AIO_EXTRUDER_STEPS_PER_UNIT 830 + #define PRUSA_AIO_E0_CURRENT 550 + #define PRUSA_AIO_E0_MICROSTEPS 16 + + #if ENABLED(PRUSA_AIO_MK25S_SUPPORT) + #define PRUSA_AIO_CHOPPER_TIMING_E CHOPPER_DEFAULT_12V + #else + #define PRUSA_AIO_CHOPPER_TIMING_E CHOPPER_09STEP_24V + #endif +#elif ENABLED(PRUSA_AIO_E_STEPPER_LDO_PLANETARY) + #if INVERT_E0_DIR == true + #undef INVERT_E0_DIR // Prevent redefined warnings + #define INVERT_E0_DIR false + #elif INVERT_E0_DIR == false + #undef INVERT_E0_DIR // Prevent redefined warnings + #define INVERT_E0_DIR true + #endif + #define PRUSA_AIO_EXTRUDER_STEPS_PER_UNIT 980 + #define PRUSA_AIO_E0_CURRENT 650 + #define PRUSA_AIO_E0_MICROSTEPS 32 + #define PRUSA_AIO_CHOPPER_TIMING_E CHOPPER_DEFAULT_24V +#endif + +// User Extruder inverting +#if ENABLED(PRUSA_AIO_INVERT_E_DIR) + #if INVERT_E0_DIR == true + #undef INVERT_E0_DIR // Prevent redefined warnings + #define INVERT_E0_DIR false + #elif INVERT_E0_DIR == false + #undef INVERT_E0_DIR // Prevent redefined warnings + #define INVERT_E0_DIR true + #endif +#endif + +// Sensorless homing for MK3S/+ +#if DISABLED(PRUSA_AIO_MK25S_SUPPORT) + #define SENSORLESS_HOMING +#endif + +#if ENABLED(PRUSA_AIO_XY_STEPPERS_STOCK) + #define PRUSA_AIO_DEFAULT_AXIS_STEPS_PER_UNIT { 100, 100, 400, (PRUSA_AIO_EXTRUDER_STEPS_PER_UNIT) } + + #if ENABLED(PRUSA_AIO_MK25S_SUPPORT) + #define PRUSA_AIO_CHOPPER_TIMING_X CHOPPER_DEFAULT_12V + #define PRUSA_AIO_CHOPPER_TIMING_Y CHOPPER_DEFAULT_12V + #define PRUSA_AIO_CHOPPER_TIMING_Z CHOPPER_DEFAULT_12V + #else + #define PRUSA_AIO_CHOPPER_TIMING_X CHOPPER_DEFAULT_24V + #define PRUSA_AIO_CHOPPER_TIMING_Y CHOPPER_DEFAULT_24V + #define PRUSA_AIO_CHOPPER_TIMING_Z CHOPPER_DEFAULT_24V + #endif + + #define PRUSA_AIO_X_CURRENT 500 + #define PRUSA_AIO_X_CURRENT_HOME 200 + #define PRUSA_AIO_Y_CURRENT 600 + #define PRUSA_AIO_Y_CURRENT_HOME 250 + + // StallGuard settings + #ifndef PRUSA_AIO_X_STALL_SENSITIVITY + #if ANY(PRUSA_AIO_DRIVERS_TMC5160, PRUSA_AIO_DRIVERS_TMC2130) + #define PRUSA_AIO_X_STALL_SENSITIVITY 2 + #elif ANY(PRUSA_AIO_DRIVERS_TMC2209, PRUSA_AIO_DRIVERS_TMC2226_015_RSENSE, PRUSA_AIO_DRIVERS_TMC2226_011_RSENSE) + #define PRUSA_AIO_X_STALL_SENSITIVITY 90 + #endif + #endif + #ifndef PRUSA_AIO_Y_STALL_SENSITIVITY + #if ANY(PRUSA_AIO_DRIVERS_TMC5160, PRUSA_AIO_DRIVERS_TMC2130) + #define PRUSA_AIO_Y_STALL_SENSITIVITY 3 + #elif ANY(PRUSA_AIO_DRIVERS_TMC2209, PRUSA_AIO_DRIVERS_TMC2226_015_RSENSE, PRUSA_AIO_DRIVERS_TMC2226_011_RSENSE, PRUSA_AIO_DRIVERS_TMC2226_011_RSENSE) + #define PRUSA_AIO_Y_STALL_SENSITIVITY 100 + #endif + #endif + +#elif ANY(PRUSA_AIO_XY_STEPPERS_LDO_0_9, PRUSA_AIO_XY_STEPPERS_MOONS_0_9) + #define PRUSA_AIO_DEFAULT_AXIS_STEPS_PER_UNIT { 200, 200, 400, (PRUSA_AIO_EXTRUDER_STEPS_PER_UNIT) } + + #if ENABLED(PRUSA_AIO_MK25S_SUPPORT) + #define PRUSA_AIO_CHOPPER_TIMING_X CHOPPER_DEFAULT_12V + #define PRUSA_AIO_CHOPPER_TIMING_Y CHOPPER_DEFAULT_12V + #define PRUSA_AIO_CHOPPER_TIMING_Z CHOPPER_DEFAULT_12V + #else + #define PRUSA_AIO_CHOPPER_TIMING_X CHOPPER_09STEP_24V + #define PRUSA_AIO_CHOPPER_TIMING_Y CHOPPER_09STEP_24V + #define PRUSA_AIO_CHOPPER_TIMING_Z CHOPPER_09STEP_24V + #endif + + #if ENABLED(PRUSA_AIO_XY_STEPPERS_LDO_0_9) + #define PRUSA_AIO_X_CURRENT 900 + #define PRUSA_AIO_X_CURRENT_HOME 300 + #define PRUSA_AIO_Y_CURRENT 1000 + #define PRUSA_AIO_Y_CURRENT_HOME 400 + + // StallGuard settings + #ifndef PRUSA_AIO_X_STALL_SENSITIVITY + #define PRUSA_AIO_X_STALL_SENSITIVITY 81 + #endif + + #ifndef PRUSA_AIO_Y_STALL_SENSITIVITY + #define PRUSA_AIO_Y_STALL_SENSITIVITY 85 + #endif + + #elif ENABLED(PRUSA_AIO_XY_STEPPERS_MOONS_0_9) + #define PRUSA_AIO_X_CURRENT 650 + #define PRUSA_AIO_X_CURRENT_HOME 225 + #define PRUSA_AIO_Y_CURRENT 750 + #define PRUSA_AIO_Y_CURRENT_HOME 200 + + // StallGuard settings + #ifndef PRUSA_AIO_X_STALL_SENSITIVITY + #define PRUSA_AIO_X_STALL_SENSITIVITY 140 + #endif + #ifndef PRUSA_AIO_Y_STALL_SENSITIVITY + #define PRUSA_AIO_Y_STALL_SENSITIVITY 132 + #endif + #endif +#endif + +// Homing speeds (mm/min) +#ifndef PRUSA_AIO_HOMING_FEEDRATE_MM_M + #define PRUSA_AIO_HOMING_FEEDRATE_MM_M { (50*60), (50*60), (4*60) } +#endif + +// Default X/Y inverting +#if ENABLED(PRUSA_AIO_DRIVERS_TMC5160) + #if ENABLED(PRUSA_AIO_INVERTED_MOTOR_DIR_DEFAULT) + #define INVERT_X_DIR false + #define INVERT_Y_DIR true + #else + #define INVERT_X_DIR true + #define INVERT_Y_DIR false + #endif +#elif ANY(PRUSA_AIO_DRIVERS_TMC2209, PRUSA_AIO_DRIVERS_TMC2226_015_RSENSE, PRUSA_AIO_DRIVERS_TMC2226_011_RSENSE, PRUSA_AIO_DRIVERS_TMC2130) + #if ENABLED(PRUSA_AIO_INVERTED_MOTOR_DIR_DEFAULT) + #define INVERT_X_DIR true + #define INVERT_Y_DIR false + #else + #define INVERT_X_DIR false + #define INVERT_Y_DIR true + #endif +#endif + +// Default Z inverting +#if ENABLED(PRUSA_AIO_DRIVERS_TMC5160) + #if ENABLED(PRUSA_AIO_INVERTED_MOTOR_DIR_DEFAULT) + #define INVERT_Z_DIR false + #else + #define INVERT_Z_DIR true + #endif +#elif ANY(PRUSA_AIO_DRIVERS_TMC2209, PRUSA_AIO_DRIVERS_TMC2226_015_RSENSE, PRUSA_AIO_DRIVERS_TMC2226_011_RSENSE, PRUSA_AIO_DRIVERS_TMC2130) + #if ENABLED(PRUSA_AIO_INVERTED_MOTOR_DIR_DEFAULT) + #define INVERT_Z_DIR true + #else + #define INVERT_Z_DIR false + #endif +#endif + +// User X inverting +#if ENABLED(PRUSA_AIO_INVERT_X_DIR) + #if INVERT_X_DIR == true + #undef INVERT_X_DIR // Prevent redefined warnings + #define INVERT_X_DIR false + #elif INVERT_X_DIR == false + #undef INVERT_X_DIR // Prevent redefined warnings + #define INVERT_X_DIR true + #endif +#endif + +// User Y inverting +#if ENABLED(PRUSA_AIO_INVERT_Y_DIR) + #if INVERT_Y_DIR == true + #undef INVERT_Y_DIR // Prevent redefined warnings + #define INVERT_Y_DIR false + #elif INVERT_Y_DIR == false + #undef INVERT_Y_DIR // Prevent redefined warnings + #define INVERT_Y_DIR true + #endif +#endif + +// User Z inverting +#if ENABLED(PRUSA_AIO_INVERT_Z_DIR) + #if INVERT_Z_DIR == true + #undef INVERT_Z_DIR // Prevent redefined warnings + #define INVERT_Z_DIR false + #elif INVERT_Z_DIR == false + #undef INVERT_Z_DIR // Prevent redefined warnings + #define INVERT_Z_DIR true + #endif +#endif + +//=========================================================================== +//================================= Hotend ================================== +//=========================================================================== + +// TODO: E3D Hemera Note: Shift bed to the left 11mm // X_MIN_POS -11 Y_MIN_POS -2 + +// Probe Temperature Compensation based on bed temperature +#define PTC_BED + +#if ANY(PRUSA_AIO_EXTRUDER_BEAR_BLTOUCH, PRUSA_AIO_EXTRUDER_BMG_BLTOUCH) + #define BLTOUCH + #define PRUSA_AIO_TEMP_SENSOR_PROBE 0 + #define PRUSA_AIO_PROBING_MARGIN 5 + #define PRUSA_AIO_Z_CLEARANCE_DEPLOY_PROBE 5 + #define PRUSA_AIO_Z_CLEARANCE_BETWEEN_PROBES 3 + #define PRUSA_AIO_Z_CLEARANCE_MULTI_PROBE 3 + + #ifndef PRUSA_AIO_NOZZLE_TO_PROBE_OFFSET + #if ENABLED(PRUSA_AIO_EXTRUDER_BEAR_BLTOUCH) + #define PRUSA_AIO_NOZZLE_TO_PROBE_OFFSET { 26.71, 2.298, 0 } // Offsets pulled from https://www.thingiverse.com/thing:3251530/comments#comment-2915938 + #elif ENABLED(PRUSA_AIO_EXTRUDER_BMG_BLTOUCH) + #define PRUSA_AIO_NOZZLE_TO_PROBE_OFFSET { -24.3, -34.1, 0 } // Offsets pulled from https://www.thingiverse.com/thing:3864666/comments#comment-2882122 + #endif + #endif + +#elif ANY(PRUSA_AIO_EXTRUDER_BEAR_PINDA, PRUSA_AIO_EXTRUDER_BMG_PINDA) + #define FIX_MOUNTED_PROBE + #define PRUSA_AIO_PROBING_MARGIN 10 + #define PRUSA_AIO_Z_CLEARANCE_DEPLOY_PROBE 0 + #define PRUSA_AIO_Z_CLEARANCE_BETWEEN_PROBES 2 + #define PRUSA_AIO_Z_CLEARANCE_MULTI_PROBE 2 + #define PROBING_HEATERS_OFF + #define Z_STEPPER_ALIGN_XY { { 40, 90 }, { 230, 90 } } + + #ifndef PRUSA_AIO_NOZZLE_TO_PROBE_OFFSET + #define PRUSA_AIO_NOZZLE_TO_PROBE_OFFSET { 23, 5, 0 } + #endif + + // Probe Temperature Compensation + #if ENABLED(PRUSA_AIO_PROBE_SUPERPINDA) + #define PRUSA_AIO_TEMP_SENSOR_PROBE 0 + #elif ENABLED(PRUSA_AIO_PROBE_PINDA_V2) + #define PRUSA_AIO_TEMP_SENSOR_PROBE 1 + #define PTC_PROBE // Compensate based on probe temperature + #endif +#endif + +// Use Z endstop pin instead of dedicated probe pin +#if ENABLED(PRUSA_AIO_PROBE_USES_Z_MIN_ENDSTOP_PIN) + #define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN +#endif + +//=========================================================================== +//========================= Thermal & PID Settings ========================== +//=========================================================================== + +#if ENABLED(PRUSA_AIO_THERMISTOR_STOCK_SEMITEC_104NT) + #define PRUSA_AIO_TEMP_SENSOR_0 5 + #define PRUSA_AIO_HEATER_0_MINTEMP 5 + #define PRUSA_AIO_HEATER_0_MAXTEMP 310 // 295 + 15 +#elif ENABLED(PRUSA_AIO_THERMISTOR_GENERIC_100K) + #define PRUSA_AIO_TEMP_SENSOR_0 1 + #define PRUSA_AIO_HEATER_0_MINTEMP 5 + #define PRUSA_AIO_HEATER_0_MAXTEMP 305 // 290 + 15 +#elif ENABLED(PRUSA_AIO_THERMISTOR_SLICE_450C) + #define PRUSA_AIO_TEMP_SENSOR_0 67 + #define PRUSA_AIO_HEATER_0_MINTEMP 5 + #define PRUSA_AIO_HEATER_0_MAXTEMP 465 // 450 + 15 +#elif ENABLED(PRUSA_AIO_THERMISTOR_TL_T_D500) + #define PRUSA_AIO_TEMP_SENSOR_0 66 + #define PRUSA_AIO_HEATER_0_MINTEMP 21 + #define PRUSA_AIO_HEATER_0_MAXTEMP 515 // 500 + 15 + #define MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED 5 + #define PREHEAT_TIME_HOTEND_MS 30000 +#endif + +#if ENABLED(PRUSA_AIO_HOTEND_MPCTEMP) + #define MPCTEMP + + #if DISABLED(PRUSA_AIO_CUSTOM_HOTEND_MPCTEMP) + #define PRUSA_AIO_CUSTOM_MPC_HEATER_POWER { 40.0f } + #define PRUSA_AIO_CUSTOM_MPC_BLOCK_HEAT_CAPACITY { 16.7f } + #define PRUSA_AIO_CUSTOM_MPC_SENSOR_RESPONSIVENESS { 0.22f } + #define PRUSA_AIO_CUSTOM_MPC_AMBIENT_XFER_COEFF { 0.068f } + #define PRUSA_AIO_CUSTOM_MPC_AMBIENT_XFER_COEFF_FAN255 { 0.097f } + #define PRUSA_AIO_CUSTOM_FILAMENT_HEAT_CAPACITY_PERMM { 5.6e-3f } + #endif +#else + #define PIDTEMP + + #if DISABLED(PRUSA_AIO_CUSTOM_HOTEND_PID) + #define PRUSA_AIO_DEFAULT_Kp 16.50 + #define PRUSA_AIO_DEFAULT_Ki 1.16 + #define PRUSA_AIO_DEFAULT_Kd 58.80 + #endif +#endif + +#if DISABLED(PRUSA_AIO_CUSTOM_BED_PID) + #define PRUSA_AIO_DEFAULT_bedKp 28.13 + #define PRUSA_AIO_DEFAULT_bedKi 2.09 + #define PRUSA_AIO_DEFAULT_bedKd 483.07 +#endif + +//=========================================================================== +//================================== Fans =================================== +//=========================================================================== + +// Hotend Cooling Fan +// PIN_EXISTS() macro doesn't work here +#define PRUSA_AIO_E0_AUTO_FAN_PIN TERN(PRUSA_AIO_NO_FAN1_PIN, -1, FAN1_PIN) + +#if ENABLED(PRUSA_AIO_NEEDS_FAN_SOFT_PWM) + #define FAN_SOFT_PWM + #define PRUSA_AIO_SOFT_PWM_SCALE 1 // :[0,1,2,3,4,5,6,7] + #define SOFT_PWM_DITHER +#else + #define PRUSA_AIO_SOFT_PWM_SCALE 0 +#endif + +// Part Cooling Fan +//TODO: Test all fan/board combos +#if ENABLED(PRUSA_AIO_PART_COOLING_FAN_GENERIC) + #define PRUSA_AIO_FAN_MIN_PWM 0 +#elif ANY(PRUSA_AIO_PART_COOLING_FAN_24V_MECHATRONICS_B5015E24B_BSR, PRUSA_AIO_PART_COOLING_FAN_24V_SOUNDORIGINAL, PRUSA_AIO_PART_COOLING_FAN_12V_STOCK_PRUSA_MK25S_5015, PRUSA_AIO_PART_COOLING_FAN_12V_SOUNDORIGINAL) + #if ENABLED(PRUSA_AIO_MOTHERBOARD_BTT_SKR_V2_0_REV_B) + #define PRUSA_AIO_FAN_MIN_PWM 40 + #elif ANY(PRUSA_AIO_MOTHERBOARD_MKS_SGEN_L_V2, PRUSA_AIO_MOTHERBOARD_BTT_SKR_1_4, PRUSA_AIO_MOTHERBOARD_BTT_SKR_1_4_TURBO) + #define PRUSA_AIO_FAN_MIN_PWM 115 + #elif ANY(PRUSA_AIO_MOTHERBOARD_BTT_SKR_MINI_E3_V3_0, PRUSA_AIO_MOTHERBOARD_BTT_SKR_MINI_E3_V3_0_1, PRUSA_AIO_MOTHERBOARD_BTT_SKR_MINI_E3_V2_0, PRUSA_AIO_MOTHERBOARD_MKS_ROBIN_E3, PRUSA_AIO_MOTHERBOARD_MKS_ROBIN_E3_V1_1, PRUSA_AIO_MOTHERBOARD_MKS_ROBIN_E3D, PRUSA_AIO_MOTHERBOARD_MKS_ROBIN_E3D_V1_1) + #define PRUSA_AIO_FAN_MIN_PWM 50 + #else + #define PRUSA_AIO_FAN_MIN_PWM 80 + #endif +#elif ENABLED(PRUSA_AIO_PART_COOLING_FAN_24V_DELTA_BFB0524HH) + #define PRUSA_AIO_FAN_MIN_PWM 20 +#elif ENABLED(PRUSA_AIO_PART_COOLING_FAN_5V_LDO_DF5015H05S) + #define PRUSA_AIO_FAN_MIN_PWM 51 +#elif ENABLED(PRUSA_AIO_PART_COOLING_FAN_5V_STOCK_PRUSA_MK3S_5015) + #define PRUSA_AIO_FAN_MIN_PWM 0 // TODO: Find correct value +#endif + +// Controller/Motherboard Fan +#if ENABLED(PRUSA_AIO_MOTHERBOARD_FAN) && DISABLED(PRUSA_AIO_HAS_CONTROLLER_FAN) + #error "PRUSA_AIO_MOTHERBOARD_FAN is not compatible with enabled motherboard. Connect motherboard cooling fan directly to 24V power supply." +#elif ENABLED(PRUSA_AIO_MOTHERBOARD_FAN) + #define USE_CONTROLLER_FAN + + // Keep Controller fan active for 2130s + #if DISABLED(PRUSA_AIO_DRIVERS_TMC2130) + #define CONTROLLER_FAN_IGNORE_Z + #endif +#endif + +//=========================================================================== +//======================= Bed Leveling / Calibration ======================= +//=========================================================================== + +#if ENABLED(PRUSA_AIO_BED_LEVELING_BILINEAR) + #define AUTO_BED_LEVELING_BILINEAR + #define G29_RETRY_AND_RECOVER +#elif ENABLED(PRUSA_AIO_BED_LEVELING_UBL) + #define AUTO_BED_LEVELING_UBL +#endif + +#if ENABLED(PRUSA_AIO_HAS_FIVE_DRIVERS) + #define Z_STEPPER_AUTO_ALIGN +#else // Single Z driver + #define MECHANICAL_GANTRY_CALIBRATION +#endif + +//=========================================================================== +//============================== Custom Menus =============================== +//=========================================================================== + +// Sheet Profiles Menu +#if ENABLED(PRUSA_AIO_SHEET_PROFILES_MENU) + #define CUSTOM_MENU_CONFIG + + #if defined(PRUSA_AIO_SHEET_1_DESC) && defined(PRUSA_AIO_SHEET_1_OFFSET) + #define CONFIG_MENU_ITEM_1_DESC PRUSA_AIO_SHEET_1_DESC ": " STRINGIFY(PRUSA_AIO_SHEET_1_OFFSET) + #define CONFIG_MENU_ITEM_1_GCODE "M851 Z" STRINGIFY(PRUSA_AIO_SHEET_1_OFFSET) + #define CONFIG_MENU_ITEM_1_CONFIRM + #endif + + #if defined(PRUSA_AIO_SHEET_2_DESC) && defined(PRUSA_AIO_SHEET_2_OFFSET) + #define CONFIG_MENU_ITEM_2_DESC PRUSA_AIO_SHEET_2_DESC ": " STRINGIFY(PRUSA_AIO_SHEET_2_OFFSET) + #define CONFIG_MENU_ITEM_2_GCODE "M851 Z" STRINGIFY(PRUSA_AIO_SHEET_2_OFFSET) + #define CONFIG_MENU_ITEM_2_CONFIRM + #endif + + #if defined(PRUSA_AIO_SHEET_3_DESC) && defined(PRUSA_AIO_SHEET_3_OFFSET) + #define CONFIG_MENU_ITEM_3_DESC PRUSA_AIO_SHEET_3_DESC ": " STRINGIFY(PRUSA_AIO_SHEET_3_OFFSET) + #define CONFIG_MENU_ITEM_3_GCODE "M851 Z" STRINGIFY(PRUSA_AIO_SHEET_3_OFFSET) + #define CONFIG_MENU_ITEM_3_CONFIRM + #endif + + #if defined(PRUSA_AIO_SHEET_4_DESC) && defined(PRUSA_AIO_SHEET_4_OFFSET) + #define CONFIG_MENU_ITEM_4_DESC PRUSA_AIO_SHEET_4_DESC ": " STRINGIFY(PRUSA_AIO_SHEET_4_OFFSET) + #define CONFIG_MENU_ITEM_4_GCODE "M851 Z" STRINGIFY(PRUSA_AIO_SHEET_4_OFFSET) + #define CONFIG_MENU_ITEM_4_CONFIRM + #endif + + #if defined(PRUSA_AIO_SHEET_5_DESC) && defined(PRUSA_AIO_SHEET_5_OFFSET) + #define CONFIG_MENU_ITEM_5_DESC PRUSA_AIO_SHEET_5_DESC ": " STRINGIFY(PRUSA_AIO_SHEET_5_OFFSET) + #define CONFIG_MENU_ITEM_5_GCODE "M851 Z" STRINGIFY(PRUSA_AIO_SHEET_5_OFFSET) + #define CONFIG_MENU_ITEM_5_CONFIRM + #endif + + #if defined(PRUSA_AIO_SHEET_6_DESC) && defined(PRUSA_AIO_SHEET_6_OFFSET) + #define CONFIG_MENU_ITEM_6_DESC PRUSA_AIO_SHEET_6_DESC ": " STRINGIFY(PRUSA_AIO_SHEET_6_OFFSET) + #define CONFIG_MENU_ITEM_6_GCODE "M851 Z" STRINGIFY(PRUSA_AIO_SHEET_6_OFFSET) + #define CONFIG_MENU_ITEM_6_CONFIRM + #endif + + #if defined(PRUSA_AIO_SHEET_7_DESC) && defined(PRUSA_AIO_SHEET_7_OFFSET) + #define CONFIG_MENU_ITEM_7_DESC PRUSA_AIO_SHEET_7_DESC ": " STRINGIFY(PRUSA_AIO_SHEET_7_OFFSET) + #define CONFIG_MENU_ITEM_7_GCODE "M851 Z" STRINGIFY(PRUSA_AIO_SHEET_7_OFFSET) + #define CONFIG_MENU_ITEM_7_CONFIRM + #endif + + #if defined(PRUSA_AIO_SHEET_8_DESC) && defined(PRUSA_AIO_SHEET_8_OFFSET) + #define CONFIG_MENU_ITEM_8_DESC PRUSA_AIO_SHEET_8_DESC ": " STRINGIFY(PRUSA_AIO_SHEET_8_OFFSET) + #define CONFIG_MENU_ITEM_8_GCODE "M851 Z" STRINGIFY(PRUSA_AIO_SHEET_8_OFFSET) + #define CONFIG_MENU_ITEM_8_CONFIRM + #endif + + #if defined(PRUSA_AIO_SHEET_9_DESC) && defined(PRUSA_AIO_SHEET_9_OFFSET) + #define CONFIG_MENU_ITEM_9_DESC PRUSA_AIO_SHEET_9_DESC ": " STRINGIFY(PRUSA_AIO_SHEET_9_OFFSET) + #define CONFIG_MENU_ITEM_9_GCODE "M851 Z" STRINGIFY(PRUSA_AIO_SHEET_9_OFFSET) + #define CONFIG_MENU_ITEM_9_CONFIRM + #endif + + #if defined(PRUSA_AIO_SHEET_10_DESC) && defined(PRUSA_AIO_SHEET_10_OFFSET) + #define CONFIG_MENU_ITEM_10_DESC PRUSA_AIO_SHEET_10_DESC ": " STRINGIFY(PRUSA_AIO_SHEET_10_OFFSET) + #define CONFIG_MENU_ITEM_10_GCODE "M851 Z" STRINGIFY(PRUSA_AIO_SHEET_10_OFFSET) + #define CONFIG_MENU_ITEM_10_CONFIRM + #endif +#endif + +// Calibration Menu +#if ENABLED(PRUSA_AIO_CALIBRATION_MENU) + #define CUSTOM_MENU_MAIN +#endif + +//=========================================================================== +//========================= LCD / TFT / Controller ========================== +//=========================================================================== + +#if ANY(PRUSA_AIO_DISPLAY_BTT_MINI_12864_NEOPIXEL, PRUSA_AIO_DISPLAY_FYSETC_MINI_12864_NEOPIXEL, PRUSA_AIO_DISPLAY_MKS_MINI_12864_NEOPIXEL) + #define PRUSA_AIO_HAS_MINI_12864_NEOPIXEL 1 + #define PRUSA_AIO_LCD_NEOPIXEL EXP1_06_PIN + #define PRUSA_AIO_LCD_NEOPIXEL_COUNT 3 +#elif ANY(PRUSA_AIO_DISPLAY_BTT_TFT35_SPI_V1, PRUSA_AIO_DISPLAY_MKS_TS35_V2_0) + #define PRUSA_AIO_HAS_SPI_TFT 1 +#endif + +#if ANY(PRUSA_AIO_DISPLAY_STOCK_REPRAP_DISCOUNT_SMART_CONTROLLER, PRUSA_AIO_DISPLAY_OLED_REPRAP_DISCOUNT_SMART_CONTROLLER) + #define REPRAP_DISCOUNT_SMART_CONTROLLER +#elif ANY(PRUSA_AIO_DISPLAY_BTT_DUAL_MODE_TFT, PRUSA_AIO_HAS_MINI_12864_NEOPIXEL, PRUSA_AIO_HAS_SPI_TFT) + #if ENABLED(PRUSA_AIO_DISPLAY_BTT_DUAL_MODE_TFT) + + // Extra defines for BTT TFT firmware + #define AUTO_REPORT_POSITION + #define AUTO_REPORT_SD_STATUS + #define SERIAL_FLOAT_PRECISION 4 + + #if ANY(PRUSA_AIO_MOTHERBOARD_BTT_SKR_MINI_E3_V3_0, PRUSA_AIO_MOTHERBOARD_BTT_SKR_MINI_E3_V3_0_1, PRUSA_AIO_MOTHERBOARD_BTT_SKR_MINI_E3_V2_0) + #define CR10_STOCKDISPLAY + #define PRUSA_AIO_SINGLE_EXP_CONNECTION 1 + #else + #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER + #endif + #elif ENABLED(PRUSA_AIO_DISPLAY_BTT_MINI_12864_NEOPIXEL) + #define BTT_MINI_12864 + #elif ENABLED(PRUSA_AIO_DISPLAY_FYSETC_MINI_12864_NEOPIXEL) + #define PRUSA_AIO_REVERSE_ENCODER_DIRECTION_DEFAULT + #define FYSETC_MINI_12864_2_1 + #elif ENABLED(PRUSA_AIO_DISPLAY_MKS_MINI_12864_NEOPIXEL) + #define MKS_MINI_12864_V3 + #elif ENABLED(PRUSA_AIO_HAS_SPI_TFT) + #define TFT_COLOR_UI + #define TOUCH_SCREEN + + #define ENCODER_PULSES_PER_STEP 6 + + #undef PRUSA_AIO_SDCARD_CONNECTION + #define PRUSA_AIO_SDCARD_CONNECTION ONBOARD // No SD card reader on TFT + + #if ENABLED(PRUSA_AIO_DISPLAY_BTT_TFT35_SPI_V1) + #define BTT_TFT35_SPI_V1_0 + #define TFT_DRIVER ST7796 + #elif ENABLED(PRUSA_AIO_DISPLAY_MKS_TS35_V2_0) + #define MKS_TS35_V2_0 + #endif + #endif + + #if ENABLED(PRUSA_AIO_BED_LEVELING_UBL) && NONE(TFT_COLOR_UI, TFT_LVGL_UI) + #define MESH_EDIT_GFX_OVERLAY + #endif + + #if NONE(TFT_COLOR_UI, TFT_LVGL_UI) + #define BABYSTEP_GFX_OVERLAY + #endif +#endif + +// Final encoder direction +#if (ENABLED(PRUSA_AIO_REVERSE_ENCODER_DIRECTION_DEFAULT) && DISABLED(PRUSA_AIO_REVERSE_ENCODER_DIRECTION)) || (ENABLED(PRUSA_AIO_REVERSE_ENCODER_DIRECTION) && DISABLED(PRUSA_AIO_REVERSE_ENCODER_DIRECTION_DEFAULT)) + #define REVERSE_ENCODER_DIRECTION +#endif + +// Suppress potential LCD contrast warning +#define NO_LCD_CONTRAST_WARNING + +//=========================================================================== +//================================ NeoPixels ================================ +//=========================================================================== + +#if ANY(PRUSA_AIO_NEOPIXEL_STRIP, PRUSA_AIO_HAS_MINI_12864_NEOPIXEL) + #define NEOPIXEL_LED // Enable NeoPixel support + #define LED_CONTROL_MENU + #define LED_COLOR_PRESETS + #define NEOPIXEL_STARTUP_TEST +#endif + +#if ENABLED(PRUSA_AIO_NEOPIXEL_STRIP) // Both NeoPixel Strip & Mini 12864 w/ NeoPixels / Dual NeoPixel workaround + #define NEOPIXEL_PIN PRUSA_AIO_BOARD_NEOPIXEL_PIN + + #define NEOPIXEL_TYPE PRUSA_AIO_NEOPIXEL_STRIP_TYPE + #define NEOPIXEL_PIXELS PRUSA_AIO_NEOPIXEL_STRIP_LED_COUNT + #define NEOPIXEL_BRIGHTNESS PRUSA_AIO_NEOPIXEL_STRIP_BRIGHTNESS + + #if ENABLED(PRUSA_AIO_NEOPIXEL_STRIP_COLOR_RED) + #define PRUSA_AIO_LED_USER_PRESET_RED 255 + #define PRUSA_AIO_LED_USER_PRESET_GREEN 0 + #define PRUSA_AIO_LED_USER_PRESET_BLUE 0 + #define PRUSA_AIO_LED_USER_PRESET_WHITE 255 + #elif ENABLED(PRUSA_AIO_NEOPIXEL_STRIP_COLOR_ORANGE) + #define PRUSA_AIO_LED_USER_PRESET_RED 255 + #define PRUSA_AIO_LED_USER_PRESET_GREEN 25 + #define PRUSA_AIO_LED_USER_PRESET_BLUE 0 + #define PRUSA_AIO_LED_USER_PRESET_WHITE 255 + #elif ENABLED(PRUSA_AIO_NEOPIXEL_STRIP_COLOR_YELLOW) + #define PRUSA_AIO_LED_USER_PRESET_RED 255 + #define PRUSA_AIO_LED_USER_PRESET_GREEN 75 + #define PRUSA_AIO_LED_USER_PRESET_BLUE 0 + #define PRUSA_AIO_LED_USER_PRESET_WHITE 255 + #elif ENABLED(PRUSA_AIO_NEOPIXEL_STRIP_COLOR_GREEN) + #define PRUSA_AIO_LED_USER_PRESET_RED 0 + #define PRUSA_AIO_LED_USER_PRESET_GREEN 255 + #define PRUSA_AIO_LED_USER_PRESET_BLUE 0 + #define PRUSA_AIO_LED_USER_PRESET_WHITE 255 + #elif ENABLED(PRUSA_AIO_NEOPIXEL_STRIP_COLOR_BLUE) + #define PRUSA_AIO_LED_USER_PRESET_RED 0 + #define PRUSA_AIO_LED_USER_PRESET_GREEN 0 + #define PRUSA_AIO_LED_USER_PRESET_BLUE 255 + #define PRUSA_AIO_LED_USER_PRESET_WHITE 255 + #elif ENABLED(PRUSA_AIO_NEOPIXEL_STRIP_COLOR_INDIGO) + #define PRUSA_AIO_LED_USER_PRESET_RED 0 + #define PRUSA_AIO_LED_USER_PRESET_GREEN 255 + #define PRUSA_AIO_LED_USER_PRESET_BLUE 255 + #define PRUSA_AIO_LED_USER_PRESET_WHITE 255 + #elif ENABLED(PRUSA_AIO_NEOPIXEL_STRIP_COLOR_VIOLET) + #define PRUSA_AIO_LED_USER_PRESET_RED 255 + #define PRUSA_AIO_LED_USER_PRESET_GREEN 0 + #define PRUSA_AIO_LED_USER_PRESET_BLUE 255 + #define PRUSA_AIO_LED_USER_PRESET_WHITE 255 + #elif ENABLED(PRUSA_AIO_NEOPIXEL_STRIP_COLOR_WHITE) + #define PRUSA_AIO_LED_USER_PRESET_RED 255 + #define PRUSA_AIO_LED_USER_PRESET_GREEN 255 + #define PRUSA_AIO_LED_USER_PRESET_BLUE 255 + #define PRUSA_AIO_LED_USER_PRESET_WHITE 255 + #endif + + #if ENABLED(PRUSA_AIO_HAS_MINI_12864_NEOPIXEL) + #define NEOPIXEL2_SEPARATE + #define NEO2_COLOR_PRESETS + + // Incorrect RGB color workaround on SKR V3 + #define NEOPIXEL2_TYPE TERN(PRUSA_AIO_NEEDS_ALT_DISPLAY_MINI_12864_NEOPIXEL_ORDER, NEO_BRG, NEO_RGB) + #define NEOPIXEL2_PIN PRUSA_AIO_LCD_NEOPIXEL + + #define NEOPIXEL2_PIXELS PRUSA_AIO_LCD_NEOPIXEL_COUNT + #define NEOPIXEL2_BRIGHTNESS 255 + + #if ENABLED(PRUSA_AIO_LCD_NEOPIXEL_COLOR_RED) + #define PRUSA_AIO_NEO2_USER_PRESET_RED 255 + #define PRUSA_AIO_NEO2_USER_PRESET_GREEN 0 + #define PRUSA_AIO_NEO2_USER_PRESET_BLUE 0 + #define PRUSA_AIO_NEO2_USER_PRESET_WHITE 255 + #elif ENABLED(PRUSA_AIO_LCD_NEOPIXEL_COLOR_ORANGE) + #define PRUSA_AIO_NEO2_USER_PRESET_RED 255 + #define PRUSA_AIO_NEO2_USER_PRESET_GREEN 25 + #define PRUSA_AIO_NEO2_USER_PRESET_BLUE 0 + #define PRUSA_AIO_NEO2_USER_PRESET_WHITE 255 + #elif ENABLED(PRUSA_AIO_LCD_NEOPIXEL_COLOR_YELLOW) + #define PRUSA_AIO_NEO2_USER_PRESET_RED 255 + #define PRUSA_AIO_NEO2_USER_PRESET_GREEN 75 + #define PRUSA_AIO_NEO2_USER_PRESET_BLUE 0 + #define PRUSA_AIO_NEO2_USER_PRESET_WHITE 255 + #elif ENABLED(PRUSA_AIO_LCD_NEOPIXEL_COLOR_GREEN) + #define PRUSA_AIO_NEO2_USER_PRESET_RED 0 + #define PRUSA_AIO_NEO2_USER_PRESET_GREEN 255 + #define PRUSA_AIO_NEO2_USER_PRESET_BLUE 0 + #define PRUSA_AIO_NEO2_USER_PRESET_WHITE 255 + #elif ENABLED(PRUSA_AIO_LCD_NEOPIXEL_COLOR_BLUE) + #define PRUSA_AIO_NEO2_USER_PRESET_RED 0 + #define PRUSA_AIO_NEO2_USER_PRESET_GREEN 0 + #define PRUSA_AIO_NEO2_USER_PRESET_BLUE 255 + #define PRUSA_AIO_NEO2_USER_PRESET_WHITE 255 + #elif ENABLED(PRUSA_AIO_LCD_NEOPIXEL_COLOR_INDIGO) + #define PRUSA_AIO_NEO2_USER_PRESET_RED 0 + #define PRUSA_AIO_NEO2_USER_PRESET_GREEN 255 + #define PRUSA_AIO_NEO2_USER_PRESET_BLUE 255 + #define PRUSA_AIO_NEO2_USER_PRESET_WHITE 255 + #elif ENABLED(PRUSA_AIO_LCD_NEOPIXEL_COLOR_VIOLET) + #define PRUSA_AIO_NEO2_USER_PRESET_RED 255 + #define PRUSA_AIO_NEO2_USER_PRESET_GREEN 0 + #define PRUSA_AIO_NEO2_USER_PRESET_BLUE 255 + #define PRUSA_AIO_NEO2_USER_PRESET_WHITE 255 + #elif ENABLED(PRUSA_AIO_LCD_NEOPIXEL_COLOR_WHITE) + #define PRUSA_AIO_NEO2_USER_PRESET_RED 255 + #define PRUSA_AIO_NEO2_USER_PRESET_GREEN 255 + #define PRUSA_AIO_NEO2_USER_PRESET_BLUE 255 + #define PRUSA_AIO_NEO2_USER_PRESET_WHITE 255 + #endif + #endif +#elif ENABLED(PRUSA_AIO_HAS_MINI_12864_NEOPIXEL) // Only Mini 12864 w/ NeoPixels + // Incorrect RGB color workaround on SKR V3 + #define NEOPIXEL_TYPE TERN(PRUSA_AIO_NEEDS_ALT_DISPLAY_MINI_12864_NEOPIXEL_ORDER, NEO_BRG, NEO_RGB) + + #define NEOPIXEL_PIXELS PRUSA_AIO_LCD_NEOPIXEL_COUNT + #define NEOPIXEL_BRIGHTNESS 255 + + #define LED_USER_PRESET_STARTUP + #define NEOPIXEL_PIN PRUSA_AIO_LCD_NEOPIXEL + + #if ENABLED(PRUSA_AIO_LCD_NEOPIXEL_COLOR_RED) + #define PRUSA_AIO_LED_USER_PRESET_RED 255 + #define PRUSA_AIO_LED_USER_PRESET_GREEN 0 + #define PRUSA_AIO_LED_USER_PRESET_BLUE 0 + #define PRUSA_AIO_LED_USER_PRESET_WHITE 255 + #elif ENABLED(PRUSA_AIO_LCD_NEOPIXEL_COLOR_ORANGE) + #define PRUSA_AIO_LED_USER_PRESET_RED 255 + #define PRUSA_AIO_LED_USER_PRESET_GREEN 25 + #define PRUSA_AIO_LED_USER_PRESET_BLUE 0 + #define PRUSA_AIO_LED_USER_PRESET_WHITE 255 + #elif ENABLED(PRUSA_AIO_LCD_NEOPIXEL_COLOR_YELLOW) + #define PRUSA_AIO_LED_USER_PRESET_RED 255 + #define PRUSA_AIO_LED_USER_PRESET_GREEN 75 + #define PRUSA_AIO_LED_USER_PRESET_BLUE 0 + #define PRUSA_AIO_LED_USER_PRESET_WHITE 255 + #elif ENABLED(PRUSA_AIO_LCD_NEOPIXEL_COLOR_GREEN) + #define PRUSA_AIO_LED_USER_PRESET_RED 0 + #define PRUSA_AIO_LED_USER_PRESET_GREEN 255 + #define PRUSA_AIO_LED_USER_PRESET_BLUE 0 + #define PRUSA_AIO_LED_USER_PRESET_WHITE 255 + #elif ENABLED(PRUSA_AIO_LCD_NEOPIXEL_COLOR_BLUE) + #define PRUSA_AIO_LED_USER_PRESET_RED 0 + #define PRUSA_AIO_LED_USER_PRESET_GREEN 0 + #define PRUSA_AIO_LED_USER_PRESET_BLUE 255 + #define PRUSA_AIO_LED_USER_PRESET_WHITE 255 + #elif ENABLED(PRUSA_AIO_LCD_NEOPIXEL_COLOR_INDIGO) + #define PRUSA_AIO_LED_USER_PRESET_RED 0 + #define PRUSA_AIO_LED_USER_PRESET_GREEN 255 + #define PRUSA_AIO_LED_USER_PRESET_BLUE 255 + #define PRUSA_AIO_LED_USER_PRESET_WHITE 255 + #elif ENABLED(PRUSA_AIO_LCD_NEOPIXEL_COLOR_VIOLET) + #define PRUSA_AIO_LED_USER_PRESET_RED 255 + #define PRUSA_AIO_LED_USER_PRESET_GREEN 0 + #define PRUSA_AIO_LED_USER_PRESET_BLUE 255 + #define PRUSA_AIO_LED_USER_PRESET_WHITE 255 + #elif ENABLED(PRUSA_AIO_LCD_NEOPIXEL_COLOR_WHITE) + #define PRUSA_AIO_LED_USER_PRESET_RED 255 + #define PRUSA_AIO_LED_USER_PRESET_GREEN 255 + #define PRUSA_AIO_LED_USER_PRESET_BLUE 255 + #define PRUSA_AIO_LED_USER_PRESET_WHITE 255 + #endif +#endif + +//=========================================================================== +//============================= Input Shaping ============================== +//=========================================================================== + +#if ENABLED(PRUSA_AIO_INPUT_SHAPING) + #define INPUT_SHAPING_X + #define INPUT_SHAPING_Y + #ifdef PRUSA_AIO_SHAPING_MIN_FREQ + #define SHAPING_MIN_FREQ PRUSA_AIO_SHAPING_MIN_FREQ + #endif + #ifdef PRUSA_AIO_SHAPING_MAX_STEPRATE + #define SHAPING_MAX_STEPRATE PRUSA_AIO_SHAPING_MAX_STEPRATE + #endif +#else + #define S_CURVE_ACCELERATION // Not needed/recommended with Input Shaping +#endif diff --git a/Marlin/src/inc/Prusa_AIO_SanityCheck.h b/Marlin/src/inc/Prusa_AIO_SanityCheck.h new file mode 100644 index 0000000000..50cb3df127 --- /dev/null +++ b/Marlin/src/inc/Prusa_AIO_SanityCheck.h @@ -0,0 +1,314 @@ +#pragma once +//=========================================================================== +//========================== DO NOT EDIT THIS FILE ========================== +//=========================================================================== + +/** + * Prusa_AIO_SanityCheck.h + * Validate Prusa_AIO_Configuration.h options at compile-time. + */ +#define CONFIGURATION_H_VERSION 02010300 +#define PRUSA_AIO_VERSION 20240423 + +//=========================================================================== +//=============================== Motherboard =============================== +//=========================================================================== + +#if MANY(PRUSA_AIO_MOTHERBOARD_BTT_SKR_V3_0, PRUSA_AIO_MOTHERBOARD_BTT_SKR_V3_0_EZ, PRUSA_AIO_MOTHERBOARD_BTT_SKR_V2_0_REV_B, PRUSA_AIO_MOTHERBOARD_BTT_SKR_1_4, PRUSA_AIO_MOTHERBOARD_BTT_SKR_1_4_TURBO, PRUSA_AIO_MOTHERBOARD_BTT_BTT002, PRUSA_AIO_MOTHERBOARD_BTT_SKR_MINI_E3_V3_0, PRUSA_AIO_MOTHERBOARD_BTT_SKR_MINI_E3_V3_0_1, PRUSA_AIO_MOTHERBOARD_BTT_SKR_MINI_E3_V2_0, PRUSA_AIO_MOTHERBOARD_MKS_ROBIN_NANO_V3, PRUSA_AIO_MOTHERBOARD_MKS_ROBIN_NANO_V3_1, PRUSA_AIO_MOTHERBOARD_MKS_EAGLE_V1_0, PRUSA_AIO_MOTHERBOARD_MKS_SGEN_L_V2, PRUSA_AIO_MOTHERBOARD_MKS_ROBIN_E3, PRUSA_AIO_MOTHERBOARD_MKS_ROBIN_E3_V1_1, PRUSA_AIO_MOTHERBOARD_MKS_ROBIN_E3D, PRUSA_AIO_MOTHERBOARD_MKS_ROBIN_E3D_V1_1) + #error "Only one PRUSA_AIO_MOTHERBOARD option can be enabled at a time." +#elif NONE(PRUSA_AIO_MOTHERBOARD_BTT_SKR_V3_0, PRUSA_AIO_MOTHERBOARD_BTT_SKR_V3_0_EZ, PRUSA_AIO_MOTHERBOARD_BTT_SKR_V2_0_REV_B, PRUSA_AIO_MOTHERBOARD_BTT_SKR_1_4, PRUSA_AIO_MOTHERBOARD_BTT_SKR_1_4_TURBO, PRUSA_AIO_MOTHERBOARD_BTT_BTT002, PRUSA_AIO_MOTHERBOARD_BTT_SKR_MINI_E3_V3_0, PRUSA_AIO_MOTHERBOARD_BTT_SKR_MINI_E3_V3_0_1, PRUSA_AIO_MOTHERBOARD_BTT_SKR_MINI_E3_V2_0, PRUSA_AIO_MOTHERBOARD_MKS_ROBIN_NANO_V3, PRUSA_AIO_MOTHERBOARD_MKS_ROBIN_NANO_V3_1, PRUSA_AIO_MOTHERBOARD_MKS_EAGLE_V1_0, PRUSA_AIO_MOTHERBOARD_MKS_SGEN_L_V2, PRUSA_AIO_MOTHERBOARD_MKS_ROBIN_E3, PRUSA_AIO_MOTHERBOARD_MKS_ROBIN_E3_V1_1, PRUSA_AIO_MOTHERBOARD_MKS_ROBIN_E3D, PRUSA_AIO_MOTHERBOARD_MKS_ROBIN_E3D_V1_1) + #error "Invalid PRUSA_AIO_MOTHERBOARD option." +#endif + +// BTT002 Sanity Checks +#if ENABLED(PRUSA_AIO_MOTHERBOARD_BTT_BTT002) + #if ANY(PRUSA_AIO_EXTRUDER_BEAR_BLTOUCH, PRUSA_AIO_EXTRUDER_BMG_BLTOUCH) // No Servo Pins on BTT002 + #error "BLTouch is not supported on BigTreeTech BTT002 1.0." + #endif + + #if ENABLED(PRUSA_AIO_DISPLAY_BTT_DUAL_MODE_TFT) + #error "BigTreeTech Dual Mode TFTs emulate the SD card reader and cannot be used for motherboard firmware updates. Since the BigTreeTech BTT002 1.0 has no onboard SD card reader, a different display type is required." + #endif + + // BTT002 is slow and/or locks up with Mini 12864 with NeoPixel RGB + #if ENABLED(PRUSA_AIO_DISPLAY_BTT_MINI_12864_NEOPIXEL) + #error "PRUSA_AIO_DISPLAY_BTT_MINI_12864_NEOPIXEL is not supported on BigTreeTech BTT002 1.0." + #elif ENABLED(PRUSA_AIO_DISPLAY_FYSETC_MINI_12864_NEOPIXEL) + #error "PRUSA_AIO_DISPLAY_FYSETC_MINI_12864_NEOPIXEL is not supported on BigTreeTech BTT002 1.0." + #elif ENABLED(PRUSA_AIO_DISPLAY_MKS_MINI_12864_NEOPIXEL) + #error "PRUSA_AIO_DISPLAY_MKS_MINI_12864_NEOPIXEL is not supported on BigTreeTech BTT002 1.0." + #endif +#endif // BTT002 Sanity Checks + +// PINDA V2 Sanity Checks +#if ANY(PRUSA_AIO_MOTHERBOARD_BTT_SKR_MINI_E3_V3_0, PRUSA_AIO_MOTHERBOARD_BTT_SKR_MINI_E3_V3_0_1, PRUSA_AIO_MOTHERBOARD_BTT_SKR_MINI_E3_V2_0, PRUSA_AIO_MOTHERBOARD_MKS_ROBIN_E3, PRUSA_AIO_MOTHERBOARD_MKS_ROBIN_E3_V1_1, PRUSA_AIO_MOTHERBOARD_MKS_ROBIN_E3D, PRUSA_AIO_MOTHERBOARD_MKS_ROBIN_E3D_V1_1) && ENABLED(PRUSA_AIO_PROBE_PINDA_V2) + #error "PINDA V2 is not supported on enabled motherboard. A SuperPINDA or BLTouch is required." +#endif + +// Flash Drive Support (BigTreeTech SKR 2 & MKS Robin Nano V3 only) +#if ENABLED(PRUSA_AIO_FLASH_DRIVE_SUPPORT) + #if NONE(PRUSA_AIO_MOTHERBOARD_BTT_SKR_V2_0_REV_B, PRUSA_AIO_MOTHERBOARD_MKS_ROBIN_NANO_V3, PRUSA_AIO_MOTHERBOARD_MKS_ROBIN_NANO_V3_1, PRUSA_AIO_MOTHERBOARD_MKS_EAGLE_V1_0) + #error "PRUSA_AIO_FLASH_DRIVE_SUPPORT is not compatible with enabled motherboard." + #elif ALL(PRUSA_AIO_MOTHERBOARD_BTT_SKR_V2_0_REV_B, PRUSA_AIO_WIFI_SUPPORT) + #error "Both PRUSA_AIO_FLASH_DRIVE_SUPPORT and PRUSA_AIO_WIFI_SUPPORT cannot be enabled at the same time for PRUSA_AIO_MOTHERBOARD_BTT_SKR_V2_0_REV_B." + #endif +#endif + +// WiFi Support +#if ENABLED(PRUSA_AIO_WIFI_SUPPORT) && NONE(PRUSA_AIO_MOTHERBOARD_BTT_SKR_V3_0, PRUSA_AIO_MOTHERBOARD_BTT_SKR_V3_0_EZ, PRUSA_AIO_MOTHERBOARD_BTT_SKR_V2_0_REV_B, PRUSA_AIO_MOTHERBOARD_BTT_SKR_1_4, PRUSA_AIO_MOTHERBOARD_BTT_SKR_1_4_TURBO, PRUSA_AIO_MOTHERBOARD_BTT_BTT002, PRUSA_AIO_MOTHERBOARD_MKS_ROBIN_NANO_V3, PRUSA_AIO_MOTHERBOARD_MKS_ROBIN_NANO_V3_1, PRUSA_AIO_MOTHERBOARD_MKS_EAGLE_V1_0, PRUSA_AIO_MOTHERBOARD_MKS_SGEN_L_V2) + #error "Enabled motherboard does not have WiFi support." +#endif + +//=========================================================================== +//============================= Stepper Drivers ============================= +//=========================================================================== + +#if MANY(PRUSA_AIO_DRIVERS_TMC2209, PRUSA_AIO_DRIVERS_TMC2226_015_RSENSE, PRUSA_AIO_DRIVERS_TMC2226_011_RSENSE, PRUSA_AIO_DRIVERS_TMC5160, PRUSA_AIO_DRIVERS_TMC2130) + #error "Only one PRUSA_AIO_DRIVERS option can be enabled at a time." +#elif NONE(PRUSA_AIO_DRIVERS_TMC2209, PRUSA_AIO_DRIVERS_TMC2226_015_RSENSE, PRUSA_AIO_DRIVERS_TMC2226_011_RSENSE, PRUSA_AIO_DRIVERS_TMC5160, PRUSA_AIO_DRIVERS_TMC2130) + #error "Invalid PRUSA_AIO_DRIVERS option." +#endif + +// Integrated TMC2209s Sanity Checks +#if DISABLED(PRUSA_AIO_DRIVERS_TMC2209) && ANY(PRUSA_AIO_MOTHERBOARD_BTT_SKR_MINI_E3_V3_0, PRUSA_AIO_MOTHERBOARD_BTT_SKR_MINI_E3_V3_0_1, PRUSA_AIO_MOTHERBOARD_BTT_SKR_MINI_E3_V2_0, PRUSA_AIO_MOTHERBOARD_MKS_ROBIN_E3, PRUSA_AIO_MOTHERBOARD_MKS_ROBIN_E3_V1_1, PRUSA_AIO_MOTHERBOARD_MKS_EAGLE_V1_0) + #error "Invalid PRUSA_AIO_DRIVERS option. Enabled motherboard has integrated TMC2209s." +#endif + +//=========================================================================== +//============================= Stepper Motors ============================== +//=========================================================================== + +#if MANY(PRUSA_AIO_E_STEPPER_STOCK, PRUSA_AIO_E_STEPPER_BONDTECH, PRUSA_AIO_E_STEPPER_LDO_0_9, PRUSA_AIO_E_STEPPER_LDO_PLANETARY) + #error "Only one PRUSA_AIO_E_STEPPER option can be enabled at a time." +#elif NONE(PRUSA_AIO_E_STEPPER_STOCK, PRUSA_AIO_E_STEPPER_BONDTECH, PRUSA_AIO_E_STEPPER_LDO_0_9, PRUSA_AIO_E_STEPPER_LDO_PLANETARY) + #error "Invalid PRUSA_AIO_E_STEPPER option." +#endif + +#if ANY(PRUSA_AIO_E_STEPPER_BONDTECH, PRUSA_AIO_E_STEPPER_LDO_0_9) && ANY(PRUSA_AIO_EXTRUDER_BEAR_PINDA, PRUSA_AIO_EXTRUDER_BEAR_BLTOUCH) + // Not powerful enough to drive 1:1 extruders + #error "Pancake stepper on a Bear extruder is not supported." +#elif ENABLED(PRUSA_AIO_E_STEPPER_LDO_PLANETARY) && ANY(PRUSA_AIO_EXTRUDER_BMG_PINDA, PRUSA_AIO_EXTRUDER_BMG_BLTOUCH) + // This would be a crazy amount of pulses/second + #error "Planetary stepper on a BMG extruder is not supported." +#endif + +#if MANY(PRUSA_AIO_XY_STEPPERS_STOCK, PRUSA_AIO_XY_STEPPERS_LDO_0_9, PRUSA_AIO_XY_STEPPERS_MOONS_0_9) + #error "Only one PRUSA_AIO_XY_STEPPERS option can be enabled at a time." +#elif NONE(PRUSA_AIO_XY_STEPPERS_STOCK, PRUSA_AIO_XY_STEPPERS_LDO_0_9, PRUSA_AIO_XY_STEPPERS_MOONS_0_9) + #error "Invalid PRUSA_AIO_XY_STEPPERS option." +#endif + +//=========================================================================== +//================================= Hotend ================================== +//=========================================================================== + +#if MANY(PRUSA_AIO_EXTRUDER_BEAR_PINDA, PRUSA_AIO_EXTRUDER_BEAR_BLTOUCH, PRUSA_AIO_EXTRUDER_BMG_PINDA, PRUSA_AIO_EXTRUDER_BMG_BLTOUCH) + #error "Only one PRUSA_AIO_EXTRUDER option can be enabled at a time." +#elif NONE(PRUSA_AIO_EXTRUDER_BEAR_PINDA, PRUSA_AIO_EXTRUDER_BEAR_BLTOUCH, PRUSA_AIO_EXTRUDER_BMG_PINDA, PRUSA_AIO_EXTRUDER_BMG_BLTOUCH) + #error "Invalid PRUSA_AIO_EXTRUDER option." +#endif + +#if ANY(PRUSA_AIO_EXTRUDER_BEAR_PINDA, PRUSA_AIO_EXTRUDER_BMG_PINDA) + #if ALL(PRUSA_AIO_PROBE_SUPERPINDA, PRUSA_AIO_PROBE_PINDA_V2) + #error "Only one PRUSA_AIO_PROBE option can be enabled at a time." + #elif NONE(PRUSA_AIO_PROBE_SUPERPINDA, PRUSA_AIO_PROBE_PINDA_V2) + #error "Invalid PRUSA_AIO_PROBE option." + #endif +#endif + +//=========================================================================== +//========================= Thermal & PID Settings ========================== +//=========================================================================== + +#if MANY(PRUSA_AIO_THERMISTOR_STOCK_SEMITEC_104NT, PRUSA_AIO_THERMISTOR_GENERIC_100K, PRUSA_AIO_THERMISTOR_SLICE_450C, PRUSA_AIO_THERMISTOR_TL_T_D500) + #error "Only one PRUSA_AIO_THERMISTOR option can be enabled at a time." +#elif NONE(PRUSA_AIO_THERMISTOR_STOCK_SEMITEC_104NT, PRUSA_AIO_THERMISTOR_GENERIC_100K, PRUSA_AIO_THERMISTOR_SLICE_450C, PRUSA_AIO_THERMISTOR_TL_T_D500) + #error "Invalid PRUSA_AIO_THERMISTOR option." +#endif + +#if ENABLED(PRUSA_AIO_CUSTOM_HOTEND_PID) + #ifndef PRUSA_AIO_DEFAULT_Kp + #error "PRUSA_AIO_DEFAULT_Kp is invalid or not defined." + #elif !defined(PRUSA_AIO_DEFAULT_Ki) + #error "PRUSA_AIO_DEFAULT_Ki is invalid or not defined." + #elif !defined(PRUSA_AIO_DEFAULT_Kd) + #error "PRUSA_AIO_DEFAULT_Kd is invalid or not defined." + #endif +#endif + +#if ENABLED(PRUSA_AIO_CUSTOM_BED_PID) + #ifndef PRUSA_AIO_DEFAULT_bedKp + #error "PRUSA_AIO_DEFAULT_bedKp is invalid or not defined." + #elif !defined(PRUSA_AIO_DEFAULT_bedKi) + #error "PRUSA_AIO_DEFAULT_bedKi is invalid or not defined." + #elif !defined(PRUSA_AIO_DEFAULT_bedKd) + #error "PRUSA_AIO_DEFAULT_bedKd is invalid or not defined." + #endif +#endif + +#if ALL(PRUSA_AIO_HOTEND_MPCTEMP, PRUSA_AIO_CUSTOM_HOTEND_PID) + #error "PRUSA_AIO_HOTEND_MPCTEMP and PRUSA_AIO_CUSTOM_HOTEND_PID cannot be enabled at the same time." +#endif + +#if ENABLED(PRUSA_AIO_CUSTOM_HOTEND_MPCTEMP) + #if DISABLED(PRUSA_AIO_HOTEND_MPCTEMP) + #error "PRUSA_AIO_CUSTOM_HOTEND_MPCTEMP requires PRUSA_AIO_HOTEND_MPCTEMP." + #elif !defined(PRUSA_AIO_CUSTOM_MPC_HEATER_POWER) + #error "PRUSA_AIO_CUSTOM_MPC_HEATER_POWER is invalid or not defined." + #elif !defined(PRUSA_AIO_CUSTOM_MPC_BLOCK_HEAT_CAPACITY) + #error "PRUSA_AIO_CUSTOM_MPC_BLOCK_HEAT_CAPACITY is invalid or not defined." + #elif !defined(PRUSA_AIO_CUSTOM_MPC_SENSOR_RESPONSIVENESS) + #error "PRUSA_AIO_CUSTOM_MPC_SENSOR_RESPONSIVENESS is invalid or not defined." + #elif !defined(PRUSA_AIO_CUSTOM_MPC_AMBIENT_XFER_COEFF) + #error "PRUSA_AIO_CUSTOM_MPC_AMBIENT_XFER_COEFF is invalid or not defined." + #elif !defined(PRUSA_AIO_CUSTOM_MPC_AMBIENT_XFER_COEFF_FAN255) + #error "PRUSA_AIO_CUSTOM_MPC_AMBIENT_XFER_COEFF_FAN255 is invalid or not defined." + #elif !defined(PRUSA_AIO_CUSTOM_FILAMENT_HEAT_CAPACITY_PERMM) + #error "PRUSA_AIO_CUSTOM_FILAMENT_HEAT_CAPACITY_PERMM is invalid or not defined." + #endif +#endif + +//=========================================================================== +//============================ Part Cooling Fan ============================= +//=========================================================================== + +#if MANY(PRUSA_AIO_PART_COOLING_FAN_GENERIC, PRUSA_AIO_PART_COOLING_FAN_24V_MECHATRONICS_B5015E24B_BSR, PRUSA_AIO_PART_COOLING_FAN_24V_DELTA_BFB0524HH, PRUSA_AIO_PART_COOLING_FAN_24V_SOUNDORIGINAL, PRUSA_AIO_PART_COOLING_FAN_12V_STOCK_PRUSA_MK25S_5015, PRUSA_AIO_PART_COOLING_FAN_12V_SOUNDORIGINAL, PRUSA_AIO_PART_COOLING_FAN_5V_STOCK_PRUSA_MK3S_5015, PRUSA_AIO_PART_COOLING_FAN_5V_LDO_DF5015H05S) + #error "Only one PRUSA_AIO_PART_COOLING_FAN option can be enabled at a time." +#elif NONE(PRUSA_AIO_PART_COOLING_FAN_GENERIC, PRUSA_AIO_PART_COOLING_FAN_24V_MECHATRONICS_B5015E24B_BSR, PRUSA_AIO_PART_COOLING_FAN_24V_DELTA_BFB0524HH, PRUSA_AIO_PART_COOLING_FAN_24V_SOUNDORIGINAL, PRUSA_AIO_PART_COOLING_FAN_12V_STOCK_PRUSA_MK25S_5015, PRUSA_AIO_PART_COOLING_FAN_12V_SOUNDORIGINAL, PRUSA_AIO_PART_COOLING_FAN_5V_STOCK_PRUSA_MK3S_5015, PRUSA_AIO_PART_COOLING_FAN_5V_LDO_DF5015H05S) + #error "Invalid PRUSA_AIO_PART_COOLING_FAN option." +#elif ENABLED(PRUSA_AIO_MOTHERBOARD_BTT_BTT002) && NONE(PRUSA_AIO_PART_COOLING_FAN_GENERIC, PRUSA_AIO_PART_COOLING_FAN_5V_STOCK_PRUSA_MK3S_5015, PRUSA_AIO_PART_COOLING_FAN_5V_LDO_DF5015H05S) + #error "Invalid PRUSA_AIO_PART_COOLING_FAN option. Only 5V fans are supported on BigTreeTech BTT002 1.0." +#elif NONE(PRUSA_AIO_MOTHERBOARD_BTT_SKR_V3_0, PRUSA_AIO_MOTHERBOARD_BTT_SKR_V3_0_EZ, PRUSA_AIO_MOTHERBOARD_BTT_BTT002) && ANY(PRUSA_AIO_PART_COOLING_FAN_5V_STOCK_PRUSA_MK3S_5015, PRUSA_AIO_PART_COOLING_FAN_5V_LDO_DF5015H05S) + #error "Invalid PRUSA_AIO_PART_COOLING_FAN option. 5V fans are for BigTreeTech BTT002 1.0 & SKR V3/EZ with DC Mode addon board only." +#elif ENABLED(PRUSA_AIO_MK25S_SUPPORT) && NONE(PRUSA_AIO_PART_COOLING_FAN_GENERIC, PRUSA_AIO_PART_COOLING_FAN_12V_STOCK_PRUSA_MK25S_5015, PRUSA_AIO_PART_COOLING_FAN_12V_SOUNDORIGINAL) + #error "Invalid PRUSA_AIO_PART_COOLING_FAN option. PRUSA_AIO_MK25S_SUPPORT requires 12V fans." +#endif + +//=========================================================================== +//============================== Bed Leveling =============================== +//=========================================================================== + +#if ALL(PRUSA_AIO_BED_LEVELING_BILINEAR, PRUSA_AIO_BED_LEVELING_UBL) + #error "Only one PRUSA_AIO_BED_LEVELING option can be enabled at a time." +#elif NONE(PRUSA_AIO_BED_LEVELING_BILINEAR, PRUSA_AIO_BED_LEVELING_UBL) + #error "Invalid PRUSA_AIO_BED_LEVELING option." +#endif + +//=========================================================================== +//========================= LCD / TFT / Controller ========================== +//=========================================================================== + +#if MANY(PRUSA_AIO_DISPLAY_STOCK_REPRAP_DISCOUNT_SMART_CONTROLLER, PRUSA_AIO_DISPLAY_OLED_REPRAP_DISCOUNT_SMART_CONTROLLER, PRUSA_AIO_DISPLAY_BTT_DUAL_MODE_TFT, PRUSA_AIO_DISPLAY_BTT_MINI_12864_NEOPIXEL, PRUSA_AIO_DISPLAY_FYSETC_MINI_12864_NEOPIXEL, PRUSA_AIO_DISPLAY_MKS_MINI_12864_NEOPIXEL, PRUSA_AIO_DISPLAY_BTT_TFT35_SPI_V1, PRUSA_AIO_DISPLAY_MKS_TS35_V2_0) + #error "Only one PRUSA_AIO_DISPLAY option can be enabled at a time." +#elif NONE(PRUSA_AIO_DISPLAY_STOCK_REPRAP_DISCOUNT_SMART_CONTROLLER, PRUSA_AIO_DISPLAY_OLED_REPRAP_DISCOUNT_SMART_CONTROLLER, PRUSA_AIO_DISPLAY_BTT_DUAL_MODE_TFT, PRUSA_AIO_DISPLAY_BTT_MINI_12864_NEOPIXEL, PRUSA_AIO_DISPLAY_FYSETC_MINI_12864_NEOPIXEL, PRUSA_AIO_DISPLAY_MKS_MINI_12864_NEOPIXEL, PRUSA_AIO_DISPLAY_BTT_TFT35_SPI_V1, PRUSA_AIO_DISPLAY_MKS_TS35_V2_0) + #error "Invalid PRUSA_AIO_DISPLAY option." +#elif ENABLED(PRUSA_AIO_DISPLAY_OLED_REPRAP_DISCOUNT_SMART_CONTROLLER) && ANY(PRUSA_AIO_MOTHERBOARD_BTT_SKR_V3_0, PRUSA_AIO_MOTHERBOARD_BTT_SKR_V3_0_EZ, PRUSA_AIO_MOTHERBOARD_BTT_SKR_V2_0_REV_B, PRUSA_AIO_MOTHERBOARD_BTT_BTT002, PRUSA_AIO_MOTHERBOARD_MKS_ROBIN_E3, PRUSA_AIO_MOTHERBOARD_MKS_ROBIN_E3_V1_1, PRUSA_AIO_MOTHERBOARD_MKS_ROBIN_E3D, PRUSA_AIO_MOTHERBOARD_MKS_ROBIN_E3D_V1_1) + #error "OLED RepRapDiscount smart controller is only compatible with LPC-based motherboards." +#elif ANY(PRUSA_AIO_MOTHERBOARD_BTT_SKR_MINI_E3_V3_0, PRUSA_AIO_MOTHERBOARD_BTT_SKR_MINI_E3_V3_0_1, PRUSA_AIO_MOTHERBOARD_BTT_SKR_MINI_E3_V2_0) && DISABLED(PRUSA_AIO_DISPLAY_BTT_DUAL_MODE_TFT) + #error "Invalid PRUSA_AIO_DISPLAY option. SKR Mini E3 has a single EXP connector and is only compatible with PRUSA_AIO_DISPLAY_BTT_DUAL_MODE_TFT." +#endif + +#if ANY(PRUSA_AIO_DISPLAY_BTT_MINI_12864_NEOPIXEL, PRUSA_AIO_DISPLAY_FYSETC_MINI_12864_NEOPIXEL, PRUSA_AIO_DISPLAY_MKS_MINI_12864_NEOPIXEL) + #if MANY(PRUSA_AIO_LCD_NEOPIXEL_COLOR_RED, PRUSA_AIO_LCD_NEOPIXEL_COLOR_ORANGE, PRUSA_AIO_LCD_NEOPIXEL_COLOR_YELLOW, PRUSA_AIO_LCD_NEOPIXEL_COLOR_GREEN, PRUSA_AIO_LCD_NEOPIXEL_COLOR_BLUE, PRUSA_AIO_LCD_NEOPIXEL_COLOR_INDIGO, PRUSA_AIO_LCD_NEOPIXEL_COLOR_VIOLET, PRUSA_AIO_LCD_NEOPIXEL_COLOR_WHITE) + #error "Only one PRUSA_AIO_LCD_NEOPIXEL_COLOR option can be enabled at a time." + #elif NONE(PRUSA_AIO_LCD_NEOPIXEL_COLOR_RED, PRUSA_AIO_LCD_NEOPIXEL_COLOR_ORANGE, PRUSA_AIO_LCD_NEOPIXEL_COLOR_YELLOW, PRUSA_AIO_LCD_NEOPIXEL_COLOR_GREEN, PRUSA_AIO_LCD_NEOPIXEL_COLOR_BLUE, PRUSA_AIO_LCD_NEOPIXEL_COLOR_INDIGO, PRUSA_AIO_LCD_NEOPIXEL_COLOR_VIOLET, PRUSA_AIO_LCD_NEOPIXEL_COLOR_WHITE) + #error "Invalid PRUSA_AIO_LCD_NEOPIXEL_COLOR option." + #endif +#endif + +#if !defined(PRUSA_AIO_LCD_LANGUAGE) + #error "Invalid PRUSA_AIO_LCD_LANGUAGE option." +#endif + +//=========================================================================== +//=========================== Sheet Profiles Menu =========================== +//=========================================================================== + +#if ENABLED(PRUSA_AIO_SHEET_PROFILES_MENU) + // Description is enabled, but no offset + #if defined(PRUSA_AIO_SHEET_1_DESC) && !defined(PRUSA_AIO_SHEET_1_OFFSET) + #error "PRUSA_AIO_SHEET_1_OFFSET is required when PRUSA_AIO_SHEET_1_DESC is enabled." + #elif defined(PRUSA_AIO_SHEET_2_DESC) && !defined(PRUSA_AIO_SHEET_2_OFFSET) + #error "PRUSA_AIO_SHEET_2_OFFSET is required when PRUSA_AIO_SHEET_2_DESC is enabled." + #elif defined(PRUSA_AIO_SHEET_3_DESC) && !defined(PRUSA_AIO_SHEET_3_OFFSET) + #error "PRUSA_AIO_SHEET_3_OFFSET is required when PRUSA_AIO_SHEET_3_DESC is enabled." + #elif defined(PRUSA_AIO_SHEET_4_DESC) && !defined(PRUSA_AIO_SHEET_4_OFFSET) + #error "PRUSA_AIO_SHEET_4_OFFSET is required when PRUSA_AIO_SHEET_4_DESC is enabled." + #elif defined(PRUSA_AIO_SHEET_5_DESC) && !defined(PRUSA_AIO_SHEET_5_OFFSET) + #error "PRUSA_AIO_SHEET_5_OFFSET is required when PRUSA_AIO_SHEET_5_DESC is enabled." + #elif defined(PRUSA_AIO_SHEET_6_DESC) && !defined(PRUSA_AIO_SHEET_6_OFFSET) + #error "PRUSA_AIO_SHEET_6_OFFSET is required when PRUSA_AIO_SHEET_6_DESC is enabled." + #elif defined(PRUSA_AIO_SHEET_7_DESC) && !defined(PRUSA_AIO_SHEET_7_OFFSET) + #error "PRUSA_AIO_SHEET_7_OFFSET is required when PRUSA_AIO_SHEET_7_DESC is enabled." + #elif defined(PRUSA_AIO_SHEET_8_DESC) && !defined(PRUSA_AIO_SHEET_8_OFFSET) + #error "PRUSA_AIO_SHEET_8_OFFSET is required when PRUSA_AIO_SHEET_8_DESC is enabled." + #elif defined(PRUSA_AIO_SHEET_9_DESC) && !defined(PRUSA_AIO_SHEET_9_OFFSET) + #error "PRUSA_AIO_SHEET_9_OFFSET is required when PRUSA_AIO_SHEET_9_DESC is enabled." + #elif defined(PRUSA_AIO_SHEET_10_DESC) && !defined(PRUSA_AIO_SHEET_10_OFFSET) + #error "PRUSA_AIO_SHEET_10_OFFSET is required when PRUSA_AIO_SHEET_10_DESC is enabled." + #endif + + // Offset is enabled, but no description + #if defined(PRUSA_AIO_SHEET_1_OFFSET) && !defined(PRUSA_AIO_SHEET_1_DESC) + #error "PRUSA_AIO_SHEET_1_DESC is required when PRUSA_AIO_SHEET_1_OFFSET is enabled." + #elif defined(PRUSA_AIO_SHEET_2_OFFSET) && !defined(PRUSA_AIO_SHEET_2_DESC) + #error "PRUSA_AIO_SHEET_2_DESC is required when PRUSA_AIO_SHEET_2_OFFSET is enabled." + #elif defined(PRUSA_AIO_SHEET_3_OFFSET) && !defined(PRUSA_AIO_SHEET_3_DESC) + #error "PRUSA_AIO_SHEET_3_DESC is required when PRUSA_AIO_SHEET_3_OFFSET is enabled." + #elif defined(PRUSA_AIO_SHEET_4_OFFSET) && !defined(PRUSA_AIO_SHEET_4_DESC) + #error "PRUSA_AIO_SHEET_4_DESC is required when PRUSA_AIO_SHEET_4_OFFSET is enabled." + #elif defined(PRUSA_AIO_SHEET_5_OFFSET) && !defined(PRUSA_AIO_SHEET_5_DESC) + #error "PRUSA_AIO_SHEET_5_DESC is required when PRUSA_AIO_SHEET_5_OFFSET is enabled." + #elif defined(PRUSA_AIO_SHEET_6_OFFSET) && !defined(PRUSA_AIO_SHEET_6_DESC) + #error "PRUSA_AIO_SHEET_6_DESC is required when PRUSA_AIO_SHEET_6_OFFSET is enabled." + #elif defined(PRUSA_AIO_SHEET_7_OFFSET) && !defined(PRUSA_AIO_SHEET_7_DESC) + #error "PRUSA_AIO_SHEET_7_DESC is required when PRUSA_AIO_SHEET_7_OFFSET is enabled." + #elif defined(PRUSA_AIO_SHEET_8_OFFSET) && !defined(PRUSA_AIO_SHEET_8_DESC) + #error "PRUSA_AIO_SHEET_8_DESC is required when PRUSA_AIO_SHEET_8_OFFSET is enabled." + #elif defined(PRUSA_AIO_SHEET_9_OFFSET) && !defined(PRUSA_AIO_SHEET_9_DESC) + #error "PRUSA_AIO_SHEET_9_DESC is required when PRUSA_AIO_SHEET_9_OFFSET is enabled." + #elif defined(PRUSA_AIO_SHEET_10_OFFSET) && !defined(PRUSA_AIO_SHEET_10_DESC) + #error "PRUSA_AIO_SHEET_10_DESC is required when PRUSA_AIO_SHEET_10_OFFSET is enabled." + #endif +#endif + +//=========================================================================== +//============================= NeoPixel Strip ============================== +//=========================================================================== + +#if ENABLED(PRUSA_AIO_NEOPIXEL_STRIP) + + #if ANY(PRUSA_AIO_MOTHERBOARD_BTT_BTT002, PRUSA_AIO_MOTHERBOARD_MKS_SGEN_L_V2, PRUSA_AIO_MOTHERBOARD_MKS_ROBIN_NANO_V3, PRUSA_AIO_MOTHERBOARD_MKS_ROBIN_NANO_V3_1, PRUSA_AIO_MOTHERBOARD_MKS_EAGLE_V1_0) + #error "NeoPixels are not compatible with enabled motherboard." + #endif + + #ifndef PRUSA_AIO_NEOPIXEL_STRIP_TYPE + #error "PRUSA_AIO_NEOPIXEL_STRIP_TYPE is invalid or not defined." + #elif !defined(PRUSA_AIO_NEOPIXEL_STRIP_LED_COUNT) + #error "PRUSA_AIO_NEOPIXEL_STRIP_LED_COUNT is invalid or not defined." + #elif !defined(PRUSA_AIO_NEOPIXEL_STRIP_BRIGHTNESS) + #error "PRUSA_AIO_NEOPIXEL_STRIP_BRIGHTNESS is invalid or not defined." + #endif + + #if MANY(PRUSA_AIO_NEOPIXEL_STRIP_COLOR_WHITE, PRUSA_AIO_NEOPIXEL_STRIP_COLOR_RED, PRUSA_AIO_NEOPIXEL_STRIP_COLOR_ORANGE, PRUSA_AIO_NEOPIXEL_STRIP_COLOR_YELLOW, PRUSA_AIO_NEOPIXEL_STRIP_COLOR_GREEN, PRUSA_AIO_NEOPIXEL_STRIP_COLOR_BLUE, PRUSA_AIO_NEOPIXEL_STRIP_COLOR_INDIGO, PRUSA_AIO_NEOPIXEL_STRIP_COLOR_VIOLET) + #error "Only one PRUSA_AIO_NEOPIXEL_STRIP_COLOR option can be enabled at a time." + #elif NONE(PRUSA_AIO_NEOPIXEL_STRIP_COLOR_WHITE, PRUSA_AIO_NEOPIXEL_STRIP_COLOR_RED, PRUSA_AIO_NEOPIXEL_STRIP_COLOR_ORANGE, PRUSA_AIO_NEOPIXEL_STRIP_COLOR_YELLOW, PRUSA_AIO_NEOPIXEL_STRIP_COLOR_GREEN, PRUSA_AIO_NEOPIXEL_STRIP_COLOR_BLUE, PRUSA_AIO_NEOPIXEL_STRIP_COLOR_INDIGO, PRUSA_AIO_NEOPIXEL_STRIP_COLOR_VIOLET) + #error "Invalid PRUSA_AIO_NEOPIXEL_STRIP_COLOR option." + #endif +#endif + +//=========================================================================== +//============================== Input Shaping ============================== +//=========================================================================== + +#if ENABLED(PRUSA_AIO_INPUT_SHAPING) + #ifndef PRUSA_AIO_SHAPING_FREQ_X + #error "PRUSA_AIO_SHAPING_FREQ_X is invalid or not defined." + #elif !defined(PRUSA_AIO_SHAPING_FREQ_Y) + #error "PRUSA_AIO_SHAPING_FREQ_Y is invalid or not defined." + #elif !defined(PRUSA_AIO_SHAPING_ZETA_X) + #error "PRUSA_AIO_SHAPING_ZETA_X is invalid or not defined." + #elif !defined(PRUSA_AIO_SHAPING_ZETA_Y) + #error "PRUSA_AIO_SHAPING_ZETA_Y is invalid or not defined." + #endif +#endif diff --git a/Marlin/src/inc/Prusa_AIO_Warnings.cpp b/Marlin/src/inc/Prusa_AIO_Warnings.cpp new file mode 100644 index 0000000000..0f1110c9df --- /dev/null +++ b/Marlin/src/inc/Prusa_AIO_Warnings.cpp @@ -0,0 +1,128 @@ +//=========================================================================== +//========================== DO NOT EDIT THIS FILE ========================== +//=========================================================================== + +/** + * Prusa_AIO_Warnings.cpp + * Test Prusa AIO configuration values and give warnings at compile-time. + */ +#include "MarlinConfig.h" +#define PRUSA_AIO_VERSION 20240423 + +// +// Warnings! Located here so they will appear just once in the build output. +// + +/** + * Prusa AIO Warnings / Reminders + */ +#ifndef NO_PRUSA_AIO_WARNINGS + +//=========================================================================== +//============================== Jumpers/Pins =============================== +//=========================================================================== + +#if DISABLED(PRUSA_AIO_NO_DRIVER_UART_SPI_JUMPERS) + #if ANY(PRUSA_AIO_DRIVERS_TMC2209, PRUSA_AIO_DRIVERS_TMC2226_015_RSENSE, PRUSA_AIO_DRIVERS_TMC2226_011_RSENSE) // TMC2209s/TMC2226s are configured via UART + #warning "Ensure driver jumpers are set to UART mode". + #elif ANY(PRUSA_AIO_DRIVERS_TMC5160, PRUSA_AIO_DRIVERS_TMC2130) // TMC5160s/TMC2130s are configured via SPI + #warning "Ensure driver jumpers are set to SPI mode." + #endif +#endif + +#if ENABLED(PRUSA_AIO_HAS_FIVE_DRIVERS) + #warning "Five stepper drivers are required for enabled motherboard. E1 stepper driver will be used for Z2." + #if ENABLED(USES_DIAG_JUMPERS) + #if ENABLED(PRUSA_AIO_MK25S_SUPPORT) + #warning "DIAG jumpers must be removed for X, Y, Z, Z2 (E1), & E0 or homing and filament runout will not work correctly." + #else + #warning "DIAG jumpers must be installed for X & Y and removed for Z, Z2 (E1), and E0 or homing and filament runout will not work correctly." + #endif + #elif ENABLED(USES_DIAG_PINS) + #if ENABLED(PRUSA_AIO_MK25S_SUPPORT) + #warning "DIAG pins must be cut or desoldered from X, Y, Z, Z2 (E1), and E0 drivers or homing and filament runout will not work correctly." + #else + #warning "DIAG pins must be cut or desoldered from Z, Z2 (E1), and E0 drivers or homing and filament runout will not work correctly." + #endif + #endif +#else // Four drivers + #if ENABLED(USES_DIAG_JUMPERS) + #if ENABLED(PRUSA_AIO_MK25S_SUPPORT) + #warning "DIAG jumpers must be removed for X, Y, Z, & E0 or homing and filament runout will not work correctly." + #else + #warning "DIAG jumpers must be installed for X & Y and removed for Z & E or homing and filament runout will not work correctly." + #endif + #elif ENABLED(USES_DIAG_PINS) + #if ENABLED(PRUSA_AIO_MK25S_SUPPORT) + #warning "DIAG pins must be cut or desoldered from X, Y, Z, and E0 drivers or homing and filament runout will not work correctly." + #else + #warning "DIAG pins must be cut or desoldered from Z and E drivers or homing and filament runout will not work correctly." + #endif + #endif +#endif + +// Remind users to check U Disk / Flash Drive jumpers since they typically ship in the WiFi position. +#if ALL(PRUSA_AIO_MOTHERBOARD_BTT_SKR_V2_0_REV_B, PRUSA_AIO_FLASH_DRIVE_SUPPORT) + #warning "Ensure U Disk / Flash Drive jumpers are set correctly. (See Page 12 of SKR V2's User Manual https://bit.ly/3am3PNL)" +#endif + +//=========================================================================== +//========================= LCD / TFT / Controller ========================== +//=========================================================================== + +// Remind users of common LCD controller setup issues + +#if ENABLED(PRUSA_AIO_DISPLAY_BTT_DUAL_MODE_TFT) + #if ENABLED(PRUSA_AIO_SINGLE_EXP_CONNECTION) + #warning "Connect 10-pin IDC cable from EXP1 on motherboard to EXP3 on BigTreeTech Dual Mode TFT. If LCD does not light up, try rotating EXP cable 180° on one end." + #else + #warning "Connect both 10-pin IDC cables from EXP1/EXP2 on motherboard to EXP1/EXP2 on BigTreeTech Dual Mode TFT. If LCD does not light up, try rotating EXP cables 180° on one end." + #endif +#else + #warning "If LCD does not light up, try rotating EXP cables 180° on one end." +#endif + +// Remind users to remove onboard SD card after flashing or they will get a "MEDIA INIT FAIL" error message due to a shared SD_DETECT signal +#if ENABLED(PRUSA_AIO_MEDIA_INIT_WARNING) + #warning "To prevent a 'MEDIA INIT FAIL' error message, remove onboard SD card after updating firmware." +#endif + +//=========================================================================== +//================================== Fans =================================== +//=========================================================================== + +// No FAN1_PIN available +#if ENABLED(PRUSA_AIO_NO_FAN1_PIN) + #warning "No FAN1_PIN available for automatic hotend cooling. Connect hotend cooling fan directly to 24V power source." +#endif + +// BTT002 fan pin reassignment +#if ENABLED(PRUSA_AIO_MOTHERBOARD_BTT_BTT002) + #warning "Define MK3_FAN_PINS to swap hotend and part cooling fan pins." +#endif + +// SKR V3 series with 5V fan need DC Mode board +#if ANY(PRUSA_AIO_MOTHERBOARD_BTT_SKR_V3_0, PRUSA_AIO_MOTHERBOARD_BTT_SKR_V3_0_EZ) && ANY(PRUSA_AIO_PART_COOLING_FAN_5V_STOCK_PRUSA_MK3S_5015, PRUSA_AIO_PART_COOLING_FAN_5V_LDO_DF5015H05S) + #warning "SKR 3-DC Mode addon is required to run 5V fans on SKR V3/EZ motherboards." +#endif + +//=========================================================================== +//============================== Temperatures =============================== +//=========================================================================== + +#if ANY(PRUSA_AIO_THERMISTOR_SLICE_450C, PRUSA_AIO_THERMISTOR_TL_T_D500) + #warning "Safety Warning: Printing above 295°C will require an upgrade from the stock V6 aluminum block or it could melt!" +#endif + +// TMC2130s run HOT! +#if ENABLED(PRUSA_AIO_DRIVERS_TMC2130) + #warning "TMC2130s run hot! Active cooling is essential or drivers will overheat!" +#endif + +#endif // NO_PRUSA_AIO_WARNINGS + +//=========================================================================== +//============================== Please Donate ============================== +//=========================================================================== + +#warning "If you find this project helpful, please consider donating at https://github.com/sponsors/thisiskeithb or https://ko-fi.com/thisiskeithb" diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 6b9deef84d..aaf0f40b7b 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -2306,9 +2306,9 @@ static_assert(NUM_SERVOS <= NUM_SERVO_PLUGS, "NUM_SERVOS (or some servo index) i #define FAUX_RGB 1 #endif #if defined(NEOPIXEL_TYPE) && NEOPIXEL_TYPE != NEO_RGB - #error "Your FYSETC/MKS/BTT/BEEZ Mini Panel requires NEOPIXEL_TYPE to be NEO_RGB." + //#error "Your FYSETC/MKS/BTT/BEEZ Mini Panel requires NEOPIXEL_TYPE to be NEO_RGB." #elif defined(NEOPIXEL_PIXELS) && NEOPIXEL_PIXELS < 3 - #error "Your FYSETC/MKS/BTT/BEEZ Mini Panel requires NEOPIXEL_PIXELS >= 3." + //#error "Your FYSETC/MKS/BTT/BEEZ Mini Panel requires NEOPIXEL_PIXELS >= 3." #endif #if FAUX_RGB #undef NEO_RGB diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 0d01b6a056..0c2f12f013 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -25,7 +25,7 @@ * Release version. Leave the Marlin version or apply a custom scheme. */ #ifndef SHORT_BUILD_VERSION - #define SHORT_BUILD_VERSION "bugfix-2.1.x" + #define SHORT_BUILD_VERSION "Prusa AIO 2.1.x" #endif /** diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h index 6345001b11..f4887cd06b 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h @@ -554,7 +554,7 @@ #define RGB_LED_B_PIN EXP1_08_PIN #endif #elif ENABLED(FYSETC_MINI_12864_2_1) - #define NEOPIXEL_PIN EXP1_06_PIN + //#define NEOPIXEL_PIN EXP1_06_PIN #endif #else // !FYSETC_MINI_12864 diff --git a/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h b/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h index aec4240276..6afcf88037 100644 --- a/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h +++ b/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h @@ -406,7 +406,7 @@ #define RGB_LED_B_PIN EXP1_08_PIN #endif #elif ENABLED(FYSETC_MINI_12864_2_1) - #define NEOPIXEL_PIN EXP1_06_PIN + //#define NEOPIXEL_PIN EXP1_06_PIN #endif #else // !FYSETC_MINI_12864 diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index 1a356b17d7..2c093c5b9f 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -613,13 +613,13 @@ #elif MB(MKS_ROBIN_PRO) #include "stm32f1/pins_MKS_ROBIN_PRO.h" // STM32F1 env:mks_robin_pro env:mks_robin_pro_maple #elif MB(MKS_ROBIN_E3) - #include "stm32f1/pins_MKS_ROBIN_E3.h" // STM32F1 env:mks_robin_e3 env:mks_robin_e3_maple + #include "stm32f1/pins_MKS_ROBIN_E3.h" // STM32F1 env:mks_robin_e3 #elif MB(MKS_ROBIN_E3_V1_1) #include "stm32f1/pins_MKS_ROBIN_E3_V1_1.h" // STM32F1 env:mks_robin_e3 #elif MB(MKS_ROBIN_E3D) #include "stm32f1/pins_MKS_ROBIN_E3D.h" // STM32F1 env:mks_robin_e3 #elif MB(MKS_ROBIN_E3D_V1_1) - #include "stm32f1/pins_MKS_ROBIN_E3D_V1_1.h" // STM32F1 env:mks_robin_e3 env:mks_robin_e3_maple + #include "stm32f1/pins_MKS_ROBIN_E3D_V1_1.h" // STM32F1 env:mks_robin_e3 #elif MB(MKS_ROBIN_E3P) #include "stm32f1/pins_MKS_ROBIN_E3P.h" // STM32F1 env:mks_robin_e3p env:mks_robin_e3p_maple #elif MB(BTT_SKR_MINI_V1_1) @@ -629,7 +629,7 @@ #elif MB(BTT_SKR_MINI_E3_V1_2) #include "stm32f1/pins_BTT_SKR_MINI_E3_V1_2.h" // STM32F1 env:STM32F103RC_btt env:STM32F103RC_btt_USB env:STM32F103RC_btt_maple env:STM32F103RC_btt_USB_maple #elif MB(BTT_SKR_MINI_E3_V2_0) - #include "stm32f1/pins_BTT_SKR_MINI_E3_V2_0.h" // STM32F1 env:STM32F103RC_btt env:STM32F103RC_btt_USB env:STM32F103RE_btt env:STM32F103RE_btt_USB env:STM32F103RC_btt_maple env:STM32F103RC_btt_USB_maple env:STM32F103RE_btt_maple env:STM32F103RE_btt_USB_maple + #include "stm32f1/pins_BTT_SKR_MINI_E3_V2_0.h" // STM32F1 env:STM32F103RC_btt env:STM32F103RE_btt env:STM32F103RE_btt_USB #elif MB(BTT_SKR_MINI_MZ_V1_0) #include "stm32f1/pins_BTT_SKR_MINI_MZ_V1_0.h" // STM32F1 env:STM32F103RC_btt env:STM32F103RC_btt_USB env:STM32F103RC_btt_maple env:STM32F103RC_btt_USB_maple #elif MB(BTT_SKR_E3_DIP) diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h index a01833db03..5b79a78b71 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h @@ -348,7 +348,7 @@ #define FORCE_SOFT_SPI #else - #error "Only CR10_STOCKDISPLAY, LCD_FOR_MELZI, ZONESTAR_LCD, ENDER2_STOCKDISPLAY, MKS_MINI_12864, TFTGLCD_PANEL_(SPI|I2C), FYSETC_MINI_12864_2_1, MKS_MINI_12864_V3, and BTT_MINI_12864 are currently supported on the BIGTREE_SKR_MINI_E3." + //#error "Only CR10_STOCKDISPLAY, LCD_FOR_MELZI, ZONESTAR_LCD, ENDER2_STOCKDISPLAY, MKS_MINI_12864, TFTGLCD_PANEL_(SPI|I2C), FYSETC_MINI_12864_2_1, MKS_MINI_12864_V3, and BTT_MINI_12864 are currently supported on the BIGTREE_SKR_MINI_E3." #endif #endif // HAS_WIRED_LCD diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h index 49f14866c0..ed5dff39c7 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h @@ -213,7 +213,7 @@ #define DOGLCD_A0 LCD_PINS_DC #define LCD_BACKLIGHT_PIN -1 #define LCD_RESET_PIN EXP1_05_PIN - #define NEOPIXEL_PIN EXP1_06_PIN + //#define NEOPIXEL_PIN EXP1_06_PIN #define DOGLCD_MOSI EXP2_06_PIN #define DOGLCD_SCK EXP2_02_PIN #define FORCE_SOFT_SPI diff --git a/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h b/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h index 41514181f5..e26ad5b8fe 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h @@ -494,7 +494,7 @@ #define RGB_LED_B_PIN EXP1_08_PIN #endif #elif ENABLED(FYSETC_MINI_12864_2_1) - #define NEOPIXEL_PIN EXP1_06_PIN + //#define NEOPIXEL_PIN EXP1_06_PIN #endif #endif // !FYSETC_MINI_12864 diff --git a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3_common.h b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3_common.h index 050c8f2424..c62d5a1f7b 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3_common.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3_common.h @@ -361,7 +361,7 @@ #define DOGLCD_A0 LCD_PINS_DC #define LCD_BACKLIGHT_PIN -1 #define LCD_RESET_PIN EXP1_05_PIN - #define NEOPIXEL_PIN EXP1_06_PIN + //#define NEOPIXEL_PIN EXP1_06_PIN #define DOGLCD_MOSI EXP2_06_PIN #define DOGLCD_SCK EXP2_02_PIN #if SD_CONNECTION_IS(ONBOARD) diff --git a/Marlin/src/pins/stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h b/Marlin/src/pins/stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h index 6c724ad1bf..62b6778a08 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h @@ -374,7 +374,7 @@ #define LCD_BACKLIGHT_PIN -1 #else - #error "Only CR10_STOCKDISPLAY, ZONESTAR_LCD, ENDER2_STOCKDISPLAY, MKS_MINI_12864, FYSETC_MINI_12864_2_1, and TFTGLCD_PANEL_(SPI|I2C) are currently supported on the BIGTREE_SKR_MINI_E3." + //#error "Only CR10_STOCKDISPLAY, ZONESTAR_LCD, ENDER2_STOCKDISPLAY, MKS_MINI_12864, FYSETC_MINI_12864_2_1, and TFTGLCD_PANEL_(SPI|I2C) are currently supported on the BIGTREE_SKR_MINI_E3." #endif #endif // SKR_MINI_SCREEN_ADAPTER diff --git a/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h b/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h index b679921863..bca9165d7a 100644 --- a/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h +++ b/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h @@ -528,16 +528,16 @@ #define TOUCH_INT_PIN EXP1_07_PIN #ifndef TOUCH_CALIBRATION_X - #define TOUCH_CALIBRATION_X 17540 + #define TOUCH_CALIBRATION_X 20499 #endif #ifndef TOUCH_CALIBRATION_Y - #define TOUCH_CALIBRATION_Y -11388 + #define TOUCH_CALIBRATION_Y -13365 #endif #ifndef TOUCH_OFFSET_X - #define TOUCH_OFFSET_X -21 + #define TOUCH_OFFSET_X -58 #endif #ifndef TOUCH_OFFSET_Y - #define TOUCH_OFFSET_Y 337 + #define TOUCH_OFFSET_Y 356 #endif #ifndef TOUCH_ORIENTATION #define TOUCH_ORIENTATION TOUCH_LANDSCAPE @@ -620,7 +620,7 @@ #define RGB_LED_B_PIN EXP1_08_PIN #endif #elif ENABLED(FYSETC_MINI_12864_2_1) - #define NEOPIXEL_PIN EXP1_06_PIN + //#define NEOPIXEL_PIN EXP1_06_PIN #endif #endif // !FYSETC_MINI_12864 diff --git a/README.md b/README.md index 77a23eaf2f..25022328f0 100644 --- a/README.md +++ b/README.md @@ -1,130 +1,80 @@ -

MarlinFirmware's logo

+

Prusa Bear

-

Marlin 3D Printer Firmware

+

Prusa All-in-One Marlin Firmware

+

All-in-One Marlin firmware for your 32-bit Prusa MK2.5S & MK3S/+ Bear!

- GPL-V3.0 License - Contributors - Last Release Date - CI Status - GitHub Sponsors + GPL-V3.0 License + Contributors + Last Commit Date + Prusa AIO CI Status + GitHub Sponsors
- Follow MarlinFirmware on Mastodon + Follow thisiskeithb on Twitter

-Additional documentation can be found at the [Marlin Home Page](https://marlinfw.org/). -Please test this firmware and let us know if it misbehaves in any way. Volunteers are standing by! +## Table of Contents -## Marlin 2.1 Bugfix Branch +- [Helpful Links](#helpful-links) +- [Configuring Prusa All-in-One Firmware](#configuring-prusa-all-in-one-firmware) +- [Building Prusa All-in-One Firmware](#building-prusa-all-in-one-firmware) +- [Supported Hardware Upgrades](#supported-hardware-upgrades) +- [Changes to Slicer Start G-code](#changes-to-slicer-start-g-code) +- [Upgrade Caveats](#upgrade-caveats) +- [Credits](#credits) +- [License](#license) -__Not for production use. Use with caution!__ +## Helpful Links -Marlin 2.1 takes this popular RepRap firmware to the next level by adding support for much faster 32-bit and ARM-based boards while improving support for 8-bit AVR boards. Read about Marlin's decision to use a "Hardware Abstraction Layer" below. + - [Prusa AIO Wiki](https://github.com/thisiskeithb/PrusaAIO/wiki/) — Includes wiring information, recommended motherboard & LCD cases, purchase links for supported hardware, and more! + - [Prusa AIO Discussions](https://github.com/thisiskeithb/PrusaAIO/discussions) + - [Prusa Bear Upgrade Facebook group](https://facebook.com/groups/prusabearupgrade/) + - [Prusa Community Facebook group](https://facebook.com/groups/675831176090951/) -This branch is for patches to the latest 2.1.x release version. Periodically this branch will form the basis for the next minor 2.1.x release. + You can also find me on the [MarlinFirmware Discord](https://discord.gg/n5NJ59y): [💬 thisiskeithb#4707](https://discordapp.com/users/602976310805135370). -Download earlier versions of Marlin on the [Releases page](https://github.com/MarlinFirmware/Marlin/releases). +## Configuring Prusa All-in-One Firmware -## Example Configurations +To configure this firmware, enable options in [`Prusa_AIO_Configuration.h`](Marlin/Prusa_AIO_Configuration.h). No other config file editing is required! -Before you can build Marlin for your machine you'll need a configuration for your specific hardware. Upon request, your vendor will be happy to provide you with the complete source code and configurations for your machine, but you'll need to get updated configuration files if you want to install a newer version of Marlin. Fortunately, Marlin users have contributed dozens of tested configurations to get you started. Visit the [MarlinFirmware/Configurations](https://github.com/MarlinFirmware/Configurations) repository to find the right configuration for your hardware. +## Building Prusa All-in-One Firmware -## Building Marlin 2.1 +To build this firmware, you'll need [Visual Studio Code](https://code.visualstudio.com/) with [PlatformIO](https://docs.platformio.org/en/latest/integration/ide/vscode.html#platformio-ide-for-vscode). Detailed setup instructions can be found in the [Installing Marlin (PlatformIO with VSCode)](https://marlinfw.org/docs/basics/install_platformio_vscode.html) guide. -To build and upload Marlin you will use one of these tools: +## Supported Hardware Upgrades -- The free [Visual Studio Code](https://code.visualstudio.com/download) using the [Auto Build Marlin](https://marlinfw.org/docs/basics/auto_build_marlin.html) extension. -- The free [Arduino IDE](https://www.arduino.cc/en/main/software) : See [Building Marlin with Arduino](https://marlinfw.org/docs/basics/install_arduino.html) -- You can also use VSCode with devcontainer : See [Installing Marlin (VSCode devcontainer)](http://marlinfw.org/docs/basics/install_devcontainer_vscode.html). +In addition to the stock hardware (except the Einsy motherboard & Power Panic), the following upgrades are supported: -Marlin is optimized to build with the **PlatformIO IDE** extension for **Visual Studio Code**. You can still build Marlin with **Arduino IDE**, and we hope to improve the Arduino build experience, but at this time PlatformIO is the better choice. +- **Motherboards**: BigTreeTech SKR 3.0 & 3.0 EZ, 2.0 with optional flash drive support, 1.4 & 1.4 Turbo, BTT002 1.0, SKR Mini E3 V3.x & V2, MKS/Makerbase Robin Nano V3.x & Eagle with optional flash drive support, SGEN_L V2, and Robin E3 & E3D V1.x +- **Drivers**: TMC2209s, TMC2226s, TMC5160s, and TMC2130s +- **Displays**: BigTreeTech dual mode TFT (TFT35, TFT50, TFT70, etc.), WINSTAR OLED-based RepRapDiscount smart controller, and Mini 12864 with NeoPixel RGB backlight (BigTreeTech Mini 12864 V1/V2 and MKS Mini 12864 V3) +- **LDO/Moons Stepper Motors**: Planetary extruder and 0.9° X/Y/E +- **Bondtech BMG extruder**: Bondtech BMG upgrade kit and Self-printed BMG +- **5015 Part Cooling Fans**: 24V Mechatronics B5015E24B-BSR, 24V Delta BFB0524HH, 24V SoundOriginal, 5V LDO DF5015H05S +- **High Temperature Thermistors**: Slice Engineering 450°C and Trianglelab T-D500 (Dyze Design) 500°C +- **Probes**: BLTouch and SuperPINDA +- NeoPixels +- ESP WiFi addon running [ESP3D](https://github.com/luc-github/ESP3D) -## 8-Bit AVR Boards +## Changes to Slicer Start G-code -We intend to continue supporting 8-bit AVR boards in perpetuity, maintaining a single codebase that can apply to all machines. We want casual hobbyists and tinkerers and owners of older machines to benefit from the community's innovations just as much as those with fancier machines. Plus, those old AVR-based machines are often the best for your testing and feedback! +The `W` in Prusa's `G28 W ; home all without mesh bed level` default G-code does not exist in Marlin and `G80 ; mesh bed leveling` cancels the current motion mode, so no bed leveling will take place. See the [Changes to Start G-code](https://github.com/thisiskeithb/PrusaAIO/wiki/Slicer-G%E2%80%90Code-Notes) wiki article for example start G-code scripts from popular slicers for required changes. -## Hardware Abstraction Layer (HAL) +## Upgrade Caveats -Marlin includes an abstraction layer to provide a common API for all the platforms it targets. This allows Marlin code to address the details of motion and user interface tasks at the lowest and highest levels with no system overhead, tying all events directly to the hardware clock. +As noted in the Supported Hardware Upgrades section above, the stock Einsy board & Power Panic are not supported. This firmware is based on Marlin bugfix-2.1.x with options specifically tailored to a Prusa MK3S/+ Bear with various hardware upgrades. You will lose Prusa firmware features like the setup wizards, automatic calibration, etc., but you can now use a variety of 32-bit boards, modern TMC drivers, and a bunch of other hardware by enabling a few config options in [`Prusa_AIO_Configuration.h`](Marlin/Prusa_AIO_Configuration.h). -Every new HAL opens up a world of hardware. At this time we need HALs for RP2040 and the Duet3D family of boards. A HAL that wraps an RTOS is an interesting concept that could be explored. Did you know that Marlin includes a Simulator that can run on Windows, macOS, and Linux? Join the Discord to help move these sub-projects forward! +## Credits -### Supported Platforms +If you find this project helpful, please consider donating! - Platform|MCU|Example Boards - --------|---|------- - [Arduino AVR](https://www.arduino.cc/)|ATmega|RAMPS, Melzi, RAMBo - [Teensy++ 2.0](https://www.microchip.com/en-us/product/AT90USB1286)|AT90USB1286|Printrboard - [Arduino Due](https://www.arduino.cc/en/Guide/ArduinoDue)|SAM3X8E|RAMPS-FD, RADDS, RAMPS4DUE - [ESP32](https://github.com/espressif/arduino-esp32)|ESP32|FYSETC E4, E4d@BOX, MRR - [LPC1768](https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/lpc1700-cortex-m3/512-kb-flash-64-kb-sram-ethernet-usb-lqfp100-package:LPC1768FBD100)|ARM® Cortex-M3|MKS SBASE, Re-ARM, Selena Compact - [LPC1769](https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/lpc1700-cortex-m3/512-kb-flash-64-kb-sram-ethernet-usb-lqfp100-package:LPC1769FBD100)|ARM® Cortex-M3|Smoothieboard, Azteeg X5 mini, TH3D EZBoard - [STM32F103](https://www.st.com/en/microcontrollers-microprocessors/stm32f103.html)|ARM® Cortex-M3|Malyan M200, GTM32 Pro, MKS Robin, BTT SKR Mini - [STM32F401](https://www.st.com/en/microcontrollers-microprocessors/stm32f401.html)|ARM® Cortex-M4|ARMED, Rumba32, SKR Pro, Lerdge, FYSETC S6, Artillery Ruby - [STM32F7x6](https://www.st.com/en/microcontrollers-microprocessors/stm32f7x6.html)|ARM® Cortex-M7|The Borg, RemRam V1 - [STM32G0B1RET6](https://www.st.com/en/microcontrollers-microprocessors/stm32g0x1.html)|ARM® Cortex-M0+|BigTreeTech SKR mini E3 V3.0 - [STM32H743xIT6](https://www.st.com/en/microcontrollers-microprocessors/stm32h743-753.html)|ARM® Cortex-M7|BigTreeTech SKR V3.0, SKR EZ V3.0, SKR SE BX V2.0/V3.0 - [SAMD51P20A](https://www.adafruit.com/product/4064)|ARM® Cortex-M4|Adafruit Grand Central M4 - [Teensy 3.5](https://www.pjrc.com/store/teensy35.html)|ARM® Cortex-M4| - [Teensy 3.6](https://www.pjrc.com/store/teensy36.html)|ARM® Cortex-M4| - [Teensy 4.0](https://www.pjrc.com/store/teensy40.html)|ARM® Cortex-M7| - [Teensy 4.1](https://www.pjrc.com/store/teensy41.html)|ARM® Cortex-M7| - Linux Native|x86/ARM/etc.|Raspberry Pi - [All supported boards](https://marlinfw.org/docs/hardware/boards.html#boards-list)|All platforms|All boards + - Keith Bennett [[thisiskeithb](https://github.com/thisiskeithb)], Prusa AIO Creator - [💸 Github Sponsors](https://github.com/sponsors/thisiskeithb) / [☕ Ko-fi](https://ko-fi.com/thisiskeithb) + - Chris Warkocki [[codiac2600](https://github.com/codiac2600/)], SKR Bear Project + - Grégoire Saunier [[gregsaun](https://github.com/gregsaun)], Prusa Bear Project - [💸 Patreon](https://patreon.com/gregsaun) + - Scott Lahteine [[thinkyhead](https://github.com/thinkyhead)], Marlin Maintainer - [💸 Donate](https://www.thinkyhead.com/donate-to-marlin) -## Marlin Support - -The Issue Queue is reserved for Bug Reports and Feature Requests. Please use the following resources for help with configuration and troubleshooting: - -- [Marlin Documentation](https://marlinfw.org) - Official Marlin documentation -- [Marlin Discord](https://discord.gg/n5NJ59y) - Discuss issues with Marlin users and developers -- Facebook Group ["Marlin Firmware"](https://www.facebook.com/groups/1049718498464482/) -- RepRap.org [Marlin Forum](https://forums.reprap.org/list.php?415) -- Facebook Group ["Marlin Firmware for 3D Printers"](https://www.facebook.com/groups/3Dtechtalk/) -- [Marlin Configuration](https://www.youtube.com/results?search_query=marlin+configuration) on YouTube - -## Contributing Patches - -You can contribute patches by submitting a Pull Request to the ([bugfix-2.1.x](https://github.com/MarlinFirmware/Marlin/tree/bugfix-2.1.x)) branch. - -- We use branches named with a "bugfix" or "dev" prefix to fix bugs and integrate new features. -- Follow the [Coding Standards](https://marlinfw.org/docs/development/coding_standards.html) to gain points with the maintainers. -- Please submit Feature Requests and Bug Reports to the [Issue Queue](https://github.com/MarlinFirmware/Marlin/issues/new/choose). See above for user support. -- Whenever you add new features, be sure to add one or more build tests to `buildroot/tests`. Any tests added to a PR will be run within that PR on GitHub servers as soon as they are pushed. To minimize iteration be sure to run your new tests locally, if possible. - - Local build tests: - - All: `make tests-config-all-local` - - Single: `make tests-config-single-local TEST_TARGET=...` - - Local build tests in Docker: - - All: `make tests-config-all-local-docker` - - Single: `make tests-config-all-local-docker TEST_TARGET=...` - - To run all unit test suites: - - Using PIO: `platformio run -t test-marlin` - - Using Make: `make unit-test-all-local` - - Using Docker + make: `maker unit-test-all-local-docker` - - To run a single unit test suite: - - Using PIO: `platformio run -t marlin_` - - Using make: `make unit-test-single-local TEST_TARGET=` - - Using Docker + make: `maker unit-test-single-local-docker TEST_TARGET=` -- If your feature can be unit tested, add one or more unit tests. For more information see our documentation on [Unit Tests](test). - -## Contributors - -Marlin is constantly improving thanks to a huge number of contributors from all over the world bringing their specialties and talents. Huge thanks are due to [all the contributors](https://github.com/MarlinFirmware/Marlin/graphs/contributors) who regularly patch up bugs, help direct traffic, and basically keep Marlin from falling apart. Marlin's continued existence would not be possible without them. - -## Project Leadership - -Name|Role|Link|Donate -----|----|----|---- -🇺🇸 Scott Lahteine|Project Lead|[[@thinkyhead](https://github.com/thinkyhead)]|[💸 Donate](https://marlinfw.org/docs/development/contributing.html#donate) -🇺🇸 Roxanne Neufeld|Admin|[[@Roxy-3D](https://github.com/Roxy-3D)]| -🇺🇸 Keith Bennett|Admin|[[@thisiskeithb](https://github.com/thisiskeithb)]|[💸 Donate](https://github.com/sponsors/thisiskeithb) -🇺🇸 Jason Smith|Admin|[[@sjasonsmith](https://github.com/sjasonsmith)]| -🇧🇷 Victor Oliveira|Admin|[[@rhapsodyv](https://github.com/rhapsodyv)]| -🇬🇧 Chris Pepper|Admin|[[@p3p](https://github.com/p3p)]| -🇳🇿 Peter Ellens|Admin|[[@ellensp](https://github.com/ellensp)]|[💸 Donate](https://ko-fi.com/ellensp) -🇺🇸 Bob Kuhn|Admin|[[@Bob-the-Kuhn](https://github.com/Bob-the-Kuhn)]| -🇳🇱 Erik van der Zalm|Founder|[[@ErikZalm](https://github.com/ErikZalm)]| +First layer calibration based on [Prusa's MK3/S/+ "meander" first layer calibration](https://github.com/prusa3d/Prusa-Firmware/blob/MK3/Firmware/first_lay_cal.cpp) ## License -Marlin is published under the [GPL license](/LICENSE) because we believe in open development. The GPL comes with both rights and obligations. Whether you use Marlin firmware as the driver for your open or closed-source product, you must keep Marlin open, and you must provide your compatible Marlin source code to end users upon request. The most straightforward way to comply with the Marlin license is to make a fork of Marlin on Github, perform your modifications, and direct users to your modified fork. +Marlin and the Prusa All-in-One Firmware are published under the [GPL license](/LICENSE) because we believe in open development. diff --git a/buildroot/share/PlatformIO/scripts/preflight-checks.py b/buildroot/share/PlatformIO/scripts/preflight-checks.py index 307c2fb33f..5e6293cab8 100644 --- a/buildroot/share/PlatformIO/scripts/preflight-checks.py +++ b/buildroot/share/PlatformIO/scripts/preflight-checks.py @@ -106,6 +106,7 @@ def rm_ofile(subdir, name): # Give warnings on every build # rm_ofile("inc", "Warnings") + rm_ofile("inc", "Prusa_AIO_Warnings") # Prusa AIO warnings # # Rebuild 'settings.cpp' for EEPROM_INIT_NOW diff --git a/buildroot/share/pixmaps/logo/Prusa_AIO_Black_Bear_Marlin.png b/buildroot/share/pixmaps/logo/Prusa_AIO_Black_Bear_Marlin.png new file mode 100644 index 0000000000..6586129a29 Binary files /dev/null and b/buildroot/share/pixmaps/logo/Prusa_AIO_Black_Bear_Marlin.png differ diff --git a/config/README.md b/config/README.md deleted file mode 100644 index b19527ccc3..0000000000 --- a/config/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# Where have all the configurations gone? - -Marlin configurations for specific machines are now maintained in their own repository at: - -## https://github.com/MarlinFirmware/Configurations/tree/bugfix-2.1.x - -Configuration files for use with the nightly `bugfix-2.1.x` branch can be downloaded from: - -## https://github.com/MarlinFirmware/Configurations/archive/bugfix-2.1.x.zip diff --git a/ini/lpc176x.ini b/ini/lpc176x.ini index 8d5d2fd157..b9a6752411 100644 --- a/ini/lpc176x.ini +++ b/ini/lpc176x.ini @@ -24,7 +24,8 @@ extra_scripts = ${common.extra_scripts} build_src_filter = ${common.default_src_filter} + - + lib_deps = ${common.lib_deps} Servo -custom_marlin.USES_LIQUIDCRYSTAL = arduino-libraries/LiquidCrystal@~1.0.7 +# Liquid Crystal library with OLED support +custom_marlin.USES_LIQUIDCRYSTAL = LiquidCrystal=https://github.com/thisiskeithb/LiquidCrystalOLED/archive/1.0.8.zip custom_marlin.NEOPIXEL_LED = Adafruit NeoPixel=https://github.com/p3p/Adafruit_NeoPixel/archive/1.5.0.zip build_flags = ${common.build_flags} -DU8G_HAL_LINKS -DPLATFORM_M997_SUPPORT -IMarlin/src/HAL/LPC1768/include -IMarlin/src/HAL/LPC1768/u8g diff --git a/ini/stm32f1.ini b/ini/stm32f1.ini index 3a74b6caf7..57dcfb441b 100644 --- a/ini/stm32f1.ini +++ b/ini/stm32f1.ini @@ -60,6 +60,7 @@ monitor_speed = 115200 extends = common_STM32F103RC_variant build_flags = ${common_STM32F103RC_variant.build_flags} -DTIMER_SERVO=TIM5 + -DPRUSA_AIO_SMALL_FLASH board_build.offset = 0x7000 board_upload.offset_address = 0x08007000 diff --git a/platformio.ini b/platformio.ini index 76200cbbd5..691d489c31 100644 --- a/platformio.ini +++ b/platformio.ini @@ -10,10 +10,38 @@ # Automatic targets - enable auto-uploading #targets = upload +# Prusa AIO Environment Options: +; STM32H743VI_btt +; STM32H723VG_btt +; BIGTREE_SKR_2 +; BIGTREE_SKR_2_F429 +; BIGTREE_SKR_2_USB +; BIGTREE_SKR_2_F429_USB +; BIGTREE_BTT002 +; BIGTREE_BTT002_VET6 +; STM32G0B1RE_btt +; STM32G0B1RE_btt_xfer +; STM32F401RC_btt +; STM32F103RC_btt +; STM32F103RE_btt +; STM32F103RE_btt_USB +; LPC1768 +; LPC1769 +; mks_robin_nano_v3 +; mks_robin_nano_v3_usb_flash_drive +; mks_robin_nano_v3_usb_flash_drive_msc +; mks_robin_nano_v3_1 +; mks_robin_nano_v3_1_usb_flash_drive +; mks_robin_nano_v3_1_usb_flash_drive_msc +; mks_eagle +; mks_eagle_usb_flash_drive +; mks_eagle_usb_flash_drive_msc +; mks_robin_e3 + [platformio] src_dir = Marlin boards_dir = buildroot/share/PlatformIO/boards -default_envs = mega2560 +default_envs = STM32H743VI_btt include_dir = Marlin extra_configs = Marlin/config.ini