diff --git a/.travis.yml b/.travis.yml index 9c0b4974d6..d09f30c147 100644 --- a/.travis.yml +++ b/.travis.yml @@ -83,4 +83,3 @@ branches: except: - # Do not build tags that we create when we upload to GitHub Releases - /^(?i:continuous)$/ - diff --git a/Marlin/Conditionals_LCD.h b/Marlin/Conditionals_LCD.h index 31ba12e4b3..4a4213215a 100644 --- a/Marlin/Conditionals_LCD.h +++ b/Marlin/Conditionals_LCD.h @@ -376,9 +376,10 @@ #define HAS_DEBUG_MENU ENABLED(LCD_PROGRESS_BAR_TEST) - // MK2 Multiplexer forces SINGLENOZZLE to be enabled + // MK2 Multiplexer forces SINGLENOZZLE and kills DISABLE_INACTIVE_EXTRUDER #if ENABLED(MK2_MULTIPLEXER) #define SINGLENOZZLE + #undef DISABLE_INACTIVE_EXTRUDER #endif /** @@ -439,11 +440,11 @@ * and uses "special" angles for its state. */ #if ENABLED(BLTOUCH) - #ifndef Z_ENDSTOP_SERVO_NR - #define Z_ENDSTOP_SERVO_NR 0 + #ifndef Z_PROBE_SERVO_NR + #define Z_PROBE_SERVO_NR 0 #endif #ifndef NUM_SERVOS - #define NUM_SERVOS (Z_ENDSTOP_SERVO_NR + 1) + #define NUM_SERVOS (Z_PROBE_SERVO_NR + 1) #endif #undef DEACTIVATE_SERVOS_AFTER_MOVE #if NUM_SERVOS == 1 @@ -478,12 +479,12 @@ /** * Set a flag for a servo probe */ - #define HAS_Z_SERVO_ENDSTOP (defined(Z_ENDSTOP_SERVO_NR) && Z_ENDSTOP_SERVO_NR >= 0) + #define HAS_Z_SERVO_PROBE (defined(Z_PROBE_SERVO_NR) && Z_PROBE_SERVO_NR >= 0) /** * Set a flag for any enabled probe */ - #define PROBE_SELECTED (ENABLED(PROBE_MANUALLY) || ENABLED(FIX_MOUNTED_PROBE) || ENABLED(Z_PROBE_ALLEN_KEY) || HAS_Z_SERVO_ENDSTOP || ENABLED(Z_PROBE_SLED) || ENABLED(SOLENOID_PROBE)) + #define PROBE_SELECTED (ENABLED(PROBE_MANUALLY) || ENABLED(FIX_MOUNTED_PROBE) || ENABLED(Z_PROBE_ALLEN_KEY) || HAS_Z_SERVO_PROBE || ENABLED(Z_PROBE_SLED) || ENABLED(SOLENOID_PROBE)) /** * Clear probe pin settings when no probe is selected diff --git a/Marlin/Conditionals_post.h b/Marlin/Conditionals_post.h index ffdc3d27f9..c4e291c432 100644 --- a/Marlin/Conditionals_post.h +++ b/Marlin/Conditionals_post.h @@ -349,6 +349,15 @@ #define BED_USES_THERMISTOR #endif + #if TEMP_SENSOR_CHAMBER <= -2 + #error "MAX6675 / MAX31855 Thermocouples not supported for TEMP_SENSOR_CHAMBER" + #elif TEMP_SENSOR_CHAMBER == -1 + #define CHAMBER_USES_AD595 + #elif TEMP_SENSOR_CHAMBER > 0 + #define THERMISTORCHAMBER TEMP_SENSOR_CHAMBER + #define CHAMBER_USES_THERMISTOR + #endif + /** * Flags for PID handling */ @@ -686,7 +695,8 @@ #define HAS_TEMP_4 (PIN_EXISTS(TEMP_4) && TEMP_SENSOR_4 != 0 && TEMP_SENSOR_4 > -2) #define HAS_TEMP_HOTEND (HAS_TEMP_0 || ENABLED(HEATER_0_USES_MAX6675)) #define HAS_TEMP_BED (PIN_EXISTS(TEMP_BED) && TEMP_SENSOR_BED != 0 && TEMP_SENSOR_BED > -2) - #define HAS_TEMP_SENSOR (HAS_TEMP_HOTEND || HAS_TEMP_BED) + #define HAS_TEMP_CHAMBER (PIN_EXISTS(TEMP_CHAMBER) && TEMP_SENSOR_CHAMBER != 0 && TEMP_SENSOR_CHAMBER > -2) + #define HAS_TEMP_SENSOR (HAS_TEMP_HOTEND || HAS_TEMP_BED || HAS_TEMP_CHAMBER) // Heaters #define HAS_HEATER_0 (PIN_EXISTS(HEATER_0)) @@ -707,7 +717,8 @@ #define HAS_AUTO_FAN_2 (HOTENDS > 2 && PIN_EXISTS(E2_AUTO_FAN)) #define HAS_AUTO_FAN_3 (HOTENDS > 3 && PIN_EXISTS(E3_AUTO_FAN)) #define HAS_AUTO_FAN_4 (HOTENDS > 4 && PIN_EXISTS(E4_AUTO_FAN)) - #define HAS_AUTO_FAN (HAS_AUTO_FAN_0 || HAS_AUTO_FAN_1 || HAS_AUTO_FAN_2 || HAS_AUTO_FAN_3) + #define HAS_AUTO_CHAMBER_FAN (PIN_EXISTS(CHAMBER_AUTO_FAN)) + #define HAS_AUTO_FAN (HAS_AUTO_FAN_0 || HAS_AUTO_FAN_1 || HAS_AUTO_FAN_2 || HAS_AUTO_FAN_3 || HAS_AUTO_CHAMBER_FAN) #define AUTO_1_IS_0 (E1_AUTO_FAN_PIN == E0_AUTO_FAN_PIN) #define AUTO_2_IS_0 (E2_AUTO_FAN_PIN == E0_AUTO_FAN_PIN) #define AUTO_2_IS_1 (E2_AUTO_FAN_PIN == E1_AUTO_FAN_PIN) @@ -718,6 +729,11 @@ #define AUTO_4_IS_1 (E4_AUTO_FAN_PIN == E1_AUTO_FAN_PIN) #define AUTO_4_IS_2 (E4_AUTO_FAN_PIN == E2_AUTO_FAN_PIN) #define AUTO_4_IS_3 (E4_AUTO_FAN_PIN == E3_AUTO_FAN_PIN) + #define AUTO_CHAMBER_IS_0 (CHAMBER_AUTO_FAN_PIN == E0_AUTO_FAN_PIN) + #define AUTO_CHAMBER_IS_1 (CHAMBER_AUTO_FAN_PIN == E1_AUTO_FAN_PIN) + #define AUTO_CHAMBER_IS_2 (CHAMBER_AUTO_FAN_PIN == E2_AUTO_FAN_PIN) + #define AUTO_CHAMBER_IS_3 (CHAMBER_AUTO_FAN_PIN == E3_AUTO_FAN_PIN) + #define AUTO_CHAMBER_IS_4 (CHAMBER_AUTO_FAN_PIN == E4_AUTO_FAN_PIN) // Other fans #define HAS_FAN0 (PIN_EXISTS(FAN)) @@ -833,8 +849,8 @@ */ #if HAS_SERVOS - #ifndef Z_ENDSTOP_SERVO_NR - #define Z_ENDSTOP_SERVO_NR -1 + #ifndef Z_PROBE_SERVO_NR + #define Z_PROBE_SERVO_NR -1 #endif #endif @@ -930,6 +946,10 @@ #define PLANNER_LEVELING (OLDSCHOOL_ABL || ENABLED(MESH_BED_LEVELING) || UBL_SEGMENTED || ENABLED(SKEW_CORRECTION)) #define HAS_PROBING_PROCEDURE (HAS_ABL || ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST)) + #if ENABLED(AUTO_BED_LEVELING_UBL) + #undef LCD_BED_LEVELING + #endif + /** * Heater & Fan Pausing */ @@ -1205,7 +1225,7 @@ #define GRID_MAX_POINTS ((GRID_MAX_POINTS_X) * (GRID_MAX_POINTS_Y)) // Add commands that need sub-codes to this list - #define USE_GCODE_SUBCODES ENABLED(G38_PROBE_TARGET) || ENABLED(CNC_COORDINATE_SYSTEMS) + #define USE_GCODE_SUBCODES ENABLED(G38_PROBE_TARGET) || ENABLED(CNC_COORDINATE_SYSTEMS) || ENABLED(POWER_LOSS_RECOVERY) // Parking Extruder #if ENABLED(PARKING_EXTRUDER) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 0ceca05042..e341676cc4 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -310,6 +310,7 @@ #define TEMP_SENSOR_3 0 #define TEMP_SENSOR_4 0 #define TEMP_SENSOR_BED 1 +#define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,23 +397,30 @@ //=========================================================================== //============================= PID > Bed Temperature Control =============== //=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ #define PIDTEMPBED //#define BED_LIMIT_SWITCHING -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #if ENABLED(PIDTEMPBED) @@ -657,7 +665,7 @@ /** * Z Servo Probe, such as an endstop switch on a rotating arm. */ -//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles /** @@ -676,6 +684,9 @@ * readings with inductive probes and piezo sensors. */ //#define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif //#define PROBING_FANS_OFF // Turn fans off when probing //#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors @@ -748,6 +759,8 @@ #define Z_CLEARANCE_BETWEEN_PROBES 2 // Z Clearance between probe points #define Z_AFTER_PROBING 5 // Z position after probing is done +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + // For M851 give a range for adjusting the Z probe offset #define Z_PROBE_OFFSET_RANGE_MIN -20 #define Z_PROBE_OFFSET_RANGE_MAX 20 @@ -848,6 +861,10 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + /** * Filament Runout Sensors * Mechanical or opto endstops are used to check for the presence of filament. @@ -1050,6 +1067,11 @@ // Add a menu item to move between bed corners for manual bed adjustment #define LEVEL_BED_CORNERS +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + /** * Commands to execute at the end of G29 probing. * Useful to retract or move the Z probe out of the way. diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index f10e409088..d038248e6d 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -230,6 +230,7 @@ #define E2_AUTO_FAN_PIN -1 #define E3_AUTO_FAN_PIN -1 #define E4_AUTO_FAN_PIN -1 +#define CHAMBER_AUTO_FAN_PIN -1 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50 #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed @@ -557,6 +558,16 @@ // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART + /** + * Continue after Power-Loss (Creality3D) + * + * Store the current state to the SD Card at the start of each layer + * during SD printing. If the recovery file is found at boot time, present + * an option on the LCD screen to continue the print from the last-known + * point in the file. + */ + #define POWER_LOSS_RECOVERY + /** * Sort SD file listings in alphabetical order. * @@ -902,38 +913,44 @@ */ #define ADVANCED_PAUSE_FEATURE #if ENABLED(ADVANCED_PAUSE_FEATURE) - #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_LENGTH 100 // (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_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast. - #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (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_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate. - #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (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. - - // Filament Unload does a Retract, Delay, and Purge first: - #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. - #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. - - //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. - //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) + #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_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. + // 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. + // 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_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. + // 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. + // 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. + + // Filament Unload does a Retract, Delay, and Purge first: + #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. + #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. + + //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) #endif // @section tmc diff --git a/Marlin/M100_Free_Mem_Chk.cpp b/Marlin/M100_Free_Mem_Chk.cpp index 9a455aba93..9680908dc5 100644 --- a/Marlin/M100_Free_Mem_Chk.cpp +++ b/Marlin/M100_Free_Mem_Chk.cpp @@ -59,8 +59,6 @@ #define TEST_BYTE ((char) 0xE5) -extern char command_queue[BUFSIZE][MAX_CMD_SIZE]; - extern char* __brkval; extern size_t __heap_start, __heap_end, __flp; extern char __bss_end; diff --git a/Marlin/Makefile b/Marlin/Makefile index 47937fb6a6..dfa65b7601 100644 --- a/Marlin/Makefile +++ b/Marlin/Makefile @@ -1,4 +1,4 @@ -# Sprinter Arduino Project Makefile +# Marlin Firmware Arduino Project Makefile # # Makefile Based on: # Arduino 0011 Makefile @@ -96,155 +96,296 @@ RELOC_WORKAROUND ?= 1 # HARDWARE_VARIANT = "arduino", "Sanguino", "Gen7", ... # MCU = "atmega1280", "Mega2560", "atmega2560", "atmega644p", ... -#Gen7 -ifeq ($(HARDWARE_MOTHERBOARD),10) -HARDWARE_VARIANT ?= Gen7 -MCU ?= atmega644 -F_CPU ?= 20000000 -else ifeq ($(HARDWARE_MOTHERBOARD),11) -HARDWARE_VARIANT ?= Gen7 -MCU ?= atmega644p -F_CPU ?= 20000000 -else ifeq ($(HARDWARE_MOTHERBOARD),12) -HARDWARE_VARIANT ?= Gen7 -MCU ?= atmega644p -F_CPU ?= 20000000 -else ifeq ($(HARDWARE_MOTHERBOARD),13) -HARDWARE_VARIANT ?= Gen7 -MCU ?= atmega1284p -F_CPU ?= 20000000 +ifeq ($(HARDWARE_MOTHERBOARD),0) -#RAMPS -else ifeq ($(HARDWARE_MOTHERBOARD),3) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),33) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),34) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),35) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),36) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),38) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),43) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),44) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),45) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),46) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),48) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 + # No motherboard selected -#Gen6 -else ifeq ($(HARDWARE_MOTHERBOARD),5) -HARDWARE_VARIANT ?= Gen6 -MCU ?= atmega644p -else ifeq ($(HARDWARE_MOTHERBOARD),51) -HARDWARE_VARIANT ?= Gen6 -MCU ?= atmega644p +# +# RAMPS 1.3 / 1.4 - ATmega1280, ATmega2560 +# + +# MEGA/RAMPS up to 1.2 +else ifeq ($(HARDWARE_MOTHERBOARD),3) + +# RAMPS 1.3 (Power outputs: Hotend, Fan, Bed) +else ifeq ($(HARDWARE_MOTHERBOARD),33) +# RAMPS 1.3 (Power outputs: Hotend0, Hotend1, Bed) +else ifeq ($(HARDWARE_MOTHERBOARD),34) +# RAMPS 1.3 (Power outputs: Hotend, Fan0, Fan1) +else ifeq ($(HARDWARE_MOTHERBOARD),35) +# RAMPS 1.3 (Power outputs: Hotend0, Hotend1, Fan) +else ifeq ($(HARDWARE_MOTHERBOARD),36) +# RAMPS 1.3 (Power outputs: Spindle, Controller Fan) +else ifeq ($(HARDWARE_MOTHERBOARD),38) + +# RAMPS 1.4 (Power outputs: Hotend, Fan, Bed) +else ifeq ($(HARDWARE_MOTHERBOARD),43) +# RAMPS 1.4 (Power outputs: Hotend0, Hotend1, Bed) +else ifeq ($(HARDWARE_MOTHERBOARD),44) +# RAMPS 1.4 (Power outputs: Hotend, Fan0, Fan1) +else ifeq ($(HARDWARE_MOTHERBOARD),45) +# RAMPS 1.4 (Power outputs: Hotend0, Hotend1, Fan) +else ifeq ($(HARDWARE_MOTHERBOARD),46) +# RAMPS 1.4 (Power outputs: Spindle, Controller Fan) +else ifeq ($(HARDWARE_MOTHERBOARD),48) + +# RAMPS Plus 3DYMY (Power outputs: Hotend, Fan, Bed) +else ifeq ($(HARDWARE_MOTHERBOARD),143) +# RAMPS Plus 3DYMY (Power outputs: Hotend0, Hotend1, Bed) +else ifeq ($(HARDWARE_MOTHERBOARD),144) +# RAMPS Plus 3DYMY (Power outputs: Hotend, Fan0, Fan1) +else ifeq ($(HARDWARE_MOTHERBOARD),145) +# RAMPS Plus 3DYMY (Power outputs: Hotend0, Hotend1, Fan) +else ifeq ($(HARDWARE_MOTHERBOARD),146) +# RAMPS Plus 3DYMY (Power outputs: Spindle, Controller Fan) +else ifeq ($(HARDWARE_MOTHERBOARD),148) + +# +# RAMPS Derivatives - ATmega1280, ATmega2560 +# + +# 3Drag Controller +else ifeq ($(HARDWARE_MOTHERBOARD),77) +# Velleman K8200 Controller (derived from 3Drag Controller) +else ifeq ($(HARDWARE_MOTHERBOARD),78) +# Velleman K8400 Controller (derived from 3Drag Controller) +else ifeq ($(HARDWARE_MOTHERBOARD),79) +# 2PrintBeta BAM&DICE with STK drivers +else ifeq ($(HARDWARE_MOTHERBOARD),401) +# 2PrintBeta BAM&DICE Due with STK drivers +else ifeq ($(HARDWARE_MOTHERBOARD),402) +# MKS BASE v1.0 +else ifeq ($(HARDWARE_MOTHERBOARD),40) +# MKS v1.5 with Allegro A4982 stepper drivers +else ifeq ($(HARDWARE_MOTHERBOARD),405) +# MKS BASE 1.0 with Heroic HR4982 stepper drivers +else ifeq ($(HARDWARE_MOTHERBOARD),41) +# MKS GEN v1.3 or 1.4 +else ifeq ($(HARDWARE_MOTHERBOARD),47) +# MKS GEN L +else ifeq ($(HARDWARE_MOTHERBOARD),53) +# zrib V2.0 control board (Chinese knock off RAMPS replica) +else ifeq ($(HARDWARE_MOTHERBOARD),504) +# Felix 2.0+ Electronics Board (RAMPS like) +else ifeq ($(HARDWARE_MOTHERBOARD),37) +# Invent-A-Part RigidBoard +else ifeq ($(HARDWARE_MOTHERBOARD),42) +# Invent-A-Part RigidBoard V2 +else ifeq ($(HARDWARE_MOTHERBOARD),52) +# Sainsmart 2-in-1 board +else ifeq ($(HARDWARE_MOTHERBOARD),49) +# Ultimaker +else ifeq ($(HARDWARE_MOTHERBOARD),7) +# Ultimaker (Older electronics. Pre 1.5.4. This is rare) +else ifeq ($(HARDWARE_MOTHERBOARD),71) +MCU ?= atmega1280 +# Azteeg X3 +else ifeq ($(HARDWARE_MOTHERBOARD),67) +# Azteeg X3 Pro +else ifeq ($(HARDWARE_MOTHERBOARD),68) +# Ultimainboard 2.x (Uses TEMP_SENSOR 20) +else ifeq ($(HARDWARE_MOTHERBOARD),72) +# Rumba +else ifeq ($(HARDWARE_MOTHERBOARD),80) +# bq ZUM Mega 3D +else ifeq ($(HARDWARE_MOTHERBOARD),503) +# MakeBoard Mini v2.1.2 is a control board sold by MicroMake +else ifeq ($(HARDWARE_MOTHERBOARD),431) +# TriGorilla Anycubic version 1.3 based on RAMPS EFB +else ifeq ($(HARDWARE_MOTHERBOARD),343) +# TriGorilla Anycubic version 1.4 based on RAMPS EFB +else ifeq ($(HARDWARE_MOTHERBOARD),443) +# Creality: Ender-4, CR-8 +else ifeq ($(HARDWARE_MOTHERBOARD),243) + +# +# Other ATmega1280, ATmega2560 +# + +# Cartesio CN Controls V11 +else ifeq ($(HARDWARE_MOTHERBOARD),111) +# Cartesio CN Controls V12 +else ifeq ($(HARDWARE_MOTHERBOARD),112) +# Cheaptronic v1.0 +else ifeq ($(HARDWARE_MOTHERBOARD),2) +# Cheaptronic v2.0 +else ifeq ($(HARDWARE_MOTHERBOARD),21) +# Makerbot Mightyboard Revision E +else ifeq ($(HARDWARE_MOTHERBOARD),200) +# Megatronics +else ifeq ($(HARDWARE_MOTHERBOARD),70) +# Megatronics v2.0 +else ifeq ($(HARDWARE_MOTHERBOARD),701) +# Megatronics v3.0 +else ifeq ($(HARDWARE_MOTHERBOARD),703) +# Megatronics v3.1 +else ifeq ($(HARDWARE_MOTHERBOARD),704) +# Rambo +else ifeq ($(HARDWARE_MOTHERBOARD),301) +# Mini-Rambo +else ifeq ($(HARDWARE_MOTHERBOARD),302) +# Mini-Rambo 1.0a +else ifeq ($(HARDWARE_MOTHERBOARD),303) +# Einsy Rambo +else ifeq ($(HARDWARE_MOTHERBOARD),304) +# Einsy Retro +else ifeq ($(HARDWARE_MOTHERBOARD),305) +# Elefu Ra Board (v3) +else ifeq ($(HARDWARE_MOTHERBOARD),21) +# Leapfrog +else ifeq ($(HARDWARE_MOTHERBOARD),999) +# Mega controller +else ifeq ($(HARDWARE_MOTHERBOARD),310) +# abee Scoovo X9H +else ifeq ($(HARDWARE_MOTHERBOARD),321) +# Geeetech GT2560 Rev. A +else ifeq ($(HARDWARE_MOTHERBOARD),74) +# Geeetech GT2560 Rev. A+ (with auto level probe) +else ifeq ($(HARDWARE_MOTHERBOARD),75) + +# +# ATmega1281, ATmega2561 +# + +else ifeq ($(HARDWARE_MOTHERBOARD),702) +MCU ?= atmega1281 +else ifeq ($(HARDWARE_MOTHERBOARD),25) +MCU ?= atmega1281 -#Sanguinololu -else ifeq ($(HARDWARE_MOTHERBOARD),6) +# +# Sanguinololu and Derivatives - ATmega644P, ATmega1284P +# + +# Sanguinololu < 1.2 +else ifeq ($(HARDWARE_MOTHERBOARD),6) HARDWARE_VARIANT ?= Sanguino MCU ?= atmega644p -else ifeq ($(HARDWARE_MOTHERBOARD),62) +# Sanguinololu 1.2 and above +else ifeq ($(HARDWARE_MOTHERBOARD),62) HARDWARE_VARIANT ?= Sanguino MCU ?= atmega644p -else ifeq ($(HARDWARE_MOTHERBOARD),63) +# Melzi +else ifeq ($(HARDWARE_MOTHERBOARD),63) HARDWARE_VARIANT ?= Sanguino MCU ?= atmega644p -else ifeq ($(HARDWARE_MOTHERBOARD),65) +# Melzi with ATmega1284 (MaKr3d version) +else ifeq ($(HARDWARE_MOTHERBOARD),66) +HARDWARE_VARIANT ?= Sanguino +MCU ?= atmega1284p +# Melzi Creality3D board (for CR-10 etc) +else ifeq ($(HARDWARE_MOTHERBOARD),89) +HARDWARE_VARIANT ?= Sanguino +MCU ?= atmega1284p +# Melzi Malyan M150 board +else ifeq ($(HARDWARE_MOTHERBOARD),92) HARDWARE_VARIANT ?= Sanguino MCU ?= atmega1284p -else ifeq ($(HARDWARE_MOTHERBOARD),66) +# Tronxy X5S +else ifeq ($(HARDWARE_MOTHERBOARD),505) HARDWARE_VARIANT ?= Sanguino MCU ?= atmega1284p -else ifeq ($(HARDWARE_MOTHERBOARD),69) +# STB V1.1 +else ifeq ($(HARDWARE_MOTHERBOARD),64) HARDWARE_VARIANT ?= Sanguino MCU ?= atmega1284p -else ifeq ($(HARDWARE_MOTHERBOARD),601) +# Azteeg X1 +else ifeq ($(HARDWARE_MOTHERBOARD),65) +HARDWARE_VARIANT ?= Sanguino +MCU ?= atmega1284p +# Anet 1.0 (Melzi clone) +else ifeq ($(HARDWARE_MOTHERBOARD),69) HARDWARE_VARIANT ?= Sanguino MCU ?= atmega1284p -#Ultimaker -else ifeq ($(HARDWARE_MOTHERBOARD),7) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),71) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega1280 +# +# Other ATmega644P, ATmega644, ATmega1284P +# -#Teensylu -else ifeq ($(HARDWARE_MOTHERBOARD),8) +# Gen3 Monolithic Electronics +else ifeq ($(HARDWARE_MOTHERBOARD),22) +HARDWARE_VARIANT ?= Sanguino +MCU ?= atmega644p +# Gen3+ +else ifeq ($(HARDWARE_MOTHERBOARD),9) +HARDWARE_VARIANT ?= Sanguino +MCU ?= atmega644p +# Gen6 +else ifeq ($(HARDWARE_MOTHERBOARD),5) +HARDWARE_VARIANT ?= Gen6 +MCU ?= atmega644p +# Gen6 deluxe +else ifeq ($(HARDWARE_MOTHERBOARD),51) +HARDWARE_VARIANT ?= Gen6 +MCU ?= atmega644p +# Gen7 custom (Alfons3 Version) +else ifeq ($(HARDWARE_MOTHERBOARD),10) +HARDWARE_VARIANT ?= Gen7 +MCU ?= atmega644 +F_CPU ?= 20000000 +# Gen7 v1.1, v1.2 +else ifeq ($(HARDWARE_MOTHERBOARD),11) +HARDWARE_VARIANT ?= Gen7 +MCU ?= atmega644p +F_CPU ?= 20000000 +# Gen7 v1.3 +else ifeq ($(HARDWARE_MOTHERBOARD),12) +HARDWARE_VARIANT ?= Gen7 +MCU ?= atmega644p +F_CPU ?= 20000000 +# Gen7 v1.4 +else ifeq ($(HARDWARE_MOTHERBOARD),13) +HARDWARE_VARIANT ?= Gen7 +MCU ?= atmega1284p +F_CPU ?= 20000000 +# Alpha OMCA board +else ifeq ($(HARDWARE_MOTHERBOARD),90) +HARDWARE_VARIANT ?= SanguinoA +MCU ?= atmega644 +# Final OMCA board +else ifeq ($(HARDWARE_MOTHERBOARD),91) +HARDWARE_VARIANT ?= Sanguino +MCU ?= atmega644p +# Sethi 3D_1 +else ifeq ($(HARDWARE_MOTHERBOARD),20) +HARDWARE_VARIANT ?= Sanguino +MCU ?= atmega644p + +# +# Teensyduino - AT90USB1286, AT90USB1286P +# + +# Teensylu +else ifeq ($(HARDWARE_MOTHERBOARD),8) HARDWARE_VARIANT ?= Teensy MCU ?= at90usb1286 -else ifeq ($(HARDWARE_MOTHERBOARD),81) +# Printrboard (AT90USB1286) +else ifeq ($(HARDWARE_MOTHERBOARD),81) HARDWARE_VARIANT ?= Teensy MCU ?= at90usb1286 -else ifeq ($(HARDWARE_MOTHERBOARD),811) +# Printrboard Revision F (AT90USB1286) +else ifeq ($(HARDWARE_MOTHERBOARD),811) HARDWARE_VARIANT ?= Teensy MCU ?= at90usb1286 -else ifeq ($(HARDWARE_MOTHERBOARD),82) +# Brainwave (AT90USB646) +else ifeq ($(HARDWARE_MOTHERBOARD),82) HARDWARE_VARIANT ?= Teensy MCU ?= at90usb646 -else ifeq ($(HARDWARE_MOTHERBOARD),83) +# Brainwave Pro (AT90USB1286) +else ifeq ($(HARDWARE_MOTHERBOARD),83) HARDWARE_VARIANT ?= Teensy MCU ?= at90usb1286 -else ifeq ($(HARDWARE_MOTHERBOARD),84) +# SAV Mk-I (AT90USB1286) +else ifeq ($(HARDWARE_MOTHERBOARD),84) +HARDWARE_VARIANT ?= Teensy +MCU ?= at90usb1286 +# Teensy++2.0 (AT90USB1286) - CLI compile: HARDWARE_MOTHERBOARD=84 make +else ifeq ($(HARDWARE_MOTHERBOARD),85) +HARDWARE_VARIANT ?= Teensy +MCU ?= at90usb1286 +# 5DPrint D8 Driver Board +else ifeq ($(HARDWARE_MOTHERBOARD),88) HARDWARE_VARIANT ?= Teensy MCU ?= at90usb1286 - -#Gen3+ -else ifeq ($(HARDWARE_MOTHERBOARD),9) -HARDWARE_VARIANT ?= Sanguino -MCU ?= atmega644p - -#Gen3 Monolithic Electronics -else ifeq ($(HARDWARE_MOTHERBOARD),22) -HARDWARE_VARIANT ?= Sanguino -MCU ?= atmega644p - -#Megatronics -else ifeq ($(HARDWARE_MOTHERBOARD),70) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 - -#Alpha OMCA board -else ifeq ($(HARDWARE_MOTHERBOARD),90) -HARDWARE_VARIANT ?= SanguinoA -MCU ?= atmega644 - -#Final OMCA board -else ifeq ($(HARDWARE_MOTHERBOARD),91) -HARDWARE_VARIANT ?= Sanguino -MCU ?= atmega644p - -#Rambo -else ifeq ($(HARDWARE_MOTHERBOARD),301) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 - -# Azteeg -else ifeq ($(HARDWARE_MOTHERBOARD),67) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),68) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 endif @@ -253,6 +394,10 @@ endif # Set to 16Mhz if not yet set. F_CPU ?= 16000000 +# Set to arduino, ATmega2560 if not yet set. +HARDWARE_VARIANT ?= arduino +MCU ?= atmega2560 + # Arduino contained the main source code for the Arduino # Libraries, the "hardware variant" are for boards # that derives from that, and their source are present in diff --git a/Marlin/Marlin.h b/Marlin/Marlin.h index c8e79288a4..aadbbdaf24 100644 --- a/Marlin/Marlin.h +++ b/Marlin/Marlin.h @@ -50,7 +50,7 @@ void idle( #endif ); -void manage_inactivity(bool ignore_stepper_queue = false); +void manage_inactivity(const bool ignore_stepper_queue=false); extern const char axis_codes[XYZE]; @@ -197,18 +197,22 @@ bool enqueue_and_echo_command(const char* cmd, bool say_ok=false); // Add a sing void enqueue_and_echo_commands_P(const char * const cmd); // Set one or more commands to be prioritized over the next Serial/SD command. void clear_command_queue(); -#define HAS_LCD_QUEUE_NOW (ENABLED(ULTIPANEL) && (ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(PID_AUTOTUNE_MENU) || ENABLED(ADVANCED_PAUSE_FEATURE))) +#if ENABLED(M100_FREE_MEMORY_WATCHER) || ENABLED(POWER_LOSS_RECOVERY) + extern char command_queue[BUFSIZE][MAX_CMD_SIZE]; +#endif + +#define HAS_LCD_QUEUE_NOW (ENABLED(MALYAN_LCD) || (ENABLED(ULTIPANEL) && (ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(PID_AUTOTUNE_MENU) || ENABLED(ADVANCED_PAUSE_FEATURE)))) #define HAS_QUEUE_NOW (ENABLED(SDSUPPORT) || HAS_LCD_QUEUE_NOW) #if HAS_QUEUE_NOW // Return only when commands are actually enqueued - void enqueue_and_echo_command_now(const char* cmd, bool say_ok=false); + void enqueue_and_echo_command_now(const char* cmd); #if HAS_LCD_QUEUE_NOW - void enqueue_and_echo_commands_P_now(const char * const cmd); + void enqueue_and_echo_commands_now_P(const char * const cmd); #endif #endif -extern millis_t previous_cmd_ms; -inline void refresh_cmd_timeout() { previous_cmd_ms = millis(); } +extern millis_t previous_move_ms; +inline void reset_stepper_timeout() { previous_move_ms = millis(); } /** * Feedrate scaling and conversion @@ -227,7 +231,7 @@ extern volatile bool wait_for_heatup; extern volatile bool wait_for_user; #endif -#if HAS_AUTO_REPORTING +#if HAS_AUTO_REPORTING || ENABLED(HOST_KEEPALIVE_FEATURE) extern bool suspend_auto_report; #endif @@ -384,11 +388,16 @@ void report_current_position(); #if HAS_BED_PROBE extern float zprobe_zoffset; bool set_probe_deployed(const bool deploy); - #ifdef Z_AFTER_PROBING + #if Z_AFTER_PROBING void move_z_after_probing(); - #else - inline void move_z_after_probing() {} #endif + enum ProbePtRaise : unsigned char { + PROBE_PT_NONE, // No raise or stow after run_z_probe + PROBE_PT_STOW, // Do a complete stow after run_z_probe + PROBE_PT_RAISE, // Raise to "between" clearance after run_z_probe + PROBE_PT_BIG_RAISE // Raise to big clearance after run_z_probe + }; + float probe_pt(const float &rx, const float &ry, const ProbePtRaise raise_after=PROBE_PT_NONE, const uint8_t verbose_level=0, const bool probe_relative=true); #define DEPLOY_PROBE() set_probe_deployed(true) #define STOW_PROBE() set_probe_deployed(false) #else diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index e662fde49a..dffb63ff42 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -206,7 +206,7 @@ * M600 - Pause for filament change: "M600 X Y Z E L". (Requires ADVANCED_PAUSE_FEATURE) * M603 - Configure filament change: "M603 T U L". (Requires ADVANCED_PAUSE_FEATURE) * M605 - Set Dual X-Carriage movement mode: "M605 S [X] [R]". (Requires DUAL_X_CARRIAGE) - * M665 - Set delta configurations: "M665 L R S A B C I J K" (Requires DELTA) + * M665 - Set delta configurations: "M665 H L R S B X Y Z (Requires DELTA) * M666 - Set/get endstop offsets for delta (Requires DELTA) or dual endstops (Requires [XYZ]_DUAL_ENDSTOPS). * M701 - Load filament (requires FILAMENT_LOAD_UNLOAD_GCODES) * M702 - Unload filament (requires FILAMENT_LOAD_UNLOAD_GCODES) @@ -288,6 +288,10 @@ #include "fwretract.h" #endif +#if ENABLED(POWER_LOSS_RECOVERY) + #include "power_loss_recovery.h" +#endif + #if ENABLED(FILAMENT_RUNOUT_SENSOR) #include "runout.h" #endif @@ -415,14 +419,11 @@ static long gcode_N, gcode_LastN, Stopped_gcode_LastN = 0; * the main loop. The process_next_command function parses the next * command and hands off execution to individual handler functions. */ -uint8_t commands_in_queue = 0; // Count of commands in the queue -static uint8_t cmd_queue_index_r = 0, // Ring buffer read position - cmd_queue_index_w = 0; // Ring buffer write position -#if ENABLED(M100_FREE_MEMORY_WATCHER) - char command_queue[BUFSIZE][MAX_CMD_SIZE]; // Necessary so M100 Free Memory Dumper can show us the commands and any corruption -#else // This can be collapsed back to the way it was soon. -static char command_queue[BUFSIZE][MAX_CMD_SIZE]; -#endif +uint8_t commands_in_queue = 0, // Count of commands in the queue + cmd_queue_index_r = 0, // Ring buffer read (out) position + cmd_queue_index_w = 0; // Ring buffer write (in) position + +char command_queue[BUFSIZE][MAX_CMD_SIZE]; /** * Next Injected Command pointer. NULL if no commands are being injected. @@ -489,41 +490,41 @@ float soft_endstop_min[XYZ] = { X_MIN_BED, Y_MIN_BED, Z_MIN_POS }, new_fanSpeeds[FAN_COUNT]; #endif #if ENABLED(PROBING_FANS_OFF) - bool fans_paused = false; + bool fans_paused; // = false; int16_t paused_fanSpeeds[FAN_COUNT] = { 0 }; #endif #endif #if ENABLED(USE_CONTROLLER_FAN) - int controllerFanSpeed = 0; + int controllerFanSpeed; // = 0; #endif // The active extruder (tool). Set with T command. -uint8_t active_extruder = 0; +uint8_t active_extruder; // = 0; // Relative Mode. Enable with G91, disable with G90. -static bool relative_mode = false; +static bool relative_mode; // = false; // For M109 and M190, this flag may be cleared (by M108) to exit the wait loop volatile bool wait_for_heatup = true; // For M0/M1, this flag may be cleared (by M108) to exit the wait-for-user loop #if HAS_RESUME_CONTINUE - volatile bool wait_for_user = false; + volatile bool wait_for_user; // = false; #endif -#if HAS_AUTO_REPORTING +#if HAS_AUTO_REPORTING || ENABLED(HOST_KEEPALIVE_FEATURE) bool suspend_auto_report; // = false #endif const char axis_codes[XYZE] = { 'X', 'Y', 'Z', 'E' }; // Number of characters read in the current line of serial input -static int serial_count = 0; +static int serial_count; // = 0; // Inactivity shutdown -millis_t previous_cmd_ms = 0; -static millis_t max_inactive_time = 0; +millis_t previous_move_ms; // = 0; +static millis_t max_inactive_time; // = 0; static millis_t stepper_inactive_time = (DEFAULT_STEPPER_DEACTIVE_TIME) * 1000UL; // Buzzer - I2C on the LCD or a BEEPER_PIN @@ -536,6 +537,10 @@ static millis_t stepper_inactive_time = (DEFAULT_STEPPER_DEACTIVE_TIME) * 1000UL #define BUZZ(d,f) NOOP #endif +#if ENABLED(SWITCHING_NOZZLE) + #define DO_SWITCH_EXTRUDER (SWITCHING_EXTRUDER_SERVO_NR != SWITCHING_NOZZLE_SERVO_NR) +#endif + uint8_t target_extruder; #if HAS_BED_PROBE @@ -567,12 +572,16 @@ uint8_t target_extruder; #define ADJUST_DELTA(V) NOOP #endif +#if HAS_TEMP_BED && ENABLED(WAIT_FOR_BED_HEATER) + const static char msg_wait_for_bed_heating[] PROGMEM = "Wait for bed heating...\n"; +#endif + // Extruder offsets #if HOTENDS > 1 float hotend_offset[XYZ][HOTENDS]; // Initialized by settings.load() #endif -#if HAS_Z_SERVO_ENDSTOP +#if HAS_Z_SERVO_PROBE const int z_servo_angle[2] = Z_SERVO_ANGLES; #endif @@ -582,13 +591,13 @@ uint8_t target_extruder; #endif #if HAS_POWER_SWITCH - bool powersupply_on = + bool powersupply_on = ( #if ENABLED(PS_DEFAULT_OFF) false #else true #endif - ; + ); #if ENABLED(AUTO_POWER_CONTROL) #define PSU_ON() powerManager.power_on() #define PSU_OFF() powerManager.power_off() @@ -650,7 +659,7 @@ uint8_t target_extruder; float cartes[XYZ] = { 0 }; #if ENABLED(FILAMENT_WIDTH_SENSOR) - bool filament_sensor = false; // M405 turns on filament sensor control. M406 turns it off. + bool filament_sensor; // = false; // M405 turns on filament sensor control. M406 turns it off. float filament_width_nominal = DEFAULT_NOMINAL_FILAMENT_DIA, // Nominal filament width. Change with M404. filament_width_meas = DEFAULT_MEASURED_FILAMENT_DIA; // Measured filament diameter uint8_t meas_delay_cm = MEASUREMENT_DELAY_CM; // Distance delay setting @@ -676,9 +685,9 @@ static bool send_ok[BUFSIZE]; #if HAS_SERVOS Servo servo[NUM_SERVOS]; #define MOVE_SERVO(I, P) servo[I].move(P) - #if HAS_Z_SERVO_ENDSTOP - #define DEPLOY_Z_SERVO() MOVE_SERVO(Z_ENDSTOP_SERVO_NR, z_servo_angle[0]) - #define STOW_Z_SERVO() MOVE_SERVO(Z_ENDSTOP_SERVO_NR, z_servo_angle[1]) + #if HAS_Z_SERVO_PROBE + #define DEPLOY_Z_SERVO() MOVE_SERVO(Z_PROBE_SERVO_NR, z_servo_angle[0]) + #define STOW_Z_SERVO() MOVE_SERVO(Z_PROBE_SERVO_NR, z_servo_angle[1]) #endif #endif @@ -893,11 +902,11 @@ bool enqueue_and_echo_command(const char* cmd, bool say_ok/*=false*/) { } #if HAS_QUEUE_NOW - void enqueue_and_echo_command_now(const char* cmd, bool say_ok/*=false*/) { - while (!enqueue_and_echo_command(cmd, say_ok)) idle(); + void enqueue_and_echo_command_now(const char* cmd) { + while (!enqueue_and_echo_command(cmd)) idle(); } #if HAS_LCD_QUEUE_NOW - void enqueue_and_echo_commands_P_now(const char * const pgcode) { + void enqueue_and_echo_commands_now_P(const char * const pgcode) { enqueue_and_echo_commands_P(pgcode); while (drain_injected_commands_P()) idle(); } @@ -947,7 +956,7 @@ void servo_init() { servo[3].detach(); #endif - #if HAS_Z_SERVO_ENDSTOP + #if HAS_Z_SERVO_PROBE /** * Set position of Z Servo Endstop * @@ -1070,6 +1079,12 @@ inline void get_serial_commands() { gcode_LastN = gcode_N; } + #if ENABLED(SDSUPPORT) + else if (card.saving) { + gcode_line_error(PSTR(MSG_ERR_NO_CHECKSUM)); + return; + } + #endif // Movement commands alert when stopped if (IsStopped()) { @@ -1126,6 +1141,10 @@ inline void get_serial_commands() { #if ENABLED(SDSUPPORT) + #if ENABLED(PRINTER_EVENT_LEDS) && HAS_RESUME_CONTINUE + static bool lights_off_after_print; // = false + #endif + /** * Get commands from the SD Card until the command buffer is full * or until the end of the file is reached. The special character '#' @@ -1168,12 +1187,19 @@ inline void get_serial_commands() { LCD_MESSAGEPGM(MSG_INFO_COMPLETED_PRINTS); leds.set_green(); #if HAS_RESUME_CONTINUE - enqueue_and_echo_commands_P(PSTR("M0")); // end of the queue! + lights_off_after_print = true; + enqueue_and_echo_commands_P(PSTR("M0 S" + #if ENABLED(NEWPANEL) + "1800" + #else + "60" + #endif + )); #else - safe_delay(1000); + safe_delay(2000); + leds.set_off(); #endif - leds.set_off(); - #endif + #endif // PRINTER_EVENT_LEDS card.checkautostart(true); } } @@ -1206,21 +1232,43 @@ inline void get_serial_commands() { } } + #if ENABLED(POWER_LOSS_RECOVERY) + + inline bool drain_job_recovery_commands() { + static uint8_t job_recovery_commands_index = 0; // Resets on reboot + if (job_recovery_commands_count) { + if (_enqueuecommand(job_recovery_commands[job_recovery_commands_index])) { + ++job_recovery_commands_index; + if (!--job_recovery_commands_count) job_recovery_phase = JOB_RECOVERY_IDLE; + } + return true; + } + return false; + } + + #endif + #endif // SDSUPPORT /** * Add to the circular command queue the next command from: * - The command-injection queue (injected_commands_P) * - The active serial input (usually USB) + * - Commands left in the queue after power-loss * - The SD card file being actively printed */ void get_available_commands() { - // if any immediate commands remain, don't get other commands yet + // Immediate commands block the other queues if (drain_injected_commands_P()) return; get_serial_commands(); + #if ENABLED(POWER_LOSS_RECOVERY) + // Commands for power-loss recovery take precedence + if (job_recovery_phase == JOB_RECOVERY_YES && drain_job_recovery_commands()) return; + #endif + #if ENABLED(SDSUPPORT) get_sdcard_commands(); #endif @@ -1539,8 +1587,6 @@ inline void buffer_line_to_destination(const float &fr_mm_s) { if (DEBUGGING(LEVELING)) DEBUG_POS("prepare_uninterpolated_move_to_destination", destination); #endif - refresh_cmd_timeout(); - #if UBL_SEGMENTED // ubl segmented line will do z-only moves in single segment ubl.prepare_segmented_line_to(destination, MMS_SCALED(fr_mm_s ? fr_mm_s : feedrate_mm_s)); @@ -1698,23 +1744,21 @@ void do_blocking_move_to_xy(const float &rx, const float &ry, const float &fr_mm // - Reset the command timeout // - Enable the endstops (for endstop moves) // -static void setup_for_endstop_or_probe_move() { +void setup_for_endstop_or_probe_move() { #if ENABLED(DEBUG_LEVELING_FEATURE) if (DEBUGGING(LEVELING)) DEBUG_POS("setup_for_endstop_or_probe_move", current_position); #endif saved_feedrate_mm_s = feedrate_mm_s; saved_feedrate_percentage = feedrate_percentage; feedrate_percentage = 100; - refresh_cmd_timeout(); } -static void clean_up_after_endstop_or_probe_move() { +void clean_up_after_endstop_or_probe_move() { #if ENABLED(DEBUG_LEVELING_FEATURE) if (DEBUGGING(LEVELING)) DEBUG_POS("clean_up_after_endstop_or_probe_move", current_position); #endif feedrate_mm_s = saved_feedrate_mm_s; feedrate_percentage = saved_feedrate_percentage; - refresh_cmd_timeout(); } #if HAS_AXIS_UNHOMED_ERR @@ -2000,7 +2044,7 @@ static void clean_up_after_endstop_or_probe_move() { #if ENABLED(BLTOUCH) void bltouch_command(int angle) { - MOVE_SERVO(Z_ENDSTOP_SERVO_NR, angle); // Give the BL-Touch the command and wait + MOVE_SERVO(Z_PROBE_SERVO_NR, angle); // Give the BL-Touch the command and wait safe_delay(BLTOUCH_DELAY); } @@ -2125,9 +2169,9 @@ static void clean_up_after_endstop_or_probe_move() { dock_sled(!deploy); - #elif HAS_Z_SERVO_ENDSTOP && DISABLED(BLTOUCH) + #elif HAS_Z_SERVO_PROBE && DISABLED(BLTOUCH) - MOVE_SERVO(Z_ENDSTOP_SERVO_NR, z_servo_angle[deploy ? 0 : 1]); + MOVE_SERVO(Z_PROBE_SERVO_NR, z_servo_angle[deploy ? 0 : 1]); #elif ENABLED(Z_PROBE_ALLEN_KEY) @@ -2169,6 +2213,16 @@ static void clean_up_after_endstop_or_probe_move() { if (DEBUGGING(LEVELING)) DEBUG_POS(">>> do_probe_move", current_position); #endif + #if HAS_TEMP_BED && ENABLED(WAIT_FOR_BED_HEATER) + // Wait for bed to heat back up between probing points + if (thermalManager.isHeatingBed()) { + serialprintPGM(msg_wait_for_bed_heating); + LCD_MESSAGEPGM(MSG_BED_HEATING); + while (thermalManager.isHeatingBed()) safe_delay(200); + lcd_reset_status(); + } + #endif + // Deploy BLTouch at the start of any probe #if ENABLED(BLTOUCH) if (set_bltouch_deployed(true)) return true; @@ -2227,14 +2281,15 @@ static void clean_up_after_endstop_or_probe_move() { if (DEBUGGING(LEVELING)) DEBUG_POS(">>> run_z_probe", current_position); #endif - // Prevent stepper_inactive_time from running out and EXTRUDER_RUNOUT_PREVENT from extruding - refresh_cmd_timeout(); + // Stop the probe before it goes too low to prevent damage. + // If Z isn't known then probe to -10mm. + const float z_probe_low_point = axis_known_position[Z_AXIS] ? -zprobe_zoffset + Z_PROBE_LOW_POINT : -10.0; // Double-probing does a fast probe followed by a slow probe #if MULTIPLE_PROBING == 2 // Do a first probe at the fast speed - if (do_probe_move(-10, Z_PROBE_SPEED_FAST)) return NAN; + if (do_probe_move(z_probe_low_point, Z_PROBE_SPEED_FAST)) return NAN; float first_probe_z = current_position[Z_AXIS]; @@ -2265,7 +2320,7 @@ static void clean_up_after_endstop_or_probe_move() { #endif // move down slowly to find bed - if (do_probe_move(-10, Z_PROBE_SPEED_SLOW)) return NAN; + if (do_probe_move(z_probe_low_point, Z_PROBE_SPEED_SLOW)) return NAN; #if MULTIPLE_PROBING > 2 probes_total += current_position[Z_AXIS]; @@ -2313,13 +2368,15 @@ static void clean_up_after_endstop_or_probe_move() { * - Raise to the BETWEEN height * - Return the probed Z position */ - float probe_pt(const float &rx, const float &ry, const bool stow, const uint8_t verbose_level, const bool probe_relative=true) { + float probe_pt(const float &rx, const float &ry, const ProbePtRaise raise_after/*=PROBE_PT_NONE*/, const uint8_t verbose_level/*=0*/, const bool probe_relative/*=true*/) { #if ENABLED(DEBUG_LEVELING_FEATURE) if (DEBUGGING(LEVELING)) { SERIAL_ECHOPAIR(">>> probe_pt(", LOGICAL_X_POSITION(rx)); SERIAL_ECHOPAIR(", ", LOGICAL_Y_POSITION(ry)); - SERIAL_ECHOPAIR(", ", stow ? "" : "no "); - SERIAL_ECHOLNPGM("stow)"); + SERIAL_ECHOPAIR(", ", raise_after == PROBE_PT_RAISE ? "raise" : raise_after == PROBE_PT_STOW ? "stow" : "none"); + SERIAL_ECHOPAIR(", ", int(verbose_level)); + SERIAL_ECHOPAIR(", ", probe_relative ? "probe" : "nozzle"); + SERIAL_ECHOLNPGM("_relative)"); DEBUG_POS("", current_position); } #endif @@ -2352,9 +2409,10 @@ static void clean_up_after_endstop_or_probe_move() { if (!DEPLOY_PROBE()) { measured_z = run_z_probe() + zprobe_zoffset; - if (!stow) - do_blocking_move_to_z(current_position[Z_AXIS] + Z_CLEARANCE_BETWEEN_PROBES, MMM_TO_MMS(Z_PROBE_SPEED_FAST)); - else + const bool big_raise = raise_after == PROBE_PT_BIG_RAISE; + if (big_raise || raise_after == PROBE_PT_RAISE) + do_blocking_move_to_z(current_position[Z_AXIS] + (big_raise ? 25 : Z_CLEARANCE_BETWEEN_PROBES), MMM_TO_MMS(Z_PROBE_SPEED_FAST)); + else if (raise_after == PROBE_PT_STOW) if (STOW_PROBE()) measured_z = NAN; } @@ -2440,7 +2498,21 @@ static void clean_up_after_endstop_or_probe_move() { planner.unapply_leveling(current_position); } #else - planner.leveling_active = enable; // just flip the bit, current_position will be wrong until next move. + // UBL equivalents for apply/unapply_leveling + #if ENABLED(SKEW_CORRECTION) + float pos[XYZ] = { current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS] }; + planner.skew(pos[X_AXIS], pos[Y_AXIS], pos[Z_AXIS]); + #else + const float (&pos)[XYZE] = current_position; + #endif + if (planner.leveling_active) { + current_position[Z_AXIS] += ubl.get_z_correction(pos[X_AXIS], pos[Y_AXIS]); + planner.leveling_active = false; + } + else { + planner.leveling_active = true; + current_position[Z_AXIS] -= ubl.get_z_correction(pos[X_AXIS], pos[Y_AXIS]); + } #endif #else // ABL @@ -2479,30 +2551,16 @@ static void clean_up_after_endstop_or_probe_move() { void set_z_fade_height(const float zfh, const bool do_report/*=true*/) { - if (planner.z_fade_height == zfh) return; // do nothing if no change + if (planner.z_fade_height == zfh) return; - const bool level_active = planner.leveling_active; - - #if ENABLED(AUTO_BED_LEVELING_UBL) - if (level_active) set_bed_leveling_enabled(false); // turn off before changing fade height for proper apply/unapply leveling to maintain current_position - #endif + const bool leveling_was_active = planner.leveling_active; + set_bed_leveling_enabled(false); planner.set_z_fade_height(zfh); - if (level_active) { + if (leveling_was_active) { const float oldpos[] = { current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS] }; - #if ENABLED(AUTO_BED_LEVELING_UBL) - set_bed_leveling_enabled(true); // turn back on after changing fade height - #else - set_current_from_steppers_for_axis( - #if ABL_PLANAR - ALL_AXES - #else - Z_AXIS - #endif - ); - SYNC_PLAN_POSITION_KINEMATIC(); - #endif + set_bed_leveling_enabled(true); if (do_report && memcmp(oldpos, current_position, sizeof(oldpos))) report_current_position(); } @@ -2878,20 +2936,43 @@ static void do_homing_move(const AxisEnum axis, const float distance, const floa SERIAL_EOL(); } #endif - - #if HOMING_Z_WITH_PROBE && ENABLED(BLTOUCH) - const bool deploy_bltouch = (axis == Z_AXIS && distance < 0); - if (deploy_bltouch) set_bltouch_deployed(true); + + #if HOMING_Z_WITH_PROBE && HAS_TEMP_BED && ENABLED(WAIT_FOR_BED_HEATER) + // Wait for bed to heat back up between probing points + if (axis == Z_AXIS && distance < 0 && thermalManager.isHeatingBed()) { + serialprintPGM(msg_wait_for_bed_heating); + LCD_MESSAGEPGM(MSG_BED_HEATING); + while (thermalManager.isHeatingBed()) safe_delay(200); + lcd_reset_status(); + } #endif - #if QUIET_PROBING - if (axis == Z_AXIS) probing_pause(true); - #endif + // Only do some things when moving towards an endstop + const int8_t axis_home_dir = + #if ENABLED(DUAL_X_CARRIAGE) + (axis == X_AXIS) ? x_home_dir(active_extruder) : + #endif + home_dir(axis); + const bool is_home_dir = (axis_home_dir > 0) == (distance > 0); - // Disable stealthChop if used. Enable diag1 pin on driver. - #if ENABLED(SENSORLESS_HOMING) - sensorless_homing_per_axis(axis); - #endif + if (is_home_dir) { + + if (axis == Z_AXIS) { + #if HOMING_Z_WITH_PROBE + #if ENABLED(BLTOUCH) + set_bltouch_deployed(true); + #endif + #if QUIET_PROBING + probing_pause(true); + #endif + #endif + } + + // Disable stealthChop if used. Enable diag1 pin on driver. + #if ENABLED(SENSORLESS_HOMING) + sensorless_homing_per_axis(axis); + #endif + } // Tell the planner the axis is at 0 current_position[axis] = 0; @@ -2909,20 +2990,26 @@ static void do_homing_move(const AxisEnum axis, const float distance, const floa stepper.synchronize(); - #if QUIET_PROBING - if (axis == Z_AXIS) probing_pause(false); - #endif + if (is_home_dir) { - #if HOMING_Z_WITH_PROBE && ENABLED(BLTOUCH) - if (deploy_bltouch) set_bltouch_deployed(false); - #endif + if (axis == Z_AXIS) { + #if HOMING_Z_WITH_PROBE + #if QUIET_PROBING + probing_pause(false); + #endif + #if ENABLED(BLTOUCH) + set_bltouch_deployed(false); + #endif + #endif + } - endstops.hit_on_purpose(); + endstops.hit_on_purpose(); - // Re-enable stealthChop if used. Disable diag1 pin on driver. - #if ENABLED(SENSORLESS_HOMING) - sensorless_homing_per_axis(axis, false); - #endif + // Re-enable stealthChop if used. Disable diag1 pin on driver. + #if ENABLED(SENSORLESS_HOMING) + sensorless_homing_per_axis(axis, false); + #endif + } #if ENABLED(DEBUG_LEVELING_FEATURE) if (DEBUGGING(LEVELING)) { @@ -3064,12 +3151,12 @@ static void homeaxis(const AxisEnum axis) { // so here it re-homes each tower in turn. // Delta homing treats the axes as normal linear axes. - // retrace by the amount specified in delta_endstop_adj + additional 0.1mm in order to have minimum steps + // retrace by the amount specified in delta_endstop_adj + additional dist in order to have minimum steps if (delta_endstop_adj[axis] * Z_HOME_DIR <= 0) { #if ENABLED(DEBUG_LEVELING_FEATURE) if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("delta_endstop_adj:"); #endif - do_homing_move(axis, delta_endstop_adj[axis] - 0.1 * Z_HOME_DIR); + do_homing_move(axis, delta_endstop_adj[axis] - (MIN_STEPS_PER_SEGMENT + 1) * planner.steps_to_mm[axis] * Z_HOME_DIR); } #else @@ -3193,7 +3280,7 @@ void gcode_get_destination() { */ void host_keepalive() { const millis_t ms = millis(); - if (host_keepalive_interval && busy_state != NOT_BUSY) { + if (!suspend_auto_report && host_keepalive_interval && busy_state != NOT_BUSY) { if (PENDING(ms, next_busy_signal_ms)) return; switch (busy_state) { case IN_HANDLER: @@ -3263,7 +3350,7 @@ inline void gcode_G0_G1( #if ENABLED(NANODLP_Z_SYNC) #if ENABLED(NANODLP_ALL_AXIS) - #define _MOVE_SYNC true // For any move wait and output sync message + #define _MOVE_SYNC parser.seenval('X') || parser.seenval('Y') || parser.seenval('Z') // For any move wait and output sync message #else #define _MOVE_SYNC parser.seenval('Z') // Only for Z move #endif @@ -3358,7 +3445,6 @@ inline void gcode_G0_G1( // Send the arc to the planner plan_arc(destination, arc_offset, clockwise); - refresh_cmd_timeout(); } else { // Bad arguments @@ -3371,8 +3457,7 @@ inline void gcode_G0_G1( #endif // ARC_SUPPORT void dwell(millis_t time) { - refresh_cmd_timeout(); - time += previous_cmd_ms; + time += millis(); while (PENDING(millis(), time)) idle(); } @@ -3530,15 +3615,18 @@ inline void gcode_G4() { } /** - * In CNC G-code G53 is like a modifier + * G53: Apply native workspace to the current move + * + * In CNC G-code G53 is a modifier. * It precedes a movement command (or other modifiers) on the same line. * This is the first command to use parser.chain() to make this possible. + * + * Marlin also uses G53 on a line by itself to go back to native space. */ inline void gcode_G53() { - // If this command has more following... - if (parser.chain()) { - const int8_t _system = active_coordinate_system; - active_coordinate_system = -1; + const int8_t _system = active_coordinate_system; + active_coordinate_system = -1; + if (parser.chain()) { // If this command has more following... process_parsed_command(); active_coordinate_system = _system; } @@ -3625,7 +3713,6 @@ inline void gcode_G4() { #if ENABLED(SENSORLESS_HOMING) sensorless_homing_per_axis(X_AXIS, false); sensorless_homing_per_axis(Y_AXIS, false); - safe_delay(500); // Short delay needed to settle #endif } @@ -3652,7 +3739,7 @@ inline void gcode_G4() { SERIAL_ECHOLNPGM("FIX_MOUNTED_PROBE"); #elif ENABLED(BLTOUCH) SERIAL_ECHOLNPGM("BLTOUCH"); - #elif HAS_Z_SERVO_ENDSTOP + #elif HAS_Z_SERVO_PROBE SERIAL_ECHOLNPGM("SERVO PROBE"); #elif ENABLED(Z_PROBE_SLED) SERIAL_ECHOLNPGM("Z_PROBE_SLED"); @@ -3807,15 +3894,17 @@ inline void gcode_G4() { buffer_line_to_current_position(); stepper.synchronize(); + // Re-enable stealthChop if used. Disable diag1 pin on driver. + #if ENABLED(SENSORLESS_HOMING) + delta_sensorless_homing(false); + #endif + // If an endstop was not hit, then damage can occur if homing is continued. // This can occur if the delta height not set correctly. if (!(Endstops::endstop_hit_bits & (_BV(X_MAX) | _BV(Y_MAX) | _BV(Z_MAX)))) { LCD_MESSAGEPGM(MSG_ERR_HOMING_FAILED); SERIAL_ERROR_START(); SERIAL_ERRORLNPGM(MSG_ERR_HOMING_FAILED); - #if ENABLED(SENSORLESS_HOMING) - delta_sensorless_homing(false); - #endif return false; } @@ -3827,11 +3916,6 @@ inline void gcode_G4() { HOMEAXIS(B); HOMEAXIS(C); - // Re-enable stealthChop if used. Disable diag1 pin on driver. - #if ENABLED(SENSORLESS_HOMING) - delta_sensorless_homing(false); - #endif - // Set all carriages to their home positions // Do this here all at once for Delta, because // XYZ isn't ABC. Applying this per-tower would @@ -3849,7 +3933,7 @@ inline void gcode_G4() { #endif // DELTA -#ifdef Z_AFTER_PROBING +#if Z_AFTER_PROBING void move_z_after_probing() { if (current_position[Z_AXIS] != Z_AFTER_PROBING) { do_blocking_move_to_z(Z_AFTER_PROBING); @@ -3933,6 +4017,8 @@ inline void gcode_G4() { * None Home to all axes with no parameters. * With QUICK_HOME enabled XY will home together, then Z. * + * Rn Raise by n mm/inches before homing + * * Cartesian parameters * * X Home to the X endstop @@ -3960,7 +4046,7 @@ inline void gcode_G28(const bool always_home_all) { // Disable the leveling matrix before homing #if HAS_LEVELING #if ENABLED(RESTORE_LEVELING_AFTER_G28) - const bool leveling_state_at_entry = planner.leveling_active; + const bool leveling_was_active = planner.leveling_active; #endif set_bed_leveling_enabled(false); #endif @@ -4007,11 +4093,12 @@ inline void gcode_G28(const bool always_home_all) { #endif - #if ENABLED(UNKNOWN_Z_NO_RAISE) - const float z_homing_height = axis_known_position[Z_AXIS] ? Z_HOMING_HEIGHT : 0; - #else - constexpr float z_homing_height = Z_HOMING_HEIGHT; - #endif + const float z_homing_height = ( + #if ENABLED(UNKNOWN_Z_NO_RAISE) + !axis_known_position[Z_AXIS] ? 0 : + #endif + (parser.seenval('R') ? parser.value_linear_units() : Z_HOMING_HEIGHT) + ); if (z_homing_height && (home_all || homeX || homeY)) { // Raise Z before homing any other axes and z is not already high enough (never lower z) @@ -4090,7 +4177,7 @@ inline void gcode_G28(const bool always_home_all) { HOMEAXIS(Z); #endif - #if HOMING_Z_WITH_PROBE + #if HOMING_Z_WITH_PROBE && Z_AFTER_PROBING move_z_after_probing(); #endif @@ -4109,7 +4196,7 @@ inline void gcode_G28(const bool always_home_all) { #endif #if ENABLED(RESTORE_LEVELING_AFTER_G28) - set_bed_leveling_enabled(leveling_state_at_entry); + set_bed_leveling_enabled(leveling_was_active); #endif clean_up_after_endstop_or_probe_move(); @@ -4200,7 +4287,7 @@ void home_all_axes() { gcode_G28(true); } static bool enable_soft_endstops; #endif - const MeshLevelingState state = (MeshLevelingState)parser.byteval('S', (int8_t)MeshReport); + MeshLevelingState state = (MeshLevelingState)parser.byteval('S', (int8_t)MeshReport); if (!WITHIN(state, 0, 5)) { SERIAL_PROTOCOLLNPGM("S out of range (0-5)."); return; @@ -4221,8 +4308,11 @@ void home_all_axes() { gcode_G28(true); } case MeshStart: mbl.reset(); mbl_probe_index = 0; - enqueue_and_echo_commands_P(lcd_wait_for_move ? PSTR("G29 S2") : PSTR("G28\nG29 S2")); - break; + if (!lcd_wait_for_move) { + enqueue_and_echo_commands_P(PSTR("G28\nG29 S2")); + return; + } + state = MeshNext; case MeshNext: if (mbl_probe_index < 0) { @@ -4235,9 +4325,11 @@ void home_all_axes() { gcode_G28(true); } // For the initial G29 S2 save software endstop state enable_soft_endstops = soft_endstops_enabled; #endif + // Move close to the bed before the first point + do_blocking_move_to_z(0); } else { - // For G29 S2 after adjusting Z. + // Save Z for the previous mesh position mbl.set_zigzag_z(mbl_probe_index - 1, current_position[Z_AXIS]); #if HAS_SOFTWARE_ENDSTOPS soft_endstops_enabled = enable_soft_endstops; @@ -4245,20 +4337,18 @@ void home_all_axes() { gcode_G28(true); } } // If there's another point to sample, move there with optional lift. if (mbl_probe_index < GRID_MAX_POINTS) { - mbl.zigzag(mbl_probe_index, px, py); - _manual_goto_xy(mbl.index_to_xpos[px], mbl.index_to_ypos[py]); - #if HAS_SOFTWARE_ENDSTOPS // Disable software endstops to allow manual adjustment // If G29 is not completed, they will not be re-enabled soft_endstops_enabled = false; #endif - mbl_probe_index++; + mbl.zigzag(mbl_probe_index++, px, py); + _manual_goto_xy(mbl.index_to_xpos[px], mbl.index_to_ypos[py]); } else { // One last "return to the bed" (as originally coded) at completion - current_position[Z_AXIS] = Z_MIN_POS + MANUAL_PROBE_HEIGHT; + current_position[Z_AXIS] = MANUAL_PROBE_HEIGHT; buffer_line_to_current_position(); stepper.synchronize(); @@ -4272,7 +4362,7 @@ void home_all_axes() { gcode_G28(true); } set_bed_leveling_enabled(true); #if ENABLED(MESH_G28_REST_ORIGIN) - current_position[Z_AXIS] = Z_MIN_POS; + current_position[Z_AXIS] = 0; set_destination_from_current(); buffer_line_to_destination(homing_feedrate(Z_AXIS)); stepper.synchronize(); @@ -4332,7 +4422,7 @@ void home_all_axes() { gcode_G28(true); } } // switch(state) - if (state == MeshStart || state == MeshNext) { + if (state == MeshNext) { SERIAL_PROTOCOLPAIR("MBL G29 point ", min(mbl_probe_index, GRID_MAX_POINTS)); SERIAL_PROTOCOLLNPAIR(" of ", int(GRID_MAX_POINTS)); } @@ -4480,7 +4570,7 @@ void home_all_axes() { gcode_G28(true); } ABL_VAR bool dryrun, abl_should_enable; #if ENABLED(PROBE_MANUALLY) || ENABLED(AUTO_BED_LEVELING_LINEAR) - ABL_VAR int abl_probe_index; + ABL_VAR int16_t abl_probe_index; #endif #if HAS_SOFTWARE_ENDSTOPS && ENABLED(PROBE_MANUALLY) @@ -4507,9 +4597,9 @@ void home_all_axes() { gcode_G28(true); } #endif #if ENABLED(AUTO_BED_LEVELING_LINEAR) - ABL_VAR int abl2; + ABL_VAR int16_t abl_points; #elif ENABLED(PROBE_MANUALLY) // Bilinear - int constexpr abl2 = GRID_MAX_POINTS; + int16_t constexpr abl_points = GRID_MAX_POINTS; #endif #if ENABLED(AUTO_BED_LEVELING_BILINEAR) @@ -4528,7 +4618,7 @@ void home_all_axes() { gcode_G28(true); } #elif ENABLED(AUTO_BED_LEVELING_3POINT) #if ENABLED(PROBE_MANUALLY) - int constexpr abl2 = 3; // used to show total points + int8_t constexpr abl_points = 3; // used to show total points #endif // Probe at 3 arbitrary points @@ -4640,7 +4730,7 @@ void home_all_axes() { gcode_G28(true); } return; } - abl2 = abl_grid_points_x * abl_grid_points_y; + abl_points = abl_grid_points_x * abl_grid_points_y; mean = 0; #elif ENABLED(AUTO_BED_LEVELING_BILINEAR) @@ -4756,8 +4846,8 @@ void home_all_axes() { gcode_G28(true); } if (verbose_level || seenQ) { SERIAL_PROTOCOLPGM("Manual G29 "); if (g29_in_progress) { - SERIAL_PROTOCOLPAIR("point ", min(abl_probe_index + 1, abl2)); - SERIAL_PROTOCOLLNPAIR(" of ", abl2); + SERIAL_PROTOCOLPAIR("point ", min(abl_probe_index + 1, abl_points)); + SERIAL_PROTOCOLLNPAIR(" of ", abl_points); } else SERIAL_PROTOCOLLNPGM("idle"); @@ -4770,8 +4860,15 @@ void home_all_axes() { gcode_G28(true); } #if HAS_SOFTWARE_ENDSTOPS enable_soft_endstops = soft_endstops_enabled; #endif + // Move close to the bed before the first point + do_blocking_move_to_z(0); } else { + + #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_3POINT) + const uint16_t index = abl_probe_index - 1; + #endif + // For G29 after adjusting Z. // Save the previous Z before going to the next point measured_z = current_position[Z_AXIS]; @@ -4779,13 +4876,17 @@ void home_all_axes() { gcode_G28(true); } #if ENABLED(AUTO_BED_LEVELING_LINEAR) mean += measured_z; - eqnBVector[abl_probe_index] = measured_z; - eqnAMatrix[abl_probe_index + 0 * abl2] = xProbe; - eqnAMatrix[abl_probe_index + 1 * abl2] = yProbe; - eqnAMatrix[abl_probe_index + 2 * abl2] = 1; + eqnBVector[index] = measured_z; + eqnAMatrix[index + 0 * abl_points] = xProbe; + eqnAMatrix[index + 1 * abl_points] = yProbe; + eqnAMatrix[index + 2 * abl_points] = 1; incremental_LSF(&lsf_results, xProbe, yProbe, measured_z); + #elif ENABLED(AUTO_BED_LEVELING_3POINT) + + points[index].z = measured_z; + #elif ENABLED(AUTO_BED_LEVELING_BILINEAR) z_values[xCount][yCount] = measured_z + zoffset; @@ -4798,10 +4899,6 @@ void home_all_axes() { gcode_G28(true); } } #endif - #elif ENABLED(AUTO_BED_LEVELING_3POINT) - - points[abl_probe_index].z = measured_z; - #endif } @@ -4812,7 +4909,7 @@ void home_all_axes() { gcode_G28(true); } #if ABL_GRID // Skip any unreachable points - while (abl_probe_index < abl2) { + while (abl_probe_index < abl_points) { // Set xCount, yCount based on abl_probe_index, with zig-zag PR_OUTER_VAR = abl_probe_index / PR_INNER_END; @@ -4839,7 +4936,7 @@ void home_all_axes() { gcode_G28(true); } } // Is there a next point to move to? - if (abl_probe_index < abl2) { + if (abl_probe_index < abl_points) { _manual_goto_xy(xProbe, yProbe); // Can be used here too! #if HAS_SOFTWARE_ENDSTOPS // Disable software endstops to allow manual adjustment @@ -4863,7 +4960,7 @@ void home_all_axes() { gcode_G28(true); } #elif ENABLED(AUTO_BED_LEVELING_3POINT) // Probe at 3 arbitrary points - if (abl_probe_index < abl2) { + if (abl_probe_index < abl_points) { xProbe = points[abl_probe_index].x; yProbe = points[abl_probe_index].y; _manual_goto_xy(xProbe, yProbe); @@ -4902,7 +4999,7 @@ void home_all_axes() { gcode_G28(true); } #else // !PROBE_MANUALLY { - const bool stow_probe_after_each = parser.boolval('E'); + const ProbePtRaise raise_after = parser.boolval('E') ? PROBE_PT_STOW : PROBE_PT_RAISE; measured_z = 0; @@ -4948,7 +5045,7 @@ void home_all_axes() { gcode_G28(true); } if (!position_is_reachable_by_probe(xProbe, yProbe)) continue; #endif - measured_z = faux ? 0.001 * random(-100, 101) : probe_pt(xProbe, yProbe, stow_probe_after_each, verbose_level); + measured_z = faux ? 0.001 * random(-100, 101) : probe_pt(xProbe, yProbe, raise_after, verbose_level); if (isnan(measured_z)) { set_bed_leveling_enabled(abl_should_enable); @@ -4959,9 +5056,9 @@ void home_all_axes() { gcode_G28(true); } mean += measured_z; eqnBVector[abl_probe_index] = measured_z; - eqnAMatrix[abl_probe_index + 0 * abl2] = xProbe; - eqnAMatrix[abl_probe_index + 1 * abl2] = yProbe; - eqnAMatrix[abl_probe_index + 2 * abl2] = 1; + eqnAMatrix[abl_probe_index + 0 * abl_points] = xProbe; + eqnAMatrix[abl_probe_index + 1 * abl_points] = yProbe; + eqnAMatrix[abl_probe_index + 2 * abl_points] = 1; incremental_LSF(&lsf_results, xProbe, yProbe, measured_z); @@ -4985,7 +5082,7 @@ void home_all_axes() { gcode_G28(true); } // Retain the last probe position xProbe = points[i].x; yProbe = points[i].y; - measured_z = faux ? 0.001 * random(-100, 101) : probe_pt(xProbe, yProbe, stow_probe_after_each, verbose_level); + measured_z = faux ? 0.001 * random(-100, 101) : probe_pt(xProbe, yProbe, raise_after, verbose_level); if (isnan(measured_z)) { set_bed_leveling_enabled(abl_should_enable); break; @@ -5069,7 +5166,7 @@ void home_all_axes() { gcode_G28(true); } plane_equation_coefficients[1] = -lsf_results.B; // but that is not yet tested. plane_equation_coefficients[2] = -lsf_results.D; - mean /= abl2; + mean /= abl_points; if (verbose_level) { SERIAL_PROTOCOLPGM("Eqn coefficients: a: "); @@ -5113,8 +5210,8 @@ void home_all_axes() { gcode_G28(true); } for (uint8_t xx = 0; xx < abl_grid_points_x; xx++) { int ind = indexIntoAB[xx][yy]; float diff = eqnBVector[ind] - mean, - x_tmp = eqnAMatrix[ind + 0 * abl2], - y_tmp = eqnAMatrix[ind + 1 * abl2], + x_tmp = eqnAMatrix[ind + 0 * abl_points], + y_tmp = eqnAMatrix[ind + 1 * abl_points], z_tmp = 0; apply_rotation_xyz(planner.bed_level_matrix, x_tmp, y_tmp, z_tmp); @@ -5137,8 +5234,8 @@ void home_all_axes() { gcode_G28(true); } for (int8_t yy = abl_grid_points_y - 1; yy >= 0; yy--) { for (uint8_t xx = 0; xx < abl_grid_points_x; xx++) { int ind = indexIntoAB[xx][yy]; - float x_tmp = eqnAMatrix[ind + 0 * abl2], - y_tmp = eqnAMatrix[ind + 1 * abl2], + float x_tmp = eqnAMatrix[ind + 0 * abl_points], + y_tmp = eqnAMatrix[ind + 1 * abl_points], z_tmp = 0; apply_rotation_xyz(planner.bed_level_matrix, x_tmp, y_tmp, z_tmp); @@ -5247,7 +5344,7 @@ void home_all_axes() { gcode_G28(true); } if (planner.leveling_active) SYNC_PLAN_POSITION_KINEMATIC(); - #if HAS_BED_PROBE + #if HAS_BED_PROBE && Z_AFTER_PROBING move_z_after_probing(); #endif @@ -5280,8 +5377,8 @@ void home_all_axes() { gcode_G28(true); } setup_for_endstop_or_probe_move(); - const bool do_stow = parser.boolval('E'); - const float measured_z = probe_pt(xpos, ypos, do_stow, 1); + const ProbePtRaise raise_after = parser.boolval('E') ? PROBE_PT_STOW : PROBE_PT_NONE; + const float measured_z = probe_pt(xpos, ypos, raise_after, parser.intval('V', 1)); if (!isnan(measured_z)) { SERIAL_PROTOCOLPAIR("Bed X: ", FIXFLOAT(xpos)); @@ -5291,7 +5388,9 @@ void home_all_axes() { gcode_G28(true); } clean_up_after_endstop_or_probe_move(); - if (do_stow) move_z_after_probing(); + #if Z_AFTER_PROBING + if (raise_after == PROBE_PT_STOW) move_z_after_probing(); + #endif report_current_position(); } @@ -5317,7 +5416,7 @@ void home_all_axes() { gcode_G28(true); } constexpr uint8_t _7P_STEP = 1, // 7-point step - to change number of calibration points _4P_STEP = _7P_STEP * 2, // 4-point step NPP = _7P_STEP * 6; // number of calibration points on the radius - enum CalEnum : char { // the 7 main calibration points - add definitions if needed + enum CalEnum : char { // the 7 main calibration points - add definitions if needed CEN = 0, __A = 1, _AB = __A + _7P_STEP, @@ -5334,7 +5433,54 @@ void home_all_axes() { gcode_G28(true); } #define LOOP_CAL_RAD(VAR) LOOP_CAL_PT(VAR, __A, _7P_STEP) #define LOOP_CAL_ACT(VAR, _4P, _OP) LOOP_CAL_PT(VAR, _OP ? _AB : __A, _4P ? _4P_STEP : _7P_STEP) - static void print_signed_float(const char * const prefix, const float &f) { + #if HOTENDS > 1 + const uint8_t old_tool_index = active_extruder; + #define AC_CLEANUP() ac_cleanup(old_tool_index) + #else + #define AC_CLEANUP() ac_cleanup() + #endif + + float lcd_probe_pt(const float &rx, const float &ry); + + bool ac_home() { + endstops.enable(true); + if (!home_delta()) + return false; + endstops.not_homing(); + return true; + } + + void ac_setup(const bool reset_bed) { + #if HOTENDS > 1 + tool_change(0, 0, true); + #endif + + stepper.synchronize(); + setup_for_endstop_or_probe_move(); + + #if HAS_LEVELING + if (reset_bed) reset_bed_level(); // After full calibration bed-level data is no longer valid + #endif + } + + void ac_cleanup( + #if HOTENDS > 1 + const uint8_t old_tool_index + #endif + ) { + #if ENABLED(DELTA_HOME_TO_SAFE_ZONE) + do_blocking_move_to_z(delta_clip_start_height); + #endif + #if HAS_BED_PROBE + STOW_PROBE(); + #endif + clean_up_after_endstop_or_probe_move(); + #if HOTENDS > 1 + tool_change(old_tool_index, 0, true); + #endif + } + + void print_signed_float(const char * const prefix, const float &f) { SERIAL_PROTOCOLPGM(" "); serialprintPGM(prefix); SERIAL_PROTOCOLCHAR(':'); @@ -5342,7 +5488,10 @@ void home_all_axes() { gcode_G28(true); } SERIAL_PROTOCOL_F(f, 2); } - static void print_G33_settings(const bool end_stops, const bool tower_angles) { + /** + * - Print the delta settings + */ + static void print_calibration_settings(const bool end_stops, const bool tower_angles) { SERIAL_PROTOCOLPAIR(".Height:", delta_height); if (end_stops) { print_signed_float(PSTR("Ex"), delta_endstop_adj[A_AXIS]); @@ -5363,16 +5512,25 @@ void home_all_axes() { gcode_G28(true); } if ((!end_stops && tower_angles) || (end_stops && !tower_angles)) { // XOR SERIAL_PROTOCOLPAIR(" Radius:", delta_radius); } + #if HAS_BED_PROBE + if (!end_stops && !tower_angles) { + SERIAL_PROTOCOL_SP(30); + print_signed_float(PSTR("Offset"), zprobe_zoffset); + } + #endif SERIAL_EOL(); } - static void print_G33_results(const float z_at_pt[NPP + 1], const bool tower_points, const bool opposite_points) { + /** + * - Print the probe results + */ + static void print_calibration_results(const float z_pt[NPP + 1], const bool tower_points, const bool opposite_points) { SERIAL_PROTOCOLPGM(". "); - print_signed_float(PSTR("c"), z_at_pt[CEN]); + print_signed_float(PSTR("c"), z_pt[CEN]); if (tower_points) { - print_signed_float(PSTR(" x"), z_at_pt[__A]); - print_signed_float(PSTR(" y"), z_at_pt[__B]); - print_signed_float(PSTR(" z"), z_at_pt[__C]); + print_signed_float(PSTR(" x"), z_pt[__A]); + print_signed_float(PSTR(" y"), z_pt[__B]); + print_signed_float(PSTR(" z"), z_pt[__C]); } if (tower_points && opposite_points) { SERIAL_EOL(); @@ -5380,50 +5538,63 @@ void home_all_axes() { gcode_G28(true); } SERIAL_PROTOCOL_SP(13); } if (opposite_points) { - print_signed_float(PSTR("yz"), z_at_pt[_BC]); - print_signed_float(PSTR("zx"), z_at_pt[_CA]); - print_signed_float(PSTR("xy"), z_at_pt[_AB]); + print_signed_float(PSTR("yz"), z_pt[_BC]); + print_signed_float(PSTR("zx"), z_pt[_CA]); + print_signed_float(PSTR("xy"), z_pt[_AB]); } SERIAL_EOL(); } /** - * After G33: - * - Move to the print ceiling (DELTA_HOME_TO_SAFE_ZONE only) - * - Stow the probe - * - Restore endstops state - * - Select the old tool, if needed + * - Calculate the standard deviation from the zero plane */ - static void G33_cleanup( - #if HOTENDS > 1 - const uint8_t old_tool_index - #endif - ) { - #if ENABLED(DELTA_HOME_TO_SAFE_ZONE) - do_blocking_move_to_z(delta_clip_start_height); - #endif - STOW_PROBE(); - clean_up_after_endstop_or_probe_move(); - #if HOTENDS > 1 - tool_change(old_tool_index, 0, true); - #endif + static float std_dev_points(float z_pt[NPP + 1], const bool _0p_cal, const bool _1p_cal, const bool _4p_cal, const bool _4p_opp) { + if (!_0p_cal) { + float S2 = sq(z_pt[CEN]); + int16_t N = 1; + if (!_1p_cal) { // std dev from zero plane + LOOP_CAL_ACT(rad, _4p_cal, _4p_opp) { + S2 += sq(z_pt[rad]); + N++; + } + return round(SQRT(S2 / N) * 1000.0) / 1000.0 + 0.00001; + } + } + return 0.00001; } - inline float calibration_probe(const float nx, const float ny, const bool stow) { + /** + * - Probe a point + */ + static float calibration_probe(const float &nx, const float &ny, const bool stow, const bool set_up) { #if HAS_BED_PROBE - return probe_pt(nx, ny, stow, 0, false); + return probe_pt(nx, ny, set_up ? PROBE_PT_BIG_RAISE : stow ? PROBE_PT_STOW : PROBE_PT_RAISE, 0, false); #else UNUSED(stow); + UNUSED(set_up); return lcd_probe_pt(nx, ny); #endif } - static float probe_G33_points(float z_at_pt[NPP + 1], const int8_t probe_points, const bool towers_set, const bool stow_after_each) { + #if HAS_BED_PROBE + static float probe_z_shift(const float center) { + STOW_PROBE(); + endstops.enable_z_probe(false); + float z_shift = lcd_probe_pt(0, 0) - center; + endstops.enable_z_probe(true); + return z_shift; + } + #endif + + /** + * - Probe a grid + */ + static bool probe_calibration_points(float z_pt[NPP + 1], const int8_t probe_points, const bool towers_set, const bool stow_after_each, const bool set_up) { const bool _0p_calibration = probe_points == 0, - _1p_calibration = probe_points == 1, + _1p_calibration = probe_points == 1 || probe_points == -1, _4p_calibration = probe_points == 2, _4p_opposite_points = _4p_calibration && !towers_set, - _7p_calibration = probe_points >= 3 || probe_points == 0, + _7p_calibration = probe_points >= 3, _7p_no_intermediates = probe_points == 3, _7p_1_intermediates = probe_points == 4, _7p_2_intermediates = probe_points == 5, @@ -5433,28 +5604,28 @@ void home_all_axes() { gcode_G28(true); } _7p_11_intermediates = probe_points == 9, _7p_14_intermediates = probe_points == 10, _7p_intermed_points = probe_points >= 4, - _7p_6_centre = probe_points >= 5 && probe_points <= 7, - _7p_9_centre = probe_points >= 8; + _7p_6_center = probe_points >= 5 && probe_points <= 7, + _7p_9_center = probe_points >= 8; - LOOP_CAL_ALL(axis) z_at_pt[axis] = 0.0; + LOOP_CAL_ALL(rad) z_pt[rad] = 0.0; if (!_0p_calibration) { if (!_7p_no_intermediates && !_7p_4_intermediates && !_7p_11_intermediates) { // probe the center - z_at_pt[CEN] += calibration_probe(0, 0, stow_after_each); - if (isnan(z_at_pt[CEN])) return NAN; + z_pt[CEN] += calibration_probe(0, 0, stow_after_each, set_up); + if (isnan(z_pt[CEN])) return false; } if (_7p_calibration) { // probe extra center points - const float start = _7p_9_centre ? _CA + _7P_STEP / 3.0 : _7p_6_centre ? _CA : __C, - steps = _7p_9_centre ? _4P_STEP / 3.0 : _7p_6_centre ? _7P_STEP : _4P_STEP; - I_LOOP_CAL_PT(axis, start, steps) { - const float a = RADIANS(210 + (360 / NPP) * (axis - 1)), + const float start = _7p_9_center ? _CA + _7P_STEP / 3.0 : _7p_6_center ? _CA : __C, + steps = _7p_9_center ? _4P_STEP / 3.0 : _7p_6_center ? _7P_STEP : _4P_STEP; + I_LOOP_CAL_PT(rad, start, steps) { + const float a = RADIANS(210 + (360 / NPP) * (rad - 1)), r = delta_calibration_radius * 0.1; - z_at_pt[CEN] += calibration_probe(cos(a) * r, sin(a) * r, stow_after_each); - if (isnan(z_at_pt[CEN])) return NAN; + z_pt[CEN] += calibration_probe(cos(a) * r, sin(a) * r, stow_after_each, set_up); + if (isnan(z_pt[CEN])) return false; } - z_at_pt[CEN] /= float(_7p_2_intermediates ? 7 : probe_points); + z_pt[CEN] /= float(_7p_2_intermediates ? 7 : probe_points); } if (!_1p_calibration) { // probe the radius @@ -5469,182 +5640,150 @@ void home_all_axes() { gcode_G28(true); } _7p_no_intermediates ? _7P_STEP : // 1r * 6 + 3c = 9 _4P_STEP; // .5r * 6 + 1c = 4 bool zig_zag = true; - F_LOOP_CAL_PT(axis, start, _7p_9_centre ? steps * 3 : steps) { - const int8_t offset = _7p_9_centre ? 1 : 0; - for (int8_t circle = -offset; circle <= offset; circle++) { - const float a = RADIANS(210 + (360 / NPP) * (axis - 1)), - r = delta_calibration_radius * (1 + 0.1 * (zig_zag ? circle : - circle)), - interpol = fmod(axis, 1); - const float z_temp = calibration_probe(cos(a) * r, sin(a) * r, stow_after_each); - if (isnan(z_temp)) return NAN; + F_LOOP_CAL_PT(rad, start, _7p_9_center ? steps * 3 : steps) { + const int8_t offset = _7p_9_center ? 2 : 0; + for (int8_t circle = 0; circle <= offset; circle++) { + const float a = RADIANS(210 + (360 / NPP) * (rad - 1)), + r = delta_calibration_radius * (1 - 0.1 * (zig_zag ? offset - circle : circle)), + interpol = fmod(rad, 1); + const float z_temp = calibration_probe(cos(a) * r, sin(a) * r, stow_after_each, set_up); + if (isnan(z_temp)) return false; // split probe point to neighbouring calibration points - z_at_pt[uint8_t(round(axis - interpol + NPP - 1)) % NPP + 1] += z_temp * sq(cos(RADIANS(interpol * 90))); - z_at_pt[uint8_t(round(axis - interpol)) % NPP + 1] += z_temp * sq(sin(RADIANS(interpol * 90))); + z_pt[uint8_t(round(rad - interpol + NPP - 1)) % NPP + 1] += z_temp * sq(cos(RADIANS(interpol * 90))); + z_pt[uint8_t(round(rad - interpol)) % NPP + 1] += z_temp * sq(sin(RADIANS(interpol * 90))); } zig_zag = !zig_zag; } if (_7p_intermed_points) - LOOP_CAL_RAD(axis) - z_at_pt[axis] /= _7P_STEP / steps; - } + LOOP_CAL_RAD(rad) + z_pt[rad] /= _7P_STEP / steps; - float S1 = z_at_pt[CEN], - S2 = sq(z_at_pt[CEN]); - int16_t N = 1; - if (!_1p_calibration) { // std dev from zero plane - LOOP_CAL_ACT(axis, _4p_calibration, _4p_opposite_points) { - S1 += z_at_pt[axis]; - S2 += sq(z_at_pt[axis]); - N++; - } - return round(SQRT(S2 / N) * 1000.0) / 1000.0 + 0.00001; + do_blocking_move_to_xy(0.0, 0.0); } } - - return 0.00001; + return true; } - #if HAS_BED_PROBE + /** + * kinematics routines and auto tune matrix scaling parameters: + * see https://github.com/LVD-AC/Marlin-AC/tree/1.1.x-AC/documentation for + * - formulae for approximative forward kinematics in the end-stop displacement matrix + * - definition of the matrix scaling parameters + */ + static void reverse_kinematics_probe_points(float z_pt[NPP + 1], float mm_at_pt_axis[NPP + 1][ABC]) { + float pos[XYZ] = { 0.0 }; - static bool G33_auto_tune() { - float z_at_pt[NPP + 1] = { 0.0 }, - z_at_pt_base[NPP + 1] = { 0.0 }, - z_temp, h_fac = 0.0, r_fac = 0.0, a_fac = 0.0, norm = 0.8; + LOOP_CAL_ALL(rad) { + const float a = RADIANS(210 + (360 / NPP) * (rad - 1)), + r = (rad == CEN ? 0.0 : delta_calibration_radius); + pos[X_AXIS] = cos(a) * r; + pos[Y_AXIS] = sin(a) * r; + pos[Z_AXIS] = z_pt[rad]; + inverse_kinematics(pos); + LOOP_XYZ(axis) mm_at_pt_axis[rad][axis] = delta[axis]; + } + } - #define ZP(N,I) ((N) * z_at_pt[I]) - #define Z06(I) ZP(6, I) - #define Z03(I) ZP(3, I) - #define Z02(I) ZP(2, I) - #define Z01(I) ZP(1, I) - #define Z32(I) ZP(3/2, I) + static void forward_kinematics_probe_points(float mm_at_pt_axis[NPP + 1][ABC], float z_pt[NPP + 1]) { + const float r_quot = delta_calibration_radius / delta_radius; - SERIAL_PROTOCOLPGM("AUTO TUNE baseline"); - SERIAL_EOL(); - if (isnan(probe_G33_points(z_at_pt_base, 3, true, false))) return false; - print_G33_results(z_at_pt_base, true, true); + #define ZPP(N,I,A) ((1 / 3.0 + r_quot * (N) / 3.0 ) * mm_at_pt_axis[I][A]) + #define Z00(I, A) ZPP( 0, I, A) + #define Zp1(I, A) ZPP(+1, I, A) + #define Zm1(I, A) ZPP(-1, I, A) + #define Zp2(I, A) ZPP(+2, I, A) + #define Zm2(I, A) ZPP(-2, I, A) - LOOP_XYZ(axis) { - delta_endstop_adj[axis] -= 1.0; - recalc_delta_settings(); + z_pt[CEN] = Z00(CEN, A_AXIS) + Z00(CEN, B_AXIS) + Z00(CEN, C_AXIS); + z_pt[__A] = Zp2(__A, A_AXIS) + Zm1(__A, B_AXIS) + Zm1(__A, C_AXIS); + z_pt[__B] = Zm1(__B, A_AXIS) + Zp2(__B, B_AXIS) + Zm1(__B, C_AXIS); + z_pt[__C] = Zm1(__C, A_AXIS) + Zm1(__C, B_AXIS) + Zp2(__C, C_AXIS); + z_pt[_BC] = Zm2(_BC, A_AXIS) + Zp1(_BC, B_AXIS) + Zp1(_BC, C_AXIS); + z_pt[_CA] = Zp1(_CA, A_AXIS) + Zm2(_CA, B_AXIS) + Zp1(_CA, C_AXIS); + z_pt[_AB] = Zp1(_AB, A_AXIS) + Zp1(_AB, B_AXIS) + Zm2(_AB, C_AXIS); + } - endstops.enable(true); - if (!home_delta()) return false; - endstops.not_homing(); + static void calc_kinematics_diff_probe_points(float z_pt[NPP + 1], float delta_e[ABC], float delta_r, float delta_t[ABC]) { + const float z_center = z_pt[CEN]; + float diff_mm_at_pt_axis[NPP + 1][ABC], + new_mm_at_pt_axis[NPP + 1][ABC]; - SERIAL_PROTOCOLPGM("Tuning E"); - SERIAL_CHAR(tolower(axis_codes[axis])); - SERIAL_EOL(); + reverse_kinematics_probe_points(z_pt, diff_mm_at_pt_axis); - if (isnan(probe_G33_points(z_at_pt, 3, true, false))) return false; - LOOP_CAL_ALL(axis) z_at_pt[axis] -= z_at_pt_base[axis]; - print_G33_results(z_at_pt, true, true); - delta_endstop_adj[axis] += 1.0; - recalc_delta_settings(); - switch (axis) { - case A_AXIS : - h_fac += 4.0 / (Z03(CEN) +Z01(__A) +Z32(_CA) +Z32(_AB)); // Offset by X-tower end-stop - break; - case B_AXIS : - h_fac += 4.0 / (Z03(CEN) +Z01(__B) +Z32(_BC) +Z32(_AB)); // Offset by Y-tower end-stop - break; - case C_AXIS : - h_fac += 4.0 / (Z03(CEN) +Z01(__C) +Z32(_BC) +Z32(_CA) ); // Offset by Z-tower end-stop - break; - } - } - h_fac /= 3.0; - h_fac *= norm; // Normalize to 1.02 for Kossel mini + delta_radius += delta_r; + LOOP_XYZ(axis) delta_tower_angle_trim[axis] += delta_t[axis]; + recalc_delta_settings(); + reverse_kinematics_probe_points(z_pt, new_mm_at_pt_axis); - for (int8_t zig_zag = -1; zig_zag < 2; zig_zag += 2) { - delta_radius += 1.0 * zig_zag; - recalc_delta_settings(); + LOOP_XYZ(axis) LOOP_CAL_ALL(rad) diff_mm_at_pt_axis[rad][axis] -= new_mm_at_pt_axis[rad][axis] + delta_e[axis]; + forward_kinematics_probe_points(diff_mm_at_pt_axis, z_pt); - endstops.enable(true); - if (!home_delta()) return false; - endstops.not_homing(); + LOOP_CAL_RAD(rad) z_pt[rad] -= z_pt[CEN] - z_center; + z_pt[CEN] = z_center; - SERIAL_PROTOCOLPGM("Tuning R"); - SERIAL_PROTOCOL(zig_zag == -1 ? "-" : "+"); - SERIAL_EOL(); - if (isnan(probe_G33_points(z_at_pt, 3, true, false))) return false; - LOOP_CAL_ALL(axis) z_at_pt[axis] -= z_at_pt_base[axis]; - print_G33_results(z_at_pt, true, true); - delta_radius -= 1.0 * zig_zag; - recalc_delta_settings(); - r_fac -= zig_zag * 6.0 / (Z03(__A) +Z03(__B) +Z03(__C) +Z03(_BC) +Z03(_CA) +Z03(_AB)); // Offset by delta radius - } - r_fac /= 2.0; - r_fac *= 3 * norm; // Normalize to 2.25 for Kossel mini - - LOOP_XYZ(axis) { - delta_tower_angle_trim[axis] += 1.0; - delta_endstop_adj[(axis + 1) % 3] -= 1.0 / 4.5; - delta_endstop_adj[(axis + 2) % 3] += 1.0 / 4.5; - z_temp = MAX3(delta_endstop_adj[A_AXIS], delta_endstop_adj[B_AXIS], delta_endstop_adj[C_AXIS]); - delta_height -= z_temp; - LOOP_XYZ(axis) delta_endstop_adj[axis] -= z_temp; - recalc_delta_settings(); + delta_radius -= delta_r; + LOOP_XYZ(axis) delta_tower_angle_trim[axis] -= delta_t[axis]; + recalc_delta_settings(); + } - endstops.enable(true); - if (!home_delta()) return false; - endstops.not_homing(); + static float auto_tune_h() { + const float r_quot = delta_calibration_radius / delta_radius; + float h_fac = 0.0; - SERIAL_PROTOCOLPGM("Tuning T"); - SERIAL_CHAR(tolower(axis_codes[axis])); - SERIAL_EOL(); + h_fac = r_quot / (2.0 / 3.0); + h_fac = 1.0 / h_fac; // (2/3)/CR + return h_fac; + } - if (isnan(probe_G33_points(z_at_pt, 3, true, false))) return false; - LOOP_CAL_ALL(axis) z_at_pt[axis] -= z_at_pt_base[axis]; - print_G33_results(z_at_pt, true, true); + static float auto_tune_r() { + const float diff = 0.01; + float r_fac = 0.0, + z_pt[NPP + 1] = { 0.0 }, + delta_e[ABC] = {0.0}, + delta_r = {0.0}, + delta_t[ABC] = {0.0}; - delta_tower_angle_trim[axis] -= 1.0; - delta_endstop_adj[(axis+1) % 3] += 1.0/4.5; - delta_endstop_adj[(axis+2) % 3] -= 1.0/4.5; - z_temp = MAX3(delta_endstop_adj[A_AXIS], delta_endstop_adj[B_AXIS], delta_endstop_adj[C_AXIS]); - delta_height -= z_temp; - LOOP_XYZ(axis) delta_endstop_adj[axis] -= z_temp; - recalc_delta_settings(); - switch (axis) { - case A_AXIS : - a_fac += 4.0 / ( Z06(__B) -Z06(__C) +Z06(_CA) -Z06(_AB)); // Offset by alpha tower angle - break; - case B_AXIS : - a_fac += 4.0 / (-Z06(__A) +Z06(__C) -Z06(_BC) +Z06(_AB)); // Offset by beta tower angle - break; - case C_AXIS : - a_fac += 4.0 / (Z06(__A) -Z06(__B) +Z06(_BC) -Z06(_CA) ); // Offset by gamma tower angle - break; - } - } - a_fac /= 3.0; - a_fac *= norm; // Normalize to 0.83 for Kossel mini + delta_r = diff; + calc_kinematics_diff_probe_points(z_pt, delta_e, delta_r, delta_t); + r_fac = -(z_pt[__A] + z_pt[__B] + z_pt[__C] + z_pt[_BC] + z_pt[_CA] + z_pt[_AB]) / 6.0; + r_fac = diff / r_fac / 3.0; // 1/(3*delta_Z) + return r_fac; + } - endstops.enable(true); - if (!home_delta()) return false; - endstops.not_homing(); - print_signed_float(PSTR( "H_FACTOR: "), h_fac); - print_signed_float(PSTR(" R_FACTOR: "), r_fac); - print_signed_float(PSTR(" A_FACTOR: "), a_fac); - SERIAL_EOL(); - SERIAL_PROTOCOLPGM("Copy these values to Configuration.h"); - SERIAL_EOL(); - return true; - } + static float auto_tune_a() { + const float diff = 0.01; + float a_fac = 0.0, + z_pt[NPP + 1] = { 0.0 }, + delta_e[ABC] = {0.0}, + delta_r = {0.0}, + delta_t[ABC] = {0.0}; - #endif // HAS_BED_PROBE + LOOP_XYZ(axis) { + LOOP_XYZ(axis_2) delta_t[axis_2] = 0.0; + delta_t[axis] = diff; + calc_kinematics_diff_probe_points(z_pt, delta_e, delta_r, delta_t); + a_fac += z_pt[uint8_t((axis * _4P_STEP) - _7P_STEP + NPP) % NPP + 1] / 6.0; + a_fac -= z_pt[uint8_t((axis * _4P_STEP) + 1 + _7P_STEP)] / 6.0; + } + a_fac = diff / a_fac / 3.0; // 1/(3*delta_Z) + return a_fac; + } /** * G33 - Delta '1-4-7-point' Auto-Calibration - * Calibrate height, endstops, delta radius, and tower angles. + * Calibrate height, z_offset, endstops, delta radius, and tower angles. * * Parameters: * + * S Setup mode; disables probe protection + * * Pn Number of probe points: - * P0 No probe. Normalize only. - * P1 Probe center and set height only. - * P2 Probe center and towers. Set height, endstops and delta radius. - * P3 Probe all positions: center, towers and opposite towers. Set all. - * P4-P10 Probe all positions + at different intermediate locations and average them. + * P-1 Checks the z_offset with a center probe and paper test. + * P0 Normalizes calibration. + * P1 Calibrates height only with center probe. + * P2 Probe center and towers. Calibrate height, endstops and delta radius. + * P3 Probe all positions: center, towers and opposite towers. Calibrate all. + * P4-P10 Probe all positions at different intermediate locations and average them. * * T Don't calibrate tower angle corrections * @@ -5652,8 +5791,6 @@ void home_all_axes() { gcode_G28(true); } * * Fn Force to run at least n iterations and take the best result * - * A Auto-tune calibration factors (set in Configuration.h) - * * Vn Verbose level: * V0 Dry-run mode. Report settings and probe results. No calibration. * V1 Report start and end settings only @@ -5664,19 +5801,22 @@ void home_all_axes() { gcode_G28(true); } */ inline void gcode_G33() { - const int8_t probe_points = parser.intval('P', DELTA_CALIBRATION_DEFAULT_POINTS); - if (!WITHIN(probe_points, 0, 10)) { - SERIAL_PROTOCOLLNPGM("?(P)oints is implausible (0-10)."); - return; - } + const bool set_up = + #if HAS_BED_PROBE + parser.seen('S'); + #else + false; + #endif - const int8_t verbose_level = parser.byteval('V', 1); - if (!WITHIN(verbose_level, 0, 3)) { - SERIAL_PROTOCOLLNPGM("?(V)erbose level is implausible (0-3)."); + const int8_t probe_points = set_up ? 2 : parser.intval('P', DELTA_CALIBRATION_DEFAULT_POINTS); + if (!WITHIN(probe_points, -1, 10)) { + SERIAL_PROTOCOLLNPGM("?(P)oints is implausible (-1 - 10)."); return; } - const float calibration_precision = parser.floatval('C', 0.0); + const bool towers_set = !parser.seen('T'); + + const float calibration_precision = set_up ? Z_CLEARANCE_BETWEEN_PROBES / 5.0 : parser.floatval('C', 0.0); if (calibration_precision < 0) { SERIAL_PROTOCOLLNPGM("?(C)alibration precision is implausible (>=0)."); return; @@ -5684,36 +5824,52 @@ void home_all_axes() { gcode_G28(true); } const int8_t force_iterations = parser.intval('F', 0); if (!WITHIN(force_iterations, 0, 30)) { - SERIAL_PROTOCOLLNPGM("?(F)orce iteration is implausible (0-30)."); + SERIAL_PROTOCOLLNPGM("?(F)orce iteration is implausible (0 - 30)."); + return; + } + + const int8_t verbose_level = parser.byteval('V', 1); + if (!WITHIN(verbose_level, 0, 3)) { + SERIAL_PROTOCOLLNPGM("?(V)erbose level is implausible (0 - 3)."); return; } - const bool towers_set = !parser.boolval('T'), - auto_tune = parser.boolval('A'), - stow_after_each = parser.boolval('E'), - _0p_calibration = probe_points == 0, - _1p_calibration = probe_points == 1, + const bool stow_after_each = parser.seen('E'); + + if (set_up) { + delta_height = 999.99; + delta_radius = DELTA_PRINTABLE_RADIUS; + ZERO(delta_endstop_adj); + ZERO(delta_tower_angle_trim); + recalc_delta_settings(); + } + + const bool _0p_calibration = probe_points == 0, + _1p_calibration = probe_points == 1 || probe_points == -1, _4p_calibration = probe_points == 2, - _7p_9_centre = probe_points >= 8, - _tower_results = (_4p_calibration && towers_set) - || probe_points >= 3 || probe_points == 0, - _opposite_results = (_4p_calibration && !towers_set) - || probe_points >= 3 || probe_points == 0, - _endstop_results = probe_points != 1, - _angle_results = (probe_points >= 3 || probe_points == 0) && towers_set; - const static char save_message[] PROGMEM = "Save with M500 and/or copy to Configuration.h"; + _4p_opposite_points = _4p_calibration && !towers_set, + _7p_9_center = probe_points >= 8, + _tower_results = (_4p_calibration && towers_set) || probe_points >= 3, + _opposite_results = (_4p_calibration && !towers_set) || probe_points >= 3, + _endstop_results = probe_points != 1 && probe_points != -1 && probe_points != 0, + _angle_results = probe_points >= 3 && towers_set; + static const char save_message[] PROGMEM = "Save with M500 and/or copy to Configuration.h"; int8_t iterations = 0; float test_precision, zero_std_dev = (verbose_level ? 999.0 : 0.0), // 0.0 in dry-run mode : forced end zero_std_dev_min = zero_std_dev, + zero_std_dev_old = zero_std_dev, + h_factor, + r_factor, + a_factor, e_old[ABC] = { delta_endstop_adj[A_AXIS], delta_endstop_adj[B_AXIS], delta_endstop_adj[C_AXIS] }, - dr_old = delta_radius, - zh_old = delta_height, - ta_old[ABC] = { + r_old = delta_radius, + h_old = delta_height, + a_old[ABC] = { delta_tower_angle_trim[A_AXIS], delta_tower_angle_trim[B_AXIS], delta_tower_angle_trim[C_AXIS] @@ -5721,10 +5877,10 @@ void home_all_axes() { gcode_G28(true); } SERIAL_PROTOCOLLNPGM("G33 Auto Calibrate"); - if (!_1p_calibration && !_0p_calibration) { // test if the outer radius is reachable + if (!_1p_calibration && !_0p_calibration) { // test if the outer radius is reachable LOOP_CAL_RAD(axis) { const float a = RADIANS(210 + (360 / NPP) * (axis - 1)), - r = delta_calibration_radius * (1 + (_7p_9_centre ? 0.1 : 0.0)); + r = delta_calibration_radius; if (!position_is_reachable(cos(a) * r, sin(a) * r)) { SERIAL_PROTOCOLLNPGM("?(M665 B)ed radius is implausible."); return; @@ -5732,159 +5888,137 @@ void home_all_axes() { gcode_G28(true); } } } - stepper.synchronize(); - #if HAS_LEVELING - reset_bed_level(); // After calibration bed-level data is no longer valid - #endif - - #if HOTENDS > 1 - const uint8_t old_tool_index = active_extruder; - tool_change(0, 0, true); - #define G33_CLEANUP() G33_cleanup(old_tool_index) - #else - #define G33_CLEANUP() G33_cleanup() - #endif - - setup_for_endstop_or_probe_move(); - endstops.enable(true); - if (!_0p_calibration) { - if (!home_delta()) - return; - endstops.not_homing(); - } - - if (auto_tune) { - #if HAS_BED_PROBE - G33_auto_tune(); - #else - SERIAL_PROTOCOLLNPGM("A probe is needed for auto-tune"); - #endif - G33_CLEANUP(); - return; - } - // Report settings - PGM_P checkingac = PSTR("Checking... AC"); // TODO: Make translatable string + const char *checkingac = PSTR("Checking... AC"); serialprintPGM(checkingac); if (verbose_level == 0) SERIAL_PROTOCOLPGM(" (DRY-RUN)"); + if (set_up) SERIAL_PROTOCOLPGM(" (SET-UP)"); SERIAL_EOL(); - lcd_setstatusPGM(checkingac); + char mess[11]; + strcpy_P(mess, checkingac); + lcd_setstatus(mess); - print_G33_settings(_endstop_results, _angle_results); + print_calibration_settings(_endstop_results, _angle_results); - do { + ac_setup(!_0p_calibration && !_1p_calibration); - float z_at_pt[NPP + 1] = { 0.0 }; + if (!_0p_calibration) + if (!ac_home()) return; - test_precision = zero_std_dev; + do { // start iterations + float z_at_pt[NPP + 1] = { 0.0 }; + + test_precision = zero_std_dev_old != 999.0 ? (zero_std_dev + zero_std_dev_old) / 2 : zero_std_dev; iterations++; // Probe the points - - zero_std_dev = probe_G33_points(z_at_pt, probe_points, towers_set, stow_after_each); - if (isnan(zero_std_dev)) { - SERIAL_PROTOCOLPGM("Correct delta_radius with M665 R or end-stops with M666 X Y Z"); - SERIAL_EOL(); - return G33_CLEANUP(); + zero_std_dev_old = zero_std_dev; + if (!probe_calibration_points(z_at_pt, probe_points, towers_set, stow_after_each, set_up)) { + SERIAL_PROTOCOLLNPGM("Correct delta settings with M665 and M666"); + return AC_CLEANUP(); } + zero_std_dev = std_dev_points(z_at_pt, _0p_calibration, _1p_calibration, _4p_calibration, _4p_opposite_points); // Solve matrices if ((zero_std_dev < test_precision || iterations <= force_iterations) && zero_std_dev > calibration_precision) { + + #if !HAS_BED_PROBE + test_precision = 0.00; // forced end + #endif + if (zero_std_dev < zero_std_dev_min) { + // set roll-back point COPY(e_old, delta_endstop_adj); - dr_old = delta_radius; - zh_old = delta_height; - COPY(ta_old, delta_tower_angle_trim); + r_old = delta_radius; + h_old = delta_height; + COPY(a_old, delta_tower_angle_trim); } - float e_delta[ABC] = { 0.0 }, r_delta = 0.0, t_delta[ABC] = { 0.0 }; - const float r_diff = delta_radius - delta_calibration_radius, - h_factor = 1 / 6.0 * - #ifdef H_FACTOR - (H_FACTOR), // Set in Configuration.h - #else - (1.00 + r_diff * 0.001), // 1.02 for r_diff = 20mm - #endif - r_factor = 1 / 6.0 * - #ifdef R_FACTOR - -(R_FACTOR), // Set in Configuration.h - #else - -(1.75 + 0.005 * r_diff + 0.001 * sq(r_diff)), // 2.25 for r_diff = 20mm - #endif - a_factor = 1 / 6.0 * - #ifdef A_FACTOR - (A_FACTOR); // Set in Configuration.h - #else - (66.66 / delta_calibration_radius); // 0.83 for cal_rd = 80mm - #endif - - #define ZP(N,I) ((N) * z_at_pt[I]) - #define Z6(I) ZP(6, I) + float e_delta[ABC] = { 0.0 }, + r_delta = 0.0, + t_delta[ABC] = { 0.0 }; + + /** + * convergence matrices: + * see https://github.com/LVD-AC/Marlin-AC/tree/1.1.x-AC/documentation for + * - definition of the matrix scaling parameters + * - matrices for 4 and 7 point calibration + */ + #define ZP(N,I) ((N) * z_at_pt[I] / 4.0) // 4.0 = divider to normalize to integers + #define Z12(I) ZP(12, I) #define Z4(I) ZP(4, I) #define Z2(I) ZP(2, I) #define Z1(I) ZP(1, I) + #define Z0(I) ZP(0, I) - #if !HAS_BED_PROBE - test_precision = 0.00; // forced end - #endif + // calculate factors + const float cr_old = delta_calibration_radius; + if (_7p_9_center) delta_calibration_radius *= 0.9; + h_factor = auto_tune_h(); + r_factor = auto_tune_r(); + a_factor = auto_tune_a(); + delta_calibration_radius = cr_old; switch (probe_points) { + case -1: + #if HAS_BED_PROBE + zprobe_zoffset += probe_z_shift(z_at_pt[CEN]); + #endif + case 0: test_precision = 0.00; // forced end break; case 1: test_precision = 0.00; // forced end - LOOP_XYZ(axis) e_delta[axis] = Z1(CEN); + LOOP_XYZ(axis) e_delta[axis] = +Z4(CEN); break; case 2: - if (towers_set) { - e_delta[A_AXIS] = (Z6(CEN) +Z4(__A) -Z2(__B) -Z2(__C)) * h_factor; - e_delta[B_AXIS] = (Z6(CEN) -Z2(__A) +Z4(__B) -Z2(__C)) * h_factor; - e_delta[C_AXIS] = (Z6(CEN) -Z2(__A) -Z2(__B) +Z4(__C)) * h_factor; - r_delta = (Z6(CEN) -Z2(__A) -Z2(__B) -Z2(__C)) * r_factor; + if (towers_set) { // see 4 point calibration (towers) matrix + e_delta[A_AXIS] = (+Z4(__A) -Z2(__B) -Z2(__C)) * h_factor +Z4(CEN); + e_delta[B_AXIS] = (-Z2(__A) +Z4(__B) -Z2(__C)) * h_factor +Z4(CEN); + e_delta[C_AXIS] = (-Z2(__A) -Z2(__B) +Z4(__C)) * h_factor +Z4(CEN); + r_delta = (+Z4(__A) +Z4(__B) +Z4(__C) -Z12(CEN)) * r_factor; } - else { - e_delta[A_AXIS] = (Z6(CEN) -Z4(_BC) +Z2(_CA) +Z2(_AB)) * h_factor; - e_delta[B_AXIS] = (Z6(CEN) +Z2(_BC) -Z4(_CA) +Z2(_AB)) * h_factor; - e_delta[C_AXIS] = (Z6(CEN) +Z2(_BC) +Z2(_CA) -Z4(_AB)) * h_factor; - r_delta = (Z6(CEN) -Z2(_BC) -Z2(_CA) -Z2(_AB)) * r_factor; + else { // see 4 point calibration (opposites) matrix + e_delta[A_AXIS] = (-Z4(_BC) +Z2(_CA) +Z2(_AB)) * h_factor +Z4(CEN); + e_delta[B_AXIS] = (+Z2(_BC) -Z4(_CA) +Z2(_AB)) * h_factor +Z4(CEN); + e_delta[C_AXIS] = (+Z2(_BC) +Z2(_CA) -Z4(_AB)) * h_factor +Z4(CEN); + r_delta = (+Z4(_BC) +Z4(_CA) +Z4(_AB) -Z12(CEN)) * r_factor; } break; - default: - e_delta[A_AXIS] = (Z6(CEN) +Z2(__A) -Z1(__B) -Z1(__C) -Z2(_BC) +Z1(_CA) +Z1(_AB)) * h_factor; - e_delta[B_AXIS] = (Z6(CEN) -Z1(__A) +Z2(__B) -Z1(__C) +Z1(_BC) -Z2(_CA) +Z1(_AB)) * h_factor; - e_delta[C_AXIS] = (Z6(CEN) -Z1(__A) -Z1(__B) +Z2(__C) +Z1(_BC) +Z1(_CA) -Z2(_AB)) * h_factor; - r_delta = (Z6(CEN) -Z1(__A) -Z1(__B) -Z1(__C) -Z1(_BC) -Z1(_CA) -Z1(_AB)) * r_factor; - - if (towers_set) { - t_delta[A_AXIS] = ( -Z4(__B) +Z4(__C) -Z4(_CA) +Z4(_AB)) * a_factor; - t_delta[B_AXIS] = ( Z4(__A) -Z4(__C) +Z4(_BC) -Z4(_AB)) * a_factor; - t_delta[C_AXIS] = (-Z4(__A) +Z4(__B) -Z4(_BC) +Z4(_CA) ) * a_factor; - e_delta[A_AXIS] += (t_delta[B_AXIS] - t_delta[C_AXIS]) / 4.5; - e_delta[B_AXIS] += (t_delta[C_AXIS] - t_delta[A_AXIS]) / 4.5; - e_delta[C_AXIS] += (t_delta[A_AXIS] - t_delta[B_AXIS]) / 4.5; + default: // see 7 point calibration (towers & opposites) matrix + e_delta[A_AXIS] = (+Z2(__A) -Z1(__B) -Z1(__C) -Z2(_BC) +Z1(_CA) +Z1(_AB)) * h_factor +Z4(CEN); + e_delta[B_AXIS] = (-Z1(__A) +Z2(__B) -Z1(__C) +Z1(_BC) -Z2(_CA) +Z1(_AB)) * h_factor +Z4(CEN); + e_delta[C_AXIS] = (-Z1(__A) -Z1(__B) +Z2(__C) +Z1(_BC) +Z1(_CA) -Z2(_AB)) * h_factor +Z4(CEN); + r_delta = (+Z2(__A) +Z2(__B) +Z2(__C) +Z2(_BC) +Z2(_CA) +Z2(_AB) -Z12(CEN)) * r_factor; + + if (towers_set) { // see 7 point tower angle calibration (towers & opposites) matrix + t_delta[A_AXIS] = (+Z0(__A) -Z4(__B) +Z4(__C) +Z0(_BC) -Z4(_CA) +Z4(_AB) +Z0(CEN)) * a_factor; + t_delta[B_AXIS] = (+Z4(__A) +Z0(__B) -Z4(__C) +Z4(_BC) +Z0(_CA) -Z4(_AB) +Z0(CEN)) * a_factor; + t_delta[C_AXIS] = (-Z4(__A) +Z4(__B) +Z0(__C) -Z4(_BC) +Z4(_CA) +Z0(_AB) +Z0(CEN)) * a_factor; } break; } - LOOP_XYZ(axis) delta_endstop_adj[axis] += e_delta[axis]; delta_radius += r_delta; LOOP_XYZ(axis) delta_tower_angle_trim[axis] += t_delta[axis]; } - else if (zero_std_dev >= test_precision) { // step one back + else if (zero_std_dev >= test_precision) { + // roll back COPY(delta_endstop_adj, e_old); - delta_radius = dr_old; - delta_height = zh_old; - COPY(delta_tower_angle_trim, ta_old); + delta_radius = r_old; + delta_height = h_old; + COPY(delta_tower_angle_trim, a_old); } if (verbose_level != 0) { // !dry run + // normalise angles to least squares if (_angle_results) { float a_sum = 0.0; @@ -5901,16 +6035,16 @@ void home_all_axes() { gcode_G28(true); } NOMORE(zero_std_dev_min, zero_std_dev); // print report + + if (verbose_level == 3) + print_calibration_results(z_at_pt, _tower_results, _opposite_results); - if (verbose_level > 2) - print_G33_results(z_at_pt, _tower_results, _opposite_results); - - if (verbose_level != 0) { // !dry run - if ((zero_std_dev >= test_precision && iterations > force_iterations) || zero_std_dev <= calibration_precision) { // end iterations + if (verbose_level != 0) { // !dry run + if ((zero_std_dev >= test_precision && iterations > force_iterations) || zero_std_dev <= calibration_precision) { // end iterations SERIAL_PROTOCOLPGM("Calibration OK"); SERIAL_PROTOCOL_SP(32); #if HAS_BED_PROBE - if (zero_std_dev >= test_precision && !_1p_calibration) + if (zero_std_dev >= test_precision && !_1p_calibration && !_0p_calibration) SERIAL_PROTOCOLPGM("rolling back."); else #endif @@ -5926,11 +6060,11 @@ void home_all_axes() { gcode_G28(true); } else sprintf_P(&mess[15], PSTR("%03i.x"), (int)round(zero_std_dev_min)); lcd_setstatus(mess); - print_G33_settings(_endstop_results, _angle_results); + print_calibration_settings(_endstop_results, _angle_results); serialprintPGM(save_message); SERIAL_EOL(); } - else { // !end iterations + else { // !end iterations char mess[15]; if (iterations < 31) sprintf_P(mess, PSTR("Iteration : %02i"), (int)iterations); @@ -5943,11 +6077,11 @@ void home_all_axes() { gcode_G28(true); } SERIAL_EOL(); lcd_setstatus(mess); if (verbose_level > 1) - print_G33_settings(_endstop_results, _angle_results); + print_calibration_settings(_endstop_results, _angle_results); } } - else { // dry run - PGM_P enddryrun = PSTR("End DRY-RUN"); + else { // dry run + const char *enddryrun = PSTR("End DRY-RUN"); serialprintPGM(enddryrun); SERIAL_PROTOCOL_SP(35); SERIAL_PROTOCOLPGM("std dev:"); @@ -5963,16 +6097,11 @@ void home_all_axes() { gcode_G28(true); } sprintf_P(&mess[15], PSTR("%03i.x"), (int)round(zero_std_dev)); lcd_setstatus(mess); } - - endstops.enable(true); - if (!home_delta()) - return; - endstops.not_homing(); - + if (!ac_home()) return; } while (((zero_std_dev < test_precision && iterations < 31) || iterations <= force_iterations) && zero_std_dev > calibration_precision); - G33_CLEANUP(); + AC_CLEANUP(); } #endif // DELTA_AUTO_CALIBRATION @@ -6205,9 +6334,11 @@ inline void gcode_G92() { hasS = ms > 0; } + const bool has_message = !hasP && !hasS && args && *args; + #if ENABLED(ULTIPANEL) - if (!hasP && !hasS && args && *args) + if (has_message) lcd_setstatus(args, true); else { LCD_MESSAGEPGM(MSG_USERWAIT); @@ -6218,7 +6349,7 @@ inline void gcode_G92() { #else - if (!hasP && !hasS && args && *args) { + if (has_message) { SERIAL_ECHO_START(); SERIAL_ECHOLN(args); } @@ -6229,22 +6360,23 @@ inline void gcode_G92() { wait_for_user = true; stepper.synchronize(); - refresh_cmd_timeout(); if (ms > 0) { - ms += previous_cmd_ms; // wait until this time for a click + ms += millis(); // wait until this time for a click while (PENDING(millis(), ms) && wait_for_user) idle(); } - else { - #if ENABLED(ULTIPANEL) - if (lcd_detected()) { - while (wait_for_user) idle(); - print_job_timer.isPaused() ? LCD_MESSAGEPGM(WELCOME_MSG) : LCD_MESSAGEPGM(MSG_RESUMING); - } - #else - while (wait_for_user) idle(); - #endif - } + else + while (wait_for_user) idle(); + + + #if ENABLED(PRINTER_EVENT_LEDS) && ENABLED(SDSUPPORT) + if (lights_off_after_print) { + leds.set_off(); + lights_off_after_print = false; + } + #endif + + lcd_reset_status(); wait_for_user = false; KEEPALIVE_STATE(IN_HANDLER); @@ -6449,7 +6581,7 @@ inline void gcode_M17() { * * Returns 'true' if load was completed, 'false' for abort */ - static bool load_filament(const float &load_length=0, const float &purge_length=0, const int8_t max_beep_count=0, + static bool load_filament(const float &slow_load_length=0, const float &fast_load_length=0, const float &purge_length=0, const int8_t max_beep_count=0, const bool show_lcd=false, const bool pause_for_user=false, const AdvancedPauseMode mode=ADVANCED_PAUSE_MODE_PAUSE_PRINT ) { @@ -6496,40 +6628,70 @@ inline void gcode_M17() { lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_LOAD, mode); #endif - // Load filament - if (load_length) do_pause_e_move(load_length, FILAMENT_CHANGE_LOAD_FEEDRATE); + // Slow Load filament + if (slow_load_length) do_pause_e_move(slow_load_length, FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE); - do { - if (purge_length > 0) { - // "Wait for filament purge" - #if ENABLED(ULTIPANEL) - if (show_lcd) - lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_PURGE, mode); - #endif + // Fast Load Filament + if (fast_load_length) { + #if FILAMENT_CHANGE_FAST_LOAD_ACCEL > 0 + const float saved_acceleration = planner.retract_acceleration; + planner.retract_acceleration = FILAMENT_CHANGE_FAST_LOAD_ACCEL; + #endif - // Extrude filament to get into hotend - do_pause_e_move(purge_length, ADVANCED_PAUSE_EXTRUDE_FEEDRATE); - } + do_pause_e_move(fast_load_length, FILAMENT_CHANGE_FAST_LOAD_FEEDRATE); - // Show "Purge More" / "Resume" menu and wait for reply - #if ENABLED(ULTIPANEL) - if (show_lcd) { - KEEPALIVE_STATE(PAUSED_FOR_USER); - wait_for_user = false; - lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_OPTION, mode); - while (advanced_pause_menu_response == ADVANCED_PAUSE_RESPONSE_WAIT_FOR) idle(true); - KEEPALIVE_STATE(IN_HANDLER); - } + #if FILAMENT_CHANGE_FAST_LOAD_ACCEL > 0 + planner.retract_acceleration = saved_acceleration; #endif + } + + #if ENABLED(ADVANCED_PAUSE_CONTINUOUS_PURGE) - // Keep looping if "Purge More" was selected - } while ( #if ENABLED(ULTIPANEL) - show_lcd && advanced_pause_menu_response == ADVANCED_PAUSE_RESPONSE_EXTRUDE_MORE - #else - 0 + if (show_lcd) + lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_CONTINUOUS_PURGE); #endif - ); + + wait_for_user = true; + for (float purge_count = purge_length; purge_count > 0 && wait_for_user; --purge_count) + do_pause_e_move(1, ADVANCED_PAUSE_PURGE_FEEDRATE); + wait_for_user = false; + + #else + + do { + if (purge_length > 0) { + // "Wait for filament purge" + #if ENABLED(ULTIPANEL) + if (show_lcd) + lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_PURGE, mode); + #endif + + // Extrude filament to get into hotend + do_pause_e_move(purge_length, ADVANCED_PAUSE_PURGE_FEEDRATE); + } + + // Show "Purge More" / "Resume" menu and wait for reply + #if ENABLED(ULTIPANEL) + if (show_lcd) { + KEEPALIVE_STATE(PAUSED_FOR_USER); + wait_for_user = false; + lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_OPTION, mode); + while (advanced_pause_menu_response == ADVANCED_PAUSE_RESPONSE_WAIT_FOR) idle(true); + KEEPALIVE_STATE(IN_HANDLER); + } + #endif + + // Keep looping if "Purge More" was selected + } while ( + #if ENABLED(ULTIPANEL) + show_lcd && advanced_pause_menu_response == ADVANCED_PAUSE_RESPONSE_EXTRUDE_MORE + #else + 0 + #endif + ); + + #endif return true; } @@ -6573,8 +6735,17 @@ inline void gcode_M17() { do_pause_e_move(FILAMENT_UNLOAD_RETRACT_LENGTH + FILAMENT_UNLOAD_PURGE_LENGTH, planner.max_feedrate_mm_s[E_AXIS]); // Unload filament + #if FILAMENT_CHANGE_FAST_LOAD_ACCEL > 0 + const float saved_acceleration = planner.retract_acceleration; + planner.retract_acceleration = FILAMENT_CHANGE_UNLOAD_ACCEL; + #endif + do_pause_e_move(unload_length, FILAMENT_CHANGE_UNLOAD_FEEDRATE); + #if FILAMENT_CHANGE_FAST_LOAD_ACCEL > 0 + planner.retract_acceleration = saved_acceleration; + #endif + // Disable extruders steppers for manual filament changing (only on boards that have separate ENABLE_PINS) #if E0_ENABLE_PIN != X_ENABLE_PIN && E1_ENABLE_PIN != Y_ENABLE_PIN disable_e_stepper(active_extruder); @@ -6611,7 +6782,7 @@ inline void gcode_M17() { #if ENABLED(ULTIPANEL) if (show_lcd) // Show status screen lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_STATUS); - LCD_MESSAGEPGM(MSG_M600_TOO_COLD); + LCD_MESSAGEPGM(MSG_M600_TOO_COLD); #endif return false; // unable to reach safe temperature @@ -6763,7 +6934,7 @@ inline void gcode_M17() { * - Send host action for resume, if configured * - Resume the current SD print job, if any */ - static void resume_print(const float &load_length=0, const float &purge_length=ADVANCED_PAUSE_EXTRUDE_LENGTH, const int8_t max_beep_count=0) { + static void resume_print(const float &slow_load_length=0, const float &fast_load_length=0, const float &purge_length=ADVANCED_PAUSE_PURGE_LENGTH, const int8_t max_beep_count=0) { if (!did_pause_print) return; // Re-enable the heaters if they timed out @@ -6775,7 +6946,7 @@ inline void gcode_M17() { if (nozzle_timed_out || thermalManager.hotEnoughToExtrude(active_extruder)) { // Load the new filament - load_filament(load_length, purge_length, max_beep_count, true, nozzle_timed_out); + load_filament(slow_load_length, fast_load_length, purge_length, max_beep_count, true, nozzle_timed_out); } #if ENABLED(ULTIPANEL) @@ -6862,6 +7033,10 @@ inline void gcode_M17() { * M24: Start or Resume SD Print */ inline void gcode_M24() { + #if ENABLED(POWER_LOSS_RECOVERY) + card.removeJobRecoveryFile(); + #endif + #if ENABLED(PARK_HEAD_ON_PAUSE) resume_print(); #endif @@ -7129,14 +7304,14 @@ inline void gcode_M42() { SERIAL_ERROR_START(); SERIAL_ERRORLNPGM("SERVO not setup"); - #elif !HAS_Z_SERVO_ENDSTOP + #elif !HAS_Z_SERVO_PROBE SERIAL_ERROR_START(); - SERIAL_ERRORLNPGM("Z_ENDSTOP_SERVO_NR not setup"); + SERIAL_ERRORLNPGM("Z_PROBE_SERVO_NR not setup"); - #else // HAS_Z_SERVO_ENDSTOP + #else // HAS_Z_SERVO_PROBE - const uint8_t probe_index = parser.byteval('P', Z_ENDSTOP_SERVO_NR); + const uint8_t probe_index = parser.byteval('P', Z_PROBE_SERVO_NR); SERIAL_PROTOCOLLNPGM("Servo probe test"); SERIAL_PROTOCOLLNPAIR(". using index: ", probe_index); @@ -7191,8 +7366,6 @@ inline void gcode_M42() { } if (probe_inverting != deploy_state) SERIAL_PROTOCOLLNPGM("WARNING - INVERTING setting probably backwards"); - refresh_cmd_timeout(); - if (deploy_state != stow_state) { SERIAL_PROTOCOLLNPGM("BLTouch clone detected"); if (deploy_state) { @@ -7219,8 +7392,7 @@ inline void gcode_M42() { safe_delay(2); - if (0 == j % (500 * 1)) // keep cmd_timeout happy - refresh_cmd_timeout(); + if (0 == j % (500 * 1)) reset_stepper_timeout(); // Keep steppers powered if (deploy_state != READ(PROBE_TEST_PIN)) { // probe triggered @@ -7396,7 +7568,7 @@ inline void gcode_M42() { return; } - const bool stow_probe_after_each = parser.boolval('E'); + const ProbePtRaise raise_after = parser.boolval('E') ? PROBE_PT_STOW : PROBE_PT_RAISE; float X_current = current_position[X_AXIS], Y_current = current_position[Y_AXIS]; @@ -7440,7 +7612,7 @@ inline void gcode_M42() { double mean = 0.0, sigma = 0.0, min = 99999.9, max = -99999.9, sample_set[n_samples]; // Move to the first point, deploy, and probe - const float t = probe_pt(X_probe_location, Y_probe_location, stow_probe_after_each, verbose_level); + const float t = probe_pt(X_probe_location, Y_probe_location, raise_after, verbose_level); bool probing_good = !isnan(t); if (probing_good) { @@ -7516,7 +7688,7 @@ inline void gcode_M42() { } // n_legs // Probe a single point - sample_set[n] = probe_pt(X_probe_location, Y_probe_location, stow_probe_after_each, 0); + sample_set[n] = probe_pt(X_probe_location, Y_probe_location, raise_after); // Break the loop if the probe fails probing_good = !isnan(sample_set[n]); @@ -7597,7 +7769,10 @@ inline void gcode_M42() { set_bed_leveling_enabled(was_enabled); #endif - move_z_after_probing(); + #if Z_AFTER_PROBING + move_z_after_probing(); + #endif + report_current_position(); } @@ -7694,7 +7869,11 @@ inline void gcode_M104() { #if ENABLED(ULTRA_LCD) if (parser.value_celsius() > thermalManager.degHotend(target_extruder)) - lcd_status_printf_P(0, PSTR("E%i %s"), target_extruder + 1, MSG_HEATING); + #if HOTENDS > 1 + lcd_status_printf_P(0, PSTR("E%i " MSG_HEATING), target_extruder + 1); + #else + LCD_MESSAGEPGM("E " MSG_HEATING); + #endif #endif } @@ -7853,8 +8032,13 @@ inline void gcode_M109() { #endif #if ENABLED(ULTRA_LCD) - if (thermalManager.isHeatingHotend(target_extruder)) - lcd_status_printf_P(0, PSTR("E%i %s"), target_extruder + 1, MSG_HEATING); + const bool heating = thermalManager.isHeatingHotend(target_extruder); + if (heating || !no_wait_for_cooling) + #if HOTENDS > 1 + lcd_status_printf_P(0, heating ? PSTR("E%i " MSG_HEATING) : PSTR("E%i " MSG_COOLING), target_extruder + 1); + #else + lcd_setstatusPGM(heating ? PSTR("E " MSG_HEATING) : PSTR("E " MSG_COOLING)); + #endif #endif } else return; @@ -7911,7 +8095,7 @@ inline void gcode_M109() { } idle(); - refresh_cmd_timeout(); // to prevent stepper_inactive_time from running out + reset_stepper_timeout(); // Keep steppers powered const float temp = thermalManager.degHotend(target_extruder); @@ -7960,7 +8144,7 @@ inline void gcode_M109() { } while (wait_for_heatup && TEMP_CONDITIONS); if (wait_for_heatup) { - LCD_MESSAGEPGM(MSG_HEATING_COMPLETE); + lcd_reset_status(); #if ENABLED(PRINTER_EVENT_LEDS) leds.set_white(); #endif @@ -7987,7 +8171,6 @@ inline void gcode_M109() { inline void gcode_M190() { if (DEBUGGING(DRYRUN)) return; - LCD_MESSAGEPGM(MSG_BED_HEATING); const bool no_wait_for_cooling = parser.seenval('S'); if (no_wait_for_cooling || parser.seenval('R')) { thermalManager.setTargetBed(parser.value_celsius()); @@ -7998,6 +8181,8 @@ inline void gcode_M109() { } else return; + lcd_setstatusPGM(thermalManager.isHeatingBed() ? PSTR(MSG_BED_HEATING) : PSTR(MSG_BED_COOLING)); + #if TEMP_BED_RESIDENCY_TIME > 0 millis_t residency_start_ms = 0; // Loop until the temperature has stabilized @@ -8048,7 +8233,7 @@ inline void gcode_M109() { } idle(); - refresh_cmd_timeout(); // to prevent stepper_inactive_time from running out + reset_stepper_timeout(); // Keep steppers powered const float temp = thermalManager.degBed(); @@ -8096,7 +8281,7 @@ inline void gcode_M109() { } while (wait_for_heatup && TEMP_BED_CONDITIONS); - if (wait_for_heatup) LCD_MESSAGEPGM(MSG_BED_DONE); + if (wait_for_heatup) lcd_reset_status(); #if DISABLED(BUSY_WHILE_HEATING) KEEPALIVE_STATE(IN_HANDLER); #endif @@ -8117,7 +8302,7 @@ inline void gcode_M110() { inline void gcode_M111() { if (parser.seen('S')) marlin_debug_flags = parser.byteval('S'); - const static char str_debug_1[] PROGMEM = MSG_DEBUG_ECHO, + static const char str_debug_1[] PROGMEM = MSG_DEBUG_ECHO, str_debug_2[] PROGMEM = MSG_DEBUG_INFO, str_debug_4[] PROGMEM = MSG_DEBUG_ERRORS, str_debug_8[] PROGMEM = MSG_DEBUG_DRYRUN, @@ -8127,7 +8312,7 @@ inline void gcode_M111() { #endif ; - const static char* const debug_strings[] PROGMEM = { + static const char* const debug_strings[] PROGMEM = { str_debug_1, str_debug_2, str_debug_4, str_debug_8, str_debug_16 #if ENABLED(DEBUG_LEVELING_FEATURE) , str_debug_32 @@ -8141,7 +8326,7 @@ inline void gcode_M111() { for (uint8_t i = 0; i < COUNT(debug_strings); i++) { if (TEST(marlin_debug_flags, i)) { if (comma++) SERIAL_CHAR(','); - serialprintPGM((char*)pgm_read_word(&debug_strings[i])); + serialprintPGM((char*)pgm_read_ptr(&debug_strings[i])); } } } @@ -8278,19 +8463,14 @@ inline void gcode_M140() { OUT_WRITE(SUICIDE_PIN, HIGH); #endif - #if ENABLED(HAVE_TMC2130) - delay(100); - tmc2130_init(); // Settings only stick when the driver has power + #if DISABLED(AUTO_POWER_CONTROL) + delay(100); // Wait for power to settle + restore_stepper_drivers(); #endif #if ENABLED(ULTIPANEL) LCD_MESSAGEPGM(WELCOME_MSG); #endif - - #if ENABLED(HAVE_TMC2208) - delay(100); - tmc2208_init(); - #endif } #endif // HAS_POWER_SWITCH @@ -8650,13 +8830,25 @@ inline void gcode_M115() { #endif ); + // THERMAL_PROTECTION + cap_line(PSTR("THERMAL_PROTECTION") + #if ENABLED(THERMAL_PROTECTION_HOTENDS) && ENABLED(THERMAL_PROTECTION_BED) + , true + #endif + ); + #endif // EXTENDED_CAPABILITIES_REPORT } /** * M117: Set LCD Status Message */ -inline void gcode_M117() { lcd_setstatus(parser.string_arg); } +inline void gcode_M117() { + if (parser.string_arg[0]) + lcd_setstatus(parser.string_arg); + else + lcd_reset_status(); +} /** * M118: Display a message in the host console. @@ -8665,9 +8857,18 @@ inline void gcode_M117() { lcd_setstatus(parser.string_arg); } * E1 Have the host 'echo:' the text */ inline void gcode_M118() { - if (parser.seenval('E') && parser.value_bool()) SERIAL_ECHO_START(); - if (parser.seenval('A') && parser.value_bool()) SERIAL_ECHOPGM("// "); - SERIAL_ECHOLN(parser.string_arg); + bool hasE = false, hasA = false; + char *p = parser.string_arg; + for (uint8_t i = 2; i--;) + if ((p[0] == 'A' || p[0] == 'E') && p[1] == '1') { + if (p[0] == 'A') hasA = true; + if (p[0] == 'E') hasE = true; + p += 2; + while (*p == ' ') ++p; + } + if (hasE) SERIAL_ECHO_START(); + if (hasA) SERIAL_ECHOPGM("// "); + SERIAL_ECHOLN(p); } /** @@ -8892,7 +9093,13 @@ inline void gcode_M205() { if (parser.seen('B')) planner.min_segment_time_us = parser.value_ulong(); if (parser.seen('X')) planner.max_jerk[X_AXIS] = parser.value_linear_units(); if (parser.seen('Y')) planner.max_jerk[Y_AXIS] = parser.value_linear_units(); - if (parser.seen('Z')) planner.max_jerk[Z_AXIS] = parser.value_linear_units(); + if (parser.seen('Z')) { + planner.max_jerk[Z_AXIS] = parser.value_linear_units(); + #if HAS_MESH + if (planner.max_jerk[Z_AXIS] <= 0.1) + SERIAL_ECHOLNPGM("WARNING! Low Z Jerk may lead to unwanted pauses."); + #endif + } if (parser.seen('E')) planner.max_jerk[E_AXIS] = parser.value_linear_units(); } @@ -8931,7 +9138,7 @@ inline void gcode_M205() { * B = delta calibration radius * X = Alpha (Tower 1) angle trim * Y = Beta (Tower 2) angle trim - * Z = Rotate A and B by this angle + * Z = Gamma (Tower 3) angle trim */ inline void gcode_M665() { if (parser.seen('H')) delta_height = parser.value_linear_units(); @@ -9196,6 +9403,14 @@ inline void gcode_M221() { planner.flow_percentage[target_extruder] = parser.value_int(); planner.refresh_e_factor(target_extruder); } + else { + SERIAL_ECHO_START(); + SERIAL_CHAR('E'); + SERIAL_CHAR('0' + target_extruder); + SERIAL_ECHOPAIR(" Flow: ", planner.flow_percentage[target_extruder]); + SERIAL_CHAR('%'); + SERIAL_EOL(); + } } /** @@ -9690,7 +9905,9 @@ inline void gcode_M400() { stepper.synchronize(); } */ inline void gcode_M402() { STOW_PROBE(); - move_z_after_probing(); + #if Z_AFTER_PROBING + move_z_after_probing(); + #endif report_current_position(); } @@ -9771,6 +9988,7 @@ void quickstop_stepper() { * With AUTO_BED_LEVELING_UBL only: * * L[index] Load UBL mesh from index (0 is default) + * T[map] 0:Human-readable 1:CSV 2:"LCD" 4:Compact */ inline void gcode_M420() { @@ -9809,7 +10027,7 @@ void quickstop_stepper() { // L to load a mesh from the EEPROM if (parser.seen('L') || parser.seen('V')) { - ubl.display_map(0); // Currently only supports one map type + ubl.display_map(parser.byteval('T')); // 0= SERIAL_ECHOLNPAIR("ubl.mesh_is_valid = ", ubl.mesh_is_valid()); SERIAL_ECHOLNPAIR("ubl.storage_slot = ", ubl.storage_slot); } @@ -9940,6 +10158,7 @@ void quickstop_stepper() { * Usage: * M421 I J Z * M421 I J Q + * M421 I J N * M421 C Z * M421 C Q */ @@ -9948,6 +10167,7 @@ void quickstop_stepper() { const bool hasI = ix >= 0, hasJ = iy >= 0, hasC = parser.seen('C'), + hasN = parser.seen('N'), hasZ = parser.seen('Z'), hasQ = !hasZ && parser.seen('Q'); @@ -9957,7 +10177,7 @@ void quickstop_stepper() { iy = location.y_index; } - if (int(hasC) + int(hasI && hasJ) != 1 || !(hasZ || hasQ)) { + if (int(hasC) + int(hasI && hasJ) != 1 || !(hasZ || hasQ || hasN)) { SERIAL_ERROR_START(); SERIAL_ERRORLNPGM(MSG_ERR_M421_PARAMETERS); } @@ -9966,7 +10186,7 @@ void quickstop_stepper() { SERIAL_ERRORLNPGM(MSG_ERR_MESH_XY); } else - ubl.z_values[ix][iy] = parser.value_linear_units() + (hasQ ? ubl.z_values[ix][iy] : 0); + ubl.z_values[ix][iy] = hasN ? NAN : parser.value_linear_units() + (hasQ ? ubl.z_values[ix][iy] : 0); } #endif // AUTO_BED_LEVELING_UBL @@ -10167,6 +10387,10 @@ inline void gcode_M502() { #if ENABLED(ADVANCED_PAUSE_FEATURE) + #ifndef FILAMENT_CHANGE_SLOW_LOAD_LENGTH + #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 + #endif + /** * M600: Pause for filament change * @@ -10226,8 +10450,11 @@ inline void gcode_M502() { const float unload_length = -FABS(parser.seen('U') ? parser.value_axis_units(E_AXIS) : filament_change_unload_length[active_extruder]); - // Load filament - const float load_length = FABS(parser.seen('L') ? parser.value_axis_units(E_AXIS) : + // Slow load filament + constexpr float slow_load_length = FILAMENT_CHANGE_SLOW_LOAD_LENGTH; + + // Fast load filament + const float fast_load_length = FABS(parser.seen('L') ? parser.value_axis_units(E_AXIS) : filament_change_load_length[active_extruder]); const int beep_count = parser.intval('B', @@ -10242,7 +10469,7 @@ inline void gcode_M502() { if (pause_print(retract, park_point, unload_length, true)) { wait_for_filament_reload(beep_count); - resume_print(load_length, ADVANCED_PAUSE_EXTRUDE_LENGTH, beep_count); + resume_print(slow_load_length, fast_load_length, ADVANCED_PAUSE_PURGE_LENGTH, beep_count); } #if EXTRUDERS > 1 @@ -10378,10 +10605,6 @@ inline void gcode_M502() { // Z axis lift if (parser.seenval('Z')) park_point.z = parser.linearval('Z'); - // Load filament - const float load_length = FABS(parser.seen('L') ? parser.value_axis_units(E_AXIS) : - filament_change_load_length[target_extruder]); - // Show initial "wait for load" message #if ENABLED(ULTIPANEL) lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_LOAD, ADVANCED_PAUSE_MODE_LOAD_FILAMENT, target_extruder); @@ -10398,12 +10621,14 @@ inline void gcode_M502() { if (park_point.z > 0) do_blocking_move_to_z(min(current_position[Z_AXIS] + park_point.z, Z_MAX_POS), NOZZLE_PARK_Z_FEEDRATE); - load_filament(load_length, ADVANCED_PAUSE_EXTRUDE_LENGTH, FILAMENT_CHANGE_ALERT_BEEPS, true, - thermalManager.wait_for_heating(target_extruder), ADVANCED_PAUSE_MODE_LOAD_FILAMENT); + constexpr float slow_load_length = FILAMENT_CHANGE_SLOW_LOAD_LENGTH; + const float fast_load_length = FABS(parser.seen('L') ? parser.value_axis_units(E_AXIS) : filament_change_load_length[active_extruder]); + load_filament(slow_load_length, fast_load_length, ADVANCED_PAUSE_PURGE_LENGTH, FILAMENT_CHANGE_ALERT_BEEPS, + true, thermalManager.wait_for_heating(target_extruder), ADVANCED_PAUSE_MODE_LOAD_FILAMENT); // Restore Z axis if (park_point.z > 0) - do_blocking_move_to_z(max(current_position[Z_AXIS] - park_point.z, Z_MIN_POS), NOZZLE_PARK_Z_FEEDRATE); + do_blocking_move_to_z(max(current_position[Z_AXIS] - park_point.z, 0), NOZZLE_PARK_Z_FEEDRATE); #if EXTRUDERS > 1 // Restore toolhead if it was changed @@ -10476,7 +10701,7 @@ inline void gcode_M502() { // Restore Z axis if (park_point.z > 0) - do_blocking_move_to_z(max(current_position[Z_AXIS] - park_point.z, Z_MIN_POS), NOZZLE_PARK_Z_FEEDRATE); + do_blocking_move_to_z(max(current_position[Z_AXIS] - park_point.z, 0), NOZZLE_PARK_Z_FEEDRATE); #if EXTRUDERS > 1 // Restore toolhead if it was changed @@ -10530,46 +10755,104 @@ inline void gcode_M502() { * Report driver currents when no axis specified */ inline void gcode_M906() { - uint16_t values[XYZE]; - LOOP_XYZE(i) values[i] = parser.intval(axis_codes[i]); + #define TMC_SAY_CURRENT(Q) tmc_get_current(stepper##Q, TMC_##Q) + #define TMC_SET_CURRENT(Q) tmc_set_current(stepper##Q, TMC_##Q, value) - #define TMC_SET_GET_CURRENT(P,Q) do { \ - if (values[P##_AXIS]) tmc_set_current(stepper##Q, TMC_##Q, values[P##_AXIS]); \ - else tmc_get_current(stepper##Q, TMC_##Q); } while(0) + bool report = true; + const uint8_t index = parser.byteval('I'); + LOOP_XYZE(i) if (uint16_t value = parser.intval(axis_codes[i])) { + report = false; + switch (i) { + case X_AXIS: + #if X_IS_TRINAMIC + if (index == 0) TMC_SET_CURRENT(X); + #endif + #if X2_IS_TRINAMIC + if (index == 1) TMC_SET_CURRENT(X2); + #endif + break; + case Y_AXIS: + #if Y_IS_TRINAMIC + if (index == 0) TMC_SET_CURRENT(Y); + #endif + #if Y2_IS_TRINAMIC + if (index == 1) TMC_SET_CURRENT(Y2); + #endif + break; + case Z_AXIS: + #if Z_IS_TRINAMIC + if (index == 0) TMC_SET_CURRENT(Z); + #endif + #if Z2_IS_TRINAMIC + if (index == 1) TMC_SET_CURRENT(Z2); + #endif + break; + case E_AXIS: { + if (get_target_extruder_from_command(906)) return; + switch (target_extruder) { + #if E0_IS_TRINAMIC + case 0: TMC_SET_CURRENT(E0); break; + #endif + #if E1_IS_TRINAMIC + case 1: TMC_SET_CURRENT(E1); break; + #endif + #if E2_IS_TRINAMIC + case 2: TMC_SET_CURRENT(E2); break; + #endif + #if E3_IS_TRINAMIC + case 3: TMC_SET_CURRENT(E3); break; + #endif + #if E4_IS_TRINAMIC + case 4: TMC_SET_CURRENT(E4); break; + #endif + } + } break; + } + } - #if X_IS_TRINAMIC - TMC_SET_GET_CURRENT(X,X); - #endif - #if X2_IS_TRINAMIC - TMC_SET_GET_CURRENT(X,X2); - #endif - #if Y_IS_TRINAMIC - TMC_SET_GET_CURRENT(Y,Y); - #endif - #if Y2_IS_TRINAMIC - TMC_SET_GET_CURRENT(Y,Y2); - #endif - #if Z_IS_TRINAMIC - TMC_SET_GET_CURRENT(Z,Z); - #endif - #if Z2_IS_TRINAMIC - TMC_SET_GET_CURRENT(Z,Z2); - #endif - #if E0_IS_TRINAMIC - TMC_SET_GET_CURRENT(E,E0); - #endif - #if E1_IS_TRINAMIC - TMC_SET_GET_CURRENT(E,E1); - #endif - #if E2_IS_TRINAMIC - TMC_SET_GET_CURRENT(E,E2); - #endif - #if E3_IS_TRINAMIC - TMC_SET_GET_CURRENT(E,E3); - #endif - #if E4_IS_TRINAMIC - TMC_SET_GET_CURRENT(E,E4); - #endif + if (report) LOOP_XYZE(i) switch (i) { + case X_AXIS: + #if X_IS_TRINAMIC + TMC_SAY_CURRENT(X); + #endif + #if X2_IS_TRINAMIC + TMC_SAY_CURRENT(X2); + #endif + break; + case Y_AXIS: + #if Y_IS_TRINAMIC + TMC_SAY_CURRENT(Y); + #endif + #if Y2_IS_TRINAMIC + TMC_SAY_CURRENT(Y2); + #endif + break; + case Z_AXIS: + #if Z_IS_TRINAMIC + TMC_SAY_CURRENT(Z); + #endif + #if Z2_IS_TRINAMIC + TMC_SAY_CURRENT(Z2); + #endif + break; + case E_AXIS: + #if E0_IS_TRINAMIC + TMC_SAY_CURRENT(E0); + #endif + #if E1_IS_TRINAMIC + TMC_SAY_CURRENT(E1); + #endif + #if E2_IS_TRINAMIC + TMC_SAY_CURRENT(E2); + #endif + #if E3_IS_TRINAMIC + TMC_SAY_CURRENT(E3); + #endif + #if E4_IS_TRINAMIC + TMC_SAY_CURRENT(E4); + #endif + break; + } } /** @@ -10622,46 +10905,106 @@ inline void gcode_M502() { */ #if ENABLED(HYBRID_THRESHOLD) inline void gcode_M913() { - uint16_t values[XYZE]; - LOOP_XYZE(i) values[i] = parser.intval(axis_codes[i]); - - #define TMC_SET_GET_PWMTHRS(P,Q) do { \ - if (values[P##_AXIS]) tmc_set_pwmthrs(stepper##Q, TMC_##Q, values[P##_AXIS], planner.axis_steps_per_mm[P##_AXIS]); \ - else tmc_get_pwmthrs(stepper##Q, TMC_##Q, planner.axis_steps_per_mm[P##_AXIS]); } while(0) + #define TMC_SAY_PWMTHRS(P,Q) tmc_get_pwmthrs(stepper##Q, TMC_##Q, planner.axis_steps_per_mm[P##_AXIS]) + #define TMC_SET_PWMTHRS(P,Q) tmc_set_pwmthrs(stepper##Q, TMC_##Q, value, planner.axis_steps_per_mm[P##_AXIS]) + #define TMC_SAY_PWMTHRS_E(E) do{ const uint8_t extruder = E; tmc_get_pwmthrs(stepperE##E, TMC_E##E, planner.axis_steps_per_mm[E_AXIS_N]); }while(0) + #define TMC_SET_PWMTHRS_E(E) do{ const uint8_t extruder = E; tmc_set_pwmthrs(stepperE##E, TMC_E##E, value, planner.axis_steps_per_mm[E_AXIS_N]); }while(0) + + bool report = true; + const uint8_t index = parser.byteval('I'); + LOOP_XYZE(i) if (int32_t value = parser.longval(axis_codes[i])) { + report = false; + switch (i) { + case X_AXIS: + #if X_IS_TRINAMIC + if (index == 0) TMC_SET_PWMTHRS(X,X); + #endif + #if X2_IS_TRINAMIC + if (index == 1) TMC_SET_PWMTHRS(X,X2); + #endif + break; + case Y_AXIS: + #if Y_IS_TRINAMIC + if (index == 0) TMC_SET_PWMTHRS(Y,Y); + #endif + #if Y2_IS_TRINAMIC + if (index == 1) TMC_SET_PWMTHRS(Y,Y2); + #endif + break; + case Z_AXIS: + #if Z_IS_TRINAMIC + if (index == 0) TMC_SET_PWMTHRS(Z,Z); + #endif + #if Z2_IS_TRINAMIC + if (index == 1) TMC_SET_PWMTHRS(Z,Z2); + #endif + break; + case E_AXIS: { + if (get_target_extruder_from_command(913)) return; + switch (target_extruder) { + #if E0_IS_TRINAMIC + case 0: TMC_SET_PWMTHRS_E(0); break; + #endif + #if E_STEPPERS > 1 && E1_IS_TRINAMIC + case 1: TMC_SET_PWMTHRS_E(1); break; + #endif + #if E_STEPPERS > 2 && E2_IS_TRINAMIC + case 2: TMC_SET_PWMTHRS_E(2); break; + #endif + #if E_STEPPERS > 3 && E3_IS_TRINAMIC + case 3: TMC_SET_PWMTHRS_E(3); break; + #endif + #if E_STEPPERS > 4 && E4_IS_TRINAMIC + case 4: TMC_SET_PWMTHRS_E(4); break; + #endif + } + } break; + } + } - #if X_IS_TRINAMIC - TMC_SET_GET_PWMTHRS(X,X); - #endif - #if X2_IS_TRINAMIC - TMC_SET_GET_PWMTHRS(X,X2); - #endif - #if Y_IS_TRINAMIC - TMC_SET_GET_PWMTHRS(Y,Y); - #endif - #if Y2_IS_TRINAMIC - TMC_SET_GET_PWMTHRS(Y,Y2); - #endif - #if Z_IS_TRINAMIC - TMC_SET_GET_PWMTHRS(Z,Z); - #endif - #if Z2_IS_TRINAMIC - TMC_SET_GET_PWMTHRS(Z,Z2); - #endif - #if E0_IS_TRINAMIC - TMC_SET_GET_PWMTHRS(E,E0); - #endif - #if E1_IS_TRINAMIC - TMC_SET_GET_PWMTHRS(E,E1); - #endif - #if E2_IS_TRINAMIC - TMC_SET_GET_PWMTHRS(E,E2); - #endif - #if E3_IS_TRINAMIC - TMC_SET_GET_PWMTHRS(E,E3); - #endif - #if E4_IS_TRINAMIC - TMC_SET_GET_PWMTHRS(E,E4); - #endif + if (report) LOOP_XYZE(i) switch (i) { + case X_AXIS: + #if X_IS_TRINAMIC + TMC_SAY_PWMTHRS(X,X); + #endif + #if X2_IS_TRINAMIC + TMC_SAY_PWMTHRS(X,X2); + #endif + break; + case Y_AXIS: + #if Y_IS_TRINAMIC + TMC_SAY_PWMTHRS(Y,Y); + #endif + #if Y2_IS_TRINAMIC + TMC_SAY_PWMTHRS(Y,Y2); + #endif + break; + case Z_AXIS: + #if Z_IS_TRINAMIC + TMC_SAY_PWMTHRS(Z,Z); + #endif + #if Z2_IS_TRINAMIC + TMC_SAY_PWMTHRS(Z,Z2); + #endif + break; + case E_AXIS: + #if E0_IS_TRINAMIC + TMC_SAY_PWMTHRS_E(0); + #endif + #if E_STEPPERS > 1 && E1_IS_TRINAMIC + TMC_SAY_PWMTHRS_E(1); + #endif + #if E_STEPPERS > 2 && E2_IS_TRINAMIC + TMC_SAY_PWMTHRS_E(2); + #endif + #if E_STEPPERS > 3 && E3_IS_TRINAMIC + TMC_SAY_PWMTHRS_E(3); + #endif + #if E_STEPPERS > 4 && E4_IS_TRINAMIC + TMC_SAY_PWMTHRS_E(4); + #endif + break; + } } #endif // HYBRID_THRESHOLD @@ -10670,44 +11013,78 @@ inline void gcode_M502() { */ #if ENABLED(SENSORLESS_HOMING) inline void gcode_M914() { - #define TMC_SET_GET_SGT(P,Q) do { \ - if (parser.seen(axis_codes[P##_AXIS])) tmc_set_sgt(stepper##Q, TMC_##Q, parser.value_int()); \ - else tmc_get_sgt(stepper##Q, TMC_##Q); } while(0) - - #ifdef X_HOMING_SENSITIVITY - #if ENABLED(X_IS_TMC2130) || ENABLED(IS_TRAMS) - TMC_SET_GET_SGT(X,X); - #endif - #if ENABLED(X2_IS_TMC2130) - TMC_SET_GET_SGT(X,X2); - #endif - #endif - #ifdef Y_HOMING_SENSITIVITY - #if ENABLED(Y_IS_TMC2130) || ENABLED(IS_TRAMS) - TMC_SET_GET_SGT(Y,Y); - #endif - #if ENABLED(Y2_IS_TMC2130) - TMC_SET_GET_SGT(Y,Y2); - #endif - #endif - #ifdef Z_HOMING_SENSITIVITY - #if ENABLED(Z_IS_TMC2130) || ENABLED(IS_TRAMS) - TMC_SET_GET_SGT(Z,Z); - #endif - #if ENABLED(Z2_IS_TMC2130) - TMC_SET_GET_SGT(Z,Z2); - #endif - #endif - } - #endif // SENSORLESS_HOMING + #define TMC_SAY_SGT(Q) tmc_get_sgt(stepper##Q, TMC_##Q) + #define TMC_SET_SGT(Q) tmc_set_sgt(stepper##Q, TMC_##Q, value) - /** + bool report = true; + const uint8_t index = parser.byteval('I'); + LOOP_XYZ(i) if (parser.seen(axis_codes[i])) { + const int8_t value = (int8_t)constrain(parser.value_int(), -63, 64); + report = false; + switch (i) { + case X_AXIS: + #if ENABLED(X_IS_TMC2130) || ENABLED(IS_TRAMS) + if (index == 0) TMC_SET_SGT(X); + #endif + #if ENABLED(X2_IS_TMC2130) + if (index == 1) TMC_SET_SGT(X2); + #endif + break; + case Y_AXIS: + #if ENABLED(Y_IS_TMC2130) || ENABLED(IS_TRAMS) + if (index == 0) TMC_SET_SGT(Y); + #endif + #if ENABLED(Y2_IS_TMC2130) + if (index == 1) TMC_SET_SGT(Y2); + #endif + break; + case Z_AXIS: + #if ENABLED(Z_IS_TMC2130) || ENABLED(IS_TRAMS) + if (index == 0) TMC_SET_SGT(Z); + #endif + #if ENABLED(Z2_IS_TMC2130) + if (index == 1) TMC_SET_SGT(Z2); + #endif + break; + } + } + + if (report) LOOP_XYZ(i) switch (i) { + case X_AXIS: + #if ENABLED(X_IS_TMC2130) || ENABLED(IS_TRAMS) + TMC_SAY_SGT(X); + #endif + #if ENABLED(X2_IS_TMC2130) + TMC_SAY_SGT(X2); + #endif + break; + case Y_AXIS: + #if ENABLED(Y_IS_TMC2130) || ENABLED(IS_TRAMS) + TMC_SAY_SGT(Y); + #endif + #if ENABLED(Y2_IS_TMC2130) + TMC_SAY_SGT(Y2); + #endif + break; + case Z_AXIS: + #if ENABLED(Z_IS_TMC2130) || ENABLED(IS_TRAMS) + TMC_SAY_SGT(Z); + #endif + #if ENABLED(Z2_IS_TMC2130) + TMC_SAY_SGT(Z2); + #endif + break; + } + } + #endif // SENSORLESS_HOMING + + /** * TMC Z axis calibration routine */ #if ENABLED(TMC_Z_CALIBRATION) inline void gcode_M915() { - uint16_t _rms = parser.seenval('S') ? parser.value_int() : CALIBRATION_CURRENT; - uint16_t _z = parser.seenval('Z') ? parser.value_int() : CALIBRATION_EXTRA_HEIGHT; + const uint16_t _rms = parser.seenval('S') ? parser.value_int() : CALIBRATION_CURRENT, + _z = parser.seenval('Z') ? parser.value_linear_units() : CALIBRATION_EXTRA_HEIGHT; if (!axis_known_position[Z_AXIS]) { SERIAL_ECHOLNPGM("\nPlease home Z axis first"); @@ -10715,11 +11092,11 @@ inline void gcode_M502() { } #if Z_IS_TRINAMIC - uint16_t Z_current_1 = stepperZ.getCurrent(); + const uint16_t Z_current_1 = stepperZ.getCurrent(); stepperZ.setCurrent(_rms, R_SENSE, HOLD_MULTIPLIER); #endif #if Z2_IS_TRINAMIC - uint16_t Z2_current_1 = stepperZ2.getCurrent(); + const uint16_t Z2_current_1 = stepperZ2.getCurrent(); stepperZ2.setCurrent(_rms, R_SENSE, HOLD_MULTIPLIER); #endif @@ -11088,367 +11465,321 @@ inline void invalid_extruder_error(const uint8_t e) { #endif // HAS_FANMUX /** - * Perform a tool-change, which may result in moving the - * previous tool out of the way and the new tool into place. + * Tool Change functions */ -void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool no_move/*=false*/) { - #if ENABLED(MIXING_EXTRUDER) && MIXING_VIRTUAL_TOOLS > 1 +#if ENABLED(MIXING_EXTRUDER) && MIXING_VIRTUAL_TOOLS > 1 + + inline void mixing_tool_change(const uint8_t tmp_extruder) { if (tmp_extruder >= MIXING_VIRTUAL_TOOLS) return invalid_extruder_error(tmp_extruder); // T0-Tnnn: Switch virtual tool by changing the mix for (uint8_t j = 0; j < MIXING_STEPPERS; j++) mixing_factor[j] = mixing_virtual_tool_mix[tmp_extruder][j]; + } - #else // !MIXING_EXTRUDER || MIXING_VIRTUAL_TOOLS <= 1 +#endif // MIXING_EXTRUDER && MIXING_VIRTUAL_TOOLS > 1 - if (tmp_extruder >= EXTRUDERS) - return invalid_extruder_error(tmp_extruder); +#if ENABLED(DUAL_X_CARRIAGE) - #if HOTENDS > 1 + inline void dualx_tool_change(const uint8_t tmp_extruder, bool &no_move) { + #if ENABLED(DEBUG_LEVELING_FEATURE) + if (DEBUGGING(LEVELING)) { + SERIAL_ECHOPGM("Dual X Carriage Mode "); + switch (dual_x_carriage_mode) { + case DXC_FULL_CONTROL_MODE: SERIAL_ECHOLNPGM("DXC_FULL_CONTROL_MODE"); break; + case DXC_AUTO_PARK_MODE: SERIAL_ECHOLNPGM("DXC_AUTO_PARK_MODE"); break; + case DXC_DUPLICATION_MODE: SERIAL_ECHOLNPGM("DXC_DUPLICATION_MODE"); break; + } + } + #endif - const float old_feedrate_mm_s = fr_mm_s > 0.0 ? fr_mm_s : feedrate_mm_s; + const float xhome = x_home_pos(active_extruder); + if (dual_x_carriage_mode == DXC_AUTO_PARK_MODE + && IsRunning() + && (delayed_move_time || current_position[X_AXIS] != xhome) + ) { + float raised_z = current_position[Z_AXIS] + TOOLCHANGE_PARK_ZLIFT; + #if ENABLED(MAX_SOFTWARE_ENDSTOPS) + NOMORE(raised_z, soft_endstop_max[Z_AXIS]); + #endif + #if ENABLED(DEBUG_LEVELING_FEATURE) + if (DEBUGGING(LEVELING)) { + SERIAL_ECHOLNPAIR("Raise to ", raised_z); + SERIAL_ECHOLNPAIR("MoveX to ", xhome); + SERIAL_ECHOLNPAIR("Lower to ", current_position[Z_AXIS]); + } + #endif + // Park old head: 1) raise 2) move to park position 3) lower + for (uint8_t i = 0; i < 3; i++) + planner.buffer_line( + i == 0 ? current_position[X_AXIS] : xhome, + current_position[Y_AXIS], + i == 2 ? current_position[Z_AXIS] : raised_z, + current_position[E_AXIS], + planner.max_feedrate_mm_s[i == 1 ? X_AXIS : Z_AXIS], + active_extruder + ); + stepper.synchronize(); + } - feedrate_mm_s = fr_mm_s > 0.0 ? fr_mm_s : XY_PROBE_FEEDRATE_MM_S; + // Apply Y & Z extruder offset (X offset is used as home pos with Dual X) + current_position[Y_AXIS] -= hotend_offset[Y_AXIS][active_extruder] - hotend_offset[Y_AXIS][tmp_extruder]; + current_position[Z_AXIS] -= hotend_offset[Z_AXIS][active_extruder] - hotend_offset[Z_AXIS][tmp_extruder]; - if (tmp_extruder != active_extruder) { - if (!no_move && axis_unhomed_error()) { - no_move = true; - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("No move on toolchange"); - #endif - } + // Activate the new extruder ahead of calling set_axis_is_at_home! + active_extruder = tmp_extruder; - // Save current position to destination, for use later - set_destination_from_current(); + // This function resets the max/min values - the current position may be overwritten below. + set_axis_is_at_home(X_AXIS); - #if ENABLED(DUAL_X_CARRIAGE) + #if ENABLED(DEBUG_LEVELING_FEATURE) + if (DEBUGGING(LEVELING)) DEBUG_POS("New Extruder", current_position); + #endif - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) { - SERIAL_ECHOPGM("Dual X Carriage Mode "); - switch (dual_x_carriage_mode) { - case DXC_FULL_CONTROL_MODE: SERIAL_ECHOLNPGM("DXC_FULL_CONTROL_MODE"); break; - case DXC_AUTO_PARK_MODE: SERIAL_ECHOLNPGM("DXC_AUTO_PARK_MODE"); break; - case DXC_DUPLICATION_MODE: SERIAL_ECHOLNPGM("DXC_DUPLICATION_MODE"); break; - } - } - #endif + // Only when auto-parking are carriages safe to move + if (dual_x_carriage_mode != DXC_AUTO_PARK_MODE) no_move = true; - const float xhome = x_home_pos(active_extruder); - if (dual_x_carriage_mode == DXC_AUTO_PARK_MODE - && IsRunning() - && (delayed_move_time || current_position[X_AXIS] != xhome) - ) { - float raised_z = current_position[Z_AXIS] + TOOLCHANGE_PARK_ZLIFT; - #if ENABLED(MAX_SOFTWARE_ENDSTOPS) - NOMORE(raised_z, soft_endstop_max[Z_AXIS]); - #endif - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) { - SERIAL_ECHOLNPAIR("Raise to ", raised_z); - SERIAL_ECHOLNPAIR("MoveX to ", xhome); - SERIAL_ECHOLNPAIR("Lower to ", current_position[Z_AXIS]); - } - #endif - // Park old head: 1) raise 2) move to park position 3) lower - for (uint8_t i = 0; i < 3; i++) - planner.buffer_line( - i == 0 ? current_position[X_AXIS] : xhome, - current_position[Y_AXIS], - i == 2 ? current_position[Z_AXIS] : raised_z, - current_position[E_AXIS], - planner.max_feedrate_mm_s[i == 1 ? X_AXIS : Z_AXIS], - active_extruder - ); - stepper.synchronize(); + switch (dual_x_carriage_mode) { + case DXC_FULL_CONTROL_MODE: + // New current position is the position of the activated extruder + current_position[X_AXIS] = inactive_extruder_x_pos; + // Save the inactive extruder's position (from the old current_position) + inactive_extruder_x_pos = destination[X_AXIS]; + break; + case DXC_AUTO_PARK_MODE: + // record raised toolhead position for use by unpark + COPY(raised_parked_position, current_position); + raised_parked_position[Z_AXIS] += TOOLCHANGE_UNPARK_ZLIFT; + #if ENABLED(MAX_SOFTWARE_ENDSTOPS) + NOMORE(raised_parked_position[Z_AXIS], soft_endstop_max[Z_AXIS]); + #endif + active_extruder_parked = true; + delayed_move_time = 0; + break; + case DXC_DUPLICATION_MODE: + // If the new extruder is the left one, set it "parked" + // This triggers the second extruder to move into the duplication position + active_extruder_parked = (active_extruder == 0); + current_position[X_AXIS] = active_extruder_parked ? inactive_extruder_x_pos : destination[X_AXIS] + duplicate_extruder_x_offset; + inactive_extruder_x_pos = destination[X_AXIS]; + extruder_duplication_enabled = false; + #if ENABLED(DEBUG_LEVELING_FEATURE) + if (DEBUGGING(LEVELING)) { + SERIAL_ECHOLNPAIR("Set inactive_extruder_x_pos=", inactive_extruder_x_pos); + SERIAL_ECHOLNPGM("Clear extruder_duplication_enabled"); } + #endif + break; + } - // Apply Y & Z extruder offset (X offset is used as home pos with Dual X) - current_position[Y_AXIS] -= hotend_offset[Y_AXIS][active_extruder] - hotend_offset[Y_AXIS][tmp_extruder]; - current_position[Z_AXIS] -= hotend_offset[Z_AXIS][active_extruder] - hotend_offset[Z_AXIS][tmp_extruder]; + #if ENABLED(DEBUG_LEVELING_FEATURE) + if (DEBUGGING(LEVELING)) { + SERIAL_ECHOLNPAIR("Active extruder parked: ", active_extruder_parked ? "yes" : "no"); + DEBUG_POS("New extruder (parked)", current_position); + } + #endif - // Activate the new extruder ahead of calling set_axis_is_at_home! - active_extruder = tmp_extruder; + // No extra case for HAS_ABL in DUAL_X_CARRIAGE. Does that mean they don't work together? + } - // This function resets the max/min values - the current position may be overwritten below. - set_axis_is_at_home(X_AXIS); +#endif // DUAL_X_CARRIAGE - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) DEBUG_POS("New Extruder", current_position); - #endif +#if ENABLED(PARKING_EXTRUDER) - // Only when auto-parking are carriages safe to move - if (dual_x_carriage_mode != DXC_AUTO_PARK_MODE) no_move = true; + inline void parking_extruder_tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool no_move/*=false*/) { + constexpr float z_raise = PARKING_EXTRUDER_SECURITY_RAISE; - switch (dual_x_carriage_mode) { - case DXC_FULL_CONTROL_MODE: - // New current position is the position of the activated extruder - current_position[X_AXIS] = inactive_extruder_x_pos; - // Save the inactive extruder's position (from the old current_position) - inactive_extruder_x_pos = destination[X_AXIS]; - break; - case DXC_AUTO_PARK_MODE: - // record raised toolhead position for use by unpark - COPY(raised_parked_position, current_position); - raised_parked_position[Z_AXIS] += TOOLCHANGE_UNPARK_ZLIFT; - #if ENABLED(MAX_SOFTWARE_ENDSTOPS) - NOMORE(raised_parked_position[Z_AXIS], soft_endstop_max[Z_AXIS]); - #endif - active_extruder_parked = true; - delayed_move_time = 0; - break; - case DXC_DUPLICATION_MODE: - // If the new extruder is the left one, set it "parked" - // This triggers the second extruder to move into the duplication position - active_extruder_parked = (active_extruder == 0); + if (!no_move) { - if (active_extruder_parked) - current_position[X_AXIS] = inactive_extruder_x_pos; - else - current_position[X_AXIS] = destination[X_AXIS] + duplicate_extruder_x_offset; - inactive_extruder_x_pos = destination[X_AXIS]; - extruder_duplication_enabled = false; - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) { - SERIAL_ECHOLNPAIR("Set inactive_extruder_x_pos=", inactive_extruder_x_pos); - SERIAL_ECHOLNPGM("Clear extruder_duplication_enabled"); - } - #endif - break; - } + const float parkingposx[] = PARKING_EXTRUDER_PARKING_X, + midpos = (parkingposx[0] + parkingposx[1]) * 0.5 + hotend_offset[X_AXIS][active_extruder], + grabpos = parkingposx[tmp_extruder] + hotend_offset[X_AXIS][active_extruder] + + (tmp_extruder == 0 ? -(PARKING_EXTRUDER_GRAB_DISTANCE) : PARKING_EXTRUDER_GRAB_DISTANCE); + /** + * Steps: + * 1. Raise Z-Axis to give enough clearance + * 2. Move to park position of old extruder + * 3. Disengage magnetic field, wait for delay + * 4. Move near new extruder + * 5. Engage magnetic field for new extruder + * 6. Move to parking incl. offset of new extruder + * 7. Lower Z-Axis + */ - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) { - SERIAL_ECHOLNPAIR("Active extruder parked: ", active_extruder_parked ? "yes" : "no"); - DEBUG_POS("New extruder (parked)", current_position); - } - #endif + // STEP 1 + #if ENABLED(DEBUG_LEVELING_FEATURE) + SERIAL_ECHOLNPGM("Starting Autopark"); + if (DEBUGGING(LEVELING)) DEBUG_POS("current position:", current_position); + #endif + current_position[Z_AXIS] += z_raise; + #if ENABLED(DEBUG_LEVELING_FEATURE) + SERIAL_ECHOLNPGM("(1) Raise Z-Axis "); + if (DEBUGGING(LEVELING)) DEBUG_POS("Moving to Raised Z-Position", current_position); + #endif + planner.buffer_line_kinematic(current_position, planner.max_feedrate_mm_s[Z_AXIS], active_extruder); + stepper.synchronize(); - // No extra case for HAS_ABL in DUAL_X_CARRIAGE. Does that mean they don't work together? + // STEP 2 + current_position[X_AXIS] = parkingposx[active_extruder] + hotend_offset[X_AXIS][active_extruder]; + #if ENABLED(DEBUG_LEVELING_FEATURE) + SERIAL_ECHOLNPAIR("(2) Park extruder ", active_extruder); + if (DEBUGGING(LEVELING)) DEBUG_POS("Moving ParkPos", current_position); + #endif + planner.buffer_line_kinematic(current_position, planner.max_feedrate_mm_s[X_AXIS], active_extruder); + stepper.synchronize(); - #else // !DUAL_X_CARRIAGE + // STEP 3 + #if ENABLED(DEBUG_LEVELING_FEATURE) + SERIAL_ECHOLNPGM("(3) Disengage magnet "); + #endif + pe_deactivate_magnet(active_extruder); - #if ENABLED(PARKING_EXTRUDER) // Dual Parking extruder - const float z_diff = hotend_offset[Z_AXIS][active_extruder] - hotend_offset[Z_AXIS][tmp_extruder]; - float z_raise = PARKING_EXTRUDER_SECURITY_RAISE; - if (!no_move) { - - const float parkingposx[] = PARKING_EXTRUDER_PARKING_X, - midpos = (parkingposx[0] + parkingposx[1]) * 0.5 + hotend_offset[X_AXIS][active_extruder], - grabpos = parkingposx[tmp_extruder] + hotend_offset[X_AXIS][active_extruder] - + (tmp_extruder == 0 ? -(PARKING_EXTRUDER_GRAB_DISTANCE) : PARKING_EXTRUDER_GRAB_DISTANCE); - /** - * Steps: - * 1. Raise Z-Axis to give enough clearance - * 2. Move to park position of old extruder - * 3. Disengage magnetic field, wait for delay - * 4. Move near new extruder - * 5. Engage magnetic field for new extruder - * 6. Move to parking incl. offset of new extruder - * 7. Lower Z-Axis - */ - - // STEP 1 - #if ENABLED(DEBUG_LEVELING_FEATURE) - SERIAL_ECHOLNPGM("Starting Autopark"); - if (DEBUGGING(LEVELING)) DEBUG_POS("current position:", current_position); - #endif - current_position[Z_AXIS] += z_raise; - #if ENABLED(DEBUG_LEVELING_FEATURE) - SERIAL_ECHOLNPGM("(1) Raise Z-Axis "); - if (DEBUGGING(LEVELING)) DEBUG_POS("Moving to Raised Z-Position", current_position); - #endif - planner.buffer_line_kinematic(current_position, planner.max_feedrate_mm_s[Z_AXIS], active_extruder); - stepper.synchronize(); - - // STEP 2 - current_position[X_AXIS] = parkingposx[active_extruder] + hotend_offset[X_AXIS][active_extruder]; - #if ENABLED(DEBUG_LEVELING_FEATURE) - SERIAL_ECHOLNPAIR("(2) Park extruder ", active_extruder); - if (DEBUGGING(LEVELING)) DEBUG_POS("Moving ParkPos", current_position); - #endif - planner.buffer_line_kinematic(current_position, planner.max_feedrate_mm_s[X_AXIS], active_extruder); - stepper.synchronize(); + // STEP 4 + #if ENABLED(DEBUG_LEVELING_FEATURE) + SERIAL_ECHOLNPGM("(4) Move to position near new extruder"); + #endif + current_position[X_AXIS] += (active_extruder == 0 ? 10 : -10); // move 10mm away from parked extruder - // STEP 3 - #if ENABLED(DEBUG_LEVELING_FEATURE) - SERIAL_ECHOLNPGM("(3) Disengage magnet "); - #endif - pe_deactivate_magnet(active_extruder); + #if ENABLED(DEBUG_LEVELING_FEATURE) + if (DEBUGGING(LEVELING)) DEBUG_POS("Moving away from parked extruder", current_position); + #endif + planner.buffer_line_kinematic(current_position, planner.max_feedrate_mm_s[X_AXIS], active_extruder); + stepper.synchronize(); - // STEP 4 - #if ENABLED(DEBUG_LEVELING_FEATURE) - SERIAL_ECHOLNPGM("(4) Move to position near new extruder"); - #endif - current_position[X_AXIS] += (active_extruder == 0 ? 10 : -10); // move 10mm away from parked extruder + // STEP 5 + #if ENABLED(DEBUG_LEVELING_FEATURE) + SERIAL_ECHOLNPGM("(5) Engage magnetic field"); + #endif - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) DEBUG_POS("Moving away from parked extruder", current_position); - #endif - planner.buffer_line_kinematic(current_position, planner.max_feedrate_mm_s[X_AXIS], active_extruder); - stepper.synchronize(); + #if ENABLED(PARKING_EXTRUDER_SOLENOIDS_INVERT) + pe_activate_magnet(active_extruder); //just save power for inverted magnets + #endif + pe_activate_magnet(tmp_extruder); - // STEP 5 - #if ENABLED(DEBUG_LEVELING_FEATURE) - SERIAL_ECHOLNPGM("(5) Engage magnetic field"); - #endif + // STEP 6 + current_position[X_AXIS] = grabpos + (tmp_extruder == 0 ? (+10) : (-10)); + planner.buffer_line_kinematic(current_position, planner.max_feedrate_mm_s[X_AXIS], active_extruder); + current_position[X_AXIS] = grabpos; + #if ENABLED(DEBUG_LEVELING_FEATURE) + SERIAL_ECHOLNPAIR("(6) Unpark extruder ", tmp_extruder); + if (DEBUGGING(LEVELING)) DEBUG_POS("Move UnparkPos", current_position); + #endif + planner.buffer_line_kinematic(current_position, planner.max_feedrate_mm_s[X_AXIS]/2, active_extruder); + stepper.synchronize(); - #if ENABLED(PARKING_EXTRUDER_SOLENOIDS_INVERT) - pe_activate_magnet(active_extruder); //just save power for inverted magnets - #endif - pe_activate_magnet(tmp_extruder); - - // STEP 6 - current_position[X_AXIS] = grabpos + (tmp_extruder == 0 ? (+10) : (-10)); - planner.buffer_line_kinematic(current_position, planner.max_feedrate_mm_s[X_AXIS], active_extruder); - current_position[X_AXIS] = grabpos; - #if ENABLED(DEBUG_LEVELING_FEATURE) - SERIAL_ECHOLNPAIR("(6) Unpark extruder ", tmp_extruder); - if (DEBUGGING(LEVELING)) DEBUG_POS("Move UnparkPos", current_position); - #endif - planner.buffer_line_kinematic(current_position, planner.max_feedrate_mm_s[X_AXIS]/2, active_extruder); - stepper.synchronize(); - - // Step 7 - current_position[X_AXIS] = midpos - hotend_offset[X_AXIS][tmp_extruder]; - #if ENABLED(DEBUG_LEVELING_FEATURE) - SERIAL_ECHOLNPGM("(7) Move midway between hotends"); - if (DEBUGGING(LEVELING)) DEBUG_POS("Move midway to new extruder", current_position); - #endif - planner.buffer_line_kinematic(current_position, planner.max_feedrate_mm_s[X_AXIS], active_extruder); - stepper.synchronize(); - #if ENABLED(DEBUG_LEVELING_FEATURE) - SERIAL_ECHOLNPGM("Autopark done."); - #endif - } - else { // nomove == true - // Only engage magnetic field for new extruder - pe_activate_magnet(tmp_extruder); - #if ENABLED(PARKING_EXTRUDER_SOLENOIDS_INVERT) - pe_activate_magnet(active_extruder); // Just save power for inverted magnets - #endif - } - current_position[Z_AXIS] -= hotend_offset[Z_AXIS][tmp_extruder] - hotend_offset[Z_AXIS][active_extruder]; // Apply Zoffset + // Step 7 + current_position[X_AXIS] = midpos - hotend_offset[X_AXIS][tmp_extruder]; + #if ENABLED(DEBUG_LEVELING_FEATURE) + SERIAL_ECHOLNPGM("(7) Move midway between hotends"); + if (DEBUGGING(LEVELING)) DEBUG_POS("Move midway to new extruder", current_position); + #endif + planner.buffer_line_kinematic(current_position, planner.max_feedrate_mm_s[X_AXIS], active_extruder); + stepper.synchronize(); + #if ENABLED(DEBUG_LEVELING_FEATURE) + SERIAL_ECHOLNPGM("Autopark done."); + #endif + } + else { // nomove == true + // Only engage magnetic field for new extruder + pe_activate_magnet(tmp_extruder); + #if ENABLED(PARKING_EXTRUDER_SOLENOIDS_INVERT) + pe_activate_magnet(active_extruder); // Just save power for inverted magnets + #endif + } + current_position[Z_AXIS] += hotend_offset[Z_AXIS][active_extruder] - hotend_offset[Z_AXIS][tmp_extruder]; - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) DEBUG_POS("Applying Z-offset", current_position); - #endif + #if ENABLED(DEBUG_LEVELING_FEATURE) + if (DEBUGGING(LEVELING)) DEBUG_POS("Applying Z-offset", current_position); + #endif + } - #endif // dualParking extruder +#endif // PARKING_EXTRUDER - #if ENABLED(SWITCHING_NOZZLE) - #define DONT_SWITCH (SWITCHING_EXTRUDER_SERVO_NR == SWITCHING_NOZZLE_SERVO_NR) - // <0 if the new nozzle is higher, >0 if lower. A bigger raise when lower. - const float z_diff = hotend_offset[Z_AXIS][active_extruder] - hotend_offset[Z_AXIS][tmp_extruder], - z_raise = 0.3 + (z_diff > 0.0 ? z_diff : 0.0); +/** + * Perform a tool-change, which may result in moving the + * previous tool out of the way and the new tool into place. + */ +void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool no_move/*=false*/) { + #if ENABLED(MIXING_EXTRUDER) && MIXING_VIRTUAL_TOOLS > 1 - // Always raise by some amount - current_position[Z_AXIS] += z_raise; - planner.buffer_line_kinematic(current_position, planner.max_feedrate_mm_s[Z_AXIS], active_extruder); - move_nozzle_servo(tmp_extruder); - #endif + mixing_tool_change(tmp_extruder); - /** - * Set current_position to the position of the new nozzle. - * Offsets are based on linear distance, so we need to get - * the resulting position in coordinate space. - * - * - With grid or 3-point leveling, offset XYZ by a tilted vector - * - With mesh leveling, update Z for the new position - * - Otherwise, just use the raw linear distance - * - * Software endstops are altered here too. Consider a case where: - * E0 at X=0 ... E1 at X=10 - * When we switch to E1 now X=10, but E1 can't move left. - * To express this we apply the change in XY to the software endstops. - * E1 can move farther right than E0, so the right limit is extended. - * - * Note that we don't adjust the Z software endstops. Why not? - * Consider a case where Z=0 (here) and switching to E1 makes Z=1 - * because the bed is 1mm lower at the new position. As long as - * the first nozzle is out of the way, the carriage should be - * allowed to move 1mm lower. This technically "breaks" the - * Z software endstop. But this is technically correct (and - * there is no viable alternative). - */ - #if ABL_PLANAR - // Offset extruder, make sure to apply the bed level rotation matrix - vector_3 tmp_offset_vec = vector_3(hotend_offset[X_AXIS][tmp_extruder], - hotend_offset[Y_AXIS][tmp_extruder], - 0), - act_offset_vec = vector_3(hotend_offset[X_AXIS][active_extruder], - hotend_offset[Y_AXIS][active_extruder], - 0), - offset_vec = tmp_offset_vec - act_offset_vec; + #else // !MIXING_EXTRUDER || MIXING_VIRTUAL_TOOLS <= 1 - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) { - tmp_offset_vec.debug(PSTR("tmp_offset_vec")); - act_offset_vec.debug(PSTR("act_offset_vec")); - offset_vec.debug(PSTR("offset_vec (BEFORE)")); - } - #endif + if (tmp_extruder >= EXTRUDERS) + return invalid_extruder_error(tmp_extruder); - offset_vec.apply_rotation(planner.bed_level_matrix.transpose(planner.bed_level_matrix)); + #if HOTENDS > 1 - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) offset_vec.debug(PSTR("offset_vec (AFTER)")); - #endif + const float old_feedrate_mm_s = fr_mm_s > 0.0 ? fr_mm_s : feedrate_mm_s; - // Adjustments to the current position - const float xydiff[2] = { offset_vec.x, offset_vec.y }; - current_position[Z_AXIS] += offset_vec.z; + feedrate_mm_s = fr_mm_s > 0.0 ? fr_mm_s : XY_PROBE_FEEDRATE_MM_S; - #else // !ABL_PLANAR + if (tmp_extruder != active_extruder) { + if (!no_move && axis_unhomed_error()) { + no_move = true; + #if ENABLED(DEBUG_LEVELING_FEATURE) + if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("No move on toolchange"); + #endif + } - const float xydiff[2] = { - hotend_offset[X_AXIS][tmp_extruder] - hotend_offset[X_AXIS][active_extruder], - hotend_offset[Y_AXIS][tmp_extruder] - hotend_offset[Y_AXIS][active_extruder] - }; + // Save current position to destination, for use later + set_destination_from_current(); - #if ENABLED(MESH_BED_LEVELING) + #if HAS_LEVELING + // Set current position to the physical position + const bool leveling_was_active = planner.leveling_active; + set_bed_leveling_enabled(false); + #endif - if (planner.leveling_active) { - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) SERIAL_ECHOPAIR("Z before MBL: ", current_position[Z_AXIS]); - #endif - float x2 = current_position[X_AXIS] + xydiff[X_AXIS], - y2 = current_position[Y_AXIS] + xydiff[Y_AXIS], - z1 = current_position[Z_AXIS], z2 = z1; - planner.apply_leveling(current_position[X_AXIS], current_position[Y_AXIS], z1); - planner.apply_leveling(x2, y2, z2); - current_position[Z_AXIS] += z2 - z1; - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) - SERIAL_ECHOLNPAIR(" after: ", current_position[Z_AXIS]); - #endif - } + #if ENABLED(DUAL_X_CARRIAGE) + + dualx_tool_change(tmp_extruder, no_move); // Can modify no_move + + #else // !DUAL_X_CARRIAGE - #endif // MESH_BED_LEVELING + #if ENABLED(PARKING_EXTRUDER) // Dual Parking extruder + parking_extruder_tool_change(tmp_extruder, no_move); + #endif + + #if ENABLED(SWITCHING_NOZZLE) + // Always raise by at least 1 to avoid workpiece + const float zdiff = hotend_offset[Z_AXIS][active_extruder] - hotend_offset[Z_AXIS][tmp_extruder]; + current_position[Z_AXIS] += (zdiff > 0.0 ? zdiff : 0.0) + 1; + planner.buffer_line_kinematic(current_position, planner.max_feedrate_mm_s[Z_AXIS], active_extruder); + move_nozzle_servo(tmp_extruder); + #endif - #endif // !HAS_ABL + const float xdiff = hotend_offset[X_AXIS][tmp_extruder] - hotend_offset[X_AXIS][active_extruder], + ydiff = hotend_offset[Y_AXIS][tmp_extruder] - hotend_offset[Y_AXIS][active_extruder]; #if ENABLED(DEBUG_LEVELING_FEATURE) if (DEBUGGING(LEVELING)) { - SERIAL_ECHOPAIR("Offset Tool XY by { ", xydiff[X_AXIS]); - SERIAL_ECHOPAIR(", ", xydiff[Y_AXIS]); + SERIAL_ECHOPAIR("Offset Tool XY by { ", xdiff); + SERIAL_ECHOPAIR(", ", ydiff); SERIAL_ECHOLNPGM(" }"); } #endif // The newly-selected extruder XY is actually at... - current_position[X_AXIS] += xydiff[X_AXIS]; - current_position[Y_AXIS] += xydiff[Y_AXIS]; + current_position[X_AXIS] += xdiff; + current_position[Y_AXIS] += ydiff; // Set the new active extruder active_extruder = tmp_extruder; #endif // !DUAL_X_CARRIAGE - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) DEBUG_POS("Sync After Toolchange", current_position); + #if ENABLED(SWITCHING_NOZZLE) + // The newly-selected extruder Z is actually at... + current_position[Z_AXIS] -= zdiff; + #endif + + #if HAS_LEVELING + // Restore leveling to re-establish the logical position + set_bed_leveling_enabled(leveling_was_active); #endif // Tell the planner the new "current position" @@ -11456,22 +11787,18 @@ void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool n #if ENABLED(DELTA) //LOOP_XYZ(i) update_software_endstops(i); // or modify the constrain function - // Do a small lift to avoid the workpiece in the move back (below) const bool safe_to_move = current_position[Z_AXIS] < delta_clip_start_height - 1; - if (!no_move && IsRunning() && safe_to_move) { - ++current_position[Z_AXIS]; - planner.buffer_line_kinematic(current_position, planner.max_feedrate_mm_s[Z_AXIS], active_extruder); - } #else constexpr bool safe_to_move = true; #endif - #if ENABLED(SWITCHING_NOZZLE) - destination[Z_AXIS] += z_diff; // Include the Z restore with the "move back" - #endif - - // Move to the "old position" (move the extruder into place) + // Raise, move, and lower again if (safe_to_move && !no_move && IsRunning()) { + #if DISABLED(SWITCHING_NOZZLE) + // Do a small lift to avoid the workpiece in the move back (below) + current_position[Z_AXIS] += 1.0; + planner.buffer_line_kinematic(current_position, planner.max_feedrate_mm_s[Z_AXIS], active_extruder); + #endif #if ENABLED(DEBUG_LEVELING_FEATURE) if (DEBUGGING(LEVELING)) DEBUG_POS("Move back", destination); #endif @@ -11491,7 +11818,7 @@ void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool n #if ENABLED(EXT_SOLENOID) && !ENABLED(PARKING_EXTRUDER) disable_all_solenoids(); enable_solenoid_on_active_extruder(); - #endif // EXT_SOLENOID + #endif feedrate_mm_s = old_feedrate_mm_s; @@ -11512,7 +11839,7 @@ void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool n #endif // HOTENDS <= 1 - #if ENABLED(SWITCHING_EXTRUDER) && !DONT_SWITCH + #if DO_SWITCH_EXTRUDER stepper.synchronize(); move_extruder_servo(active_extruder); #endif @@ -12040,6 +12367,8 @@ void process_next_command() { #endif } + reset_stepper_timeout(); // Keep steppers powered + // Parse the next command in the queue parser.parse(current_command); process_parsed_command(); @@ -12067,7 +12396,6 @@ void flush_and_request_resend() { * B Block queue space remaining */ void ok_to_send() { - refresh_cmd_timeout(); if (!send_ok[cmd_queue_index_r]) return; SERIAL_PROTOCOLPGM(MSG_OK); #if ENABLED(ADVANCED_OK) @@ -12681,6 +13009,20 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) { #if !UBL_SEGMENTED #if IS_KINEMATIC + #if IS_SCARA + /** + * Before raising this value, use M665 S[seg_per_sec] to decrease + * the number of segments-per-second. Default is 200. Some deltas + * do better with 160 or lower. It would be good to know how many + * segments-per-second are actually possible for SCARA on AVR. + * + * Longer segments result in less kinematic overhead + * but may produce jagged lines. Try 0.5mm, 1.0mm, and 2.0mm + * and compare the difference. + */ + #define SCARA_MIN_SEGMENT_LENGTH 0.5 + #endif + /** * Prepare a linear move in a DELTA or SCARA setup. * @@ -12725,9 +13067,9 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) { // gives the number of segments uint16_t segments = delta_segments_per_second * seconds; - // For SCARA minimum segment size is 0.25mm + // For SCARA enforce a minimum segment size #if IS_SCARA - NOMORE(segments, cartesian_mm * 4); + NOMORE(segments, cartesian_mm * (1.0 / SCARA_MIN_SEGMENT_LENGTH)); #endif // At least one segment is required @@ -12735,7 +13077,6 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) { // The approximate length of each segment const float inv_segments = 1.0 / float(segments), - cartesian_segment_mm = cartesian_mm * inv_segments, segment_distance[XYZE] = { xdiff * inv_segments, ydiff * inv_segments, @@ -12743,16 +13084,47 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) { ediff * inv_segments }; - // SERIAL_ECHOPAIR("mm=", cartesian_mm); - // SERIAL_ECHOPAIR(" seconds=", seconds); - // SERIAL_ECHOLNPAIR(" segments=", segments); - // SERIAL_ECHOLNPAIR(" segment_mm=", cartesian_segment_mm); + #if DISABLED(SCARA_FEEDRATE_SCALING) + const float cartesian_segment_mm = cartesian_mm * inv_segments; + #endif + + /* + SERIAL_ECHOPAIR("mm=", cartesian_mm); + SERIAL_ECHOPAIR(" seconds=", seconds); + SERIAL_ECHOPAIR(" segments=", segments); + #if DISABLED(SCARA_FEEDRATE_SCALING) + SERIAL_ECHOLNPAIR(" segment_mm=", cartesian_segment_mm); + #else + SERIAL_EOL(); + #endif + //*/ + + #if ENABLED(SCARA_FEEDRATE_SCALING) + // SCARA needs to scale the feed rate from mm/s to degrees/s + // i.e., Complete the angular vector in the given time. + const float segment_length = cartesian_mm * inv_segments, + inv_segment_length = 1.0 / segment_length, // 1/mm/segs + inverse_secs = inv_segment_length * _feedrate_mm_s; + + float oldA = planner.position_float[A_AXIS], + oldB = planner.position_float[B_AXIS]; + + /* + SERIAL_ECHOPGM("Scaled kinematic move: "); + SERIAL_ECHOPAIR(" segment_length (inv)=", segment_length); + SERIAL_ECHOPAIR(" (", inv_segment_length); + SERIAL_ECHOPAIR(") _feedrate_mm_s=", _feedrate_mm_s); + SERIAL_ECHOPAIR(" inverse_secs=", inverse_secs); + SERIAL_ECHOPAIR(" oldA=", oldA); + SERIAL_ECHOLNPAIR(" oldB=", oldB); + safe_delay(5); + //*/ + #endif // Get the current position as starting point float raw[XYZE]; COPY(raw, current_position); - // Calculate and execute the segments while (--segments) { @@ -12772,11 +13144,41 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) { ADJUST_DELTA(raw); // Adjust Z if bed leveling is enabled - planner.buffer_line(delta[A_AXIS], delta[B_AXIS], delta[C_AXIS], raw[E_AXIS], _feedrate_mm_s, active_extruder, cartesian_segment_mm); + #if ENABLED(SCARA_FEEDRATE_SCALING) + // For SCARA scale the feed rate from mm/s to degrees/s + // i.e., Complete the angular vector in the given time. + planner.buffer_segment(delta[A_AXIS], delta[B_AXIS], raw[Z_AXIS], raw[E_AXIS], HYPOT(delta[A_AXIS] - oldA, delta[B_AXIS] - oldB) * inverse_secs, active_extruder); + /* + SERIAL_ECHO(segments); + SERIAL_ECHOPAIR(": X=", raw[X_AXIS]); SERIAL_ECHOPAIR(" Y=", raw[Y_AXIS]); + SERIAL_ECHOPAIR(" A=", delta[A_AXIS]); SERIAL_ECHOPAIR(" B=", delta[B_AXIS]); + SERIAL_ECHOLNPAIR(" F", HYPOT(delta[A_AXIS] - oldA, delta[B_AXIS] - oldB) * inverse_secs * 60); + safe_delay(5); + //*/ + oldA = delta[A_AXIS]; oldB = delta[B_AXIS]; + #else + planner.buffer_line(delta[A_AXIS], delta[B_AXIS], delta[C_AXIS], raw[E_AXIS], _feedrate_mm_s, active_extruder, cartesian_segment_mm); + #endif } // Ensure last segment arrives at target location. - planner.buffer_line_kinematic(rtarget, _feedrate_mm_s, active_extruder, cartesian_segment_mm); + #if ENABLED(SCARA_FEEDRATE_SCALING) + inverse_kinematics(rtarget); + ADJUST_DELTA(rtarget); + const float diff2 = HYPOT2(delta[A_AXIS] - oldA, delta[B_AXIS] - oldB); + if (diff2) { + planner.buffer_segment(delta[A_AXIS], delta[B_AXIS], rtarget[Z_AXIS], rtarget[E_AXIS], SQRT(diff2) * inverse_secs, active_extruder); + /* + SERIAL_ECHOPAIR("final: A=", delta[A_AXIS]); SERIAL_ECHOPAIR(" B=", delta[B_AXIS]); + SERIAL_ECHOPAIR(" adiff=", delta[A_AXIS] - oldA); SERIAL_ECHOPAIR(" bdiff=", delta[B_AXIS] - oldB); + SERIAL_ECHOLNPAIR(" F", (SQRT(diff2) * inverse_secs) * 60); + SERIAL_EOL(); + safe_delay(5); + //*/ + } + #else + planner.buffer_line_kinematic(rtarget, _feedrate_mm_s, active_extruder, cartesian_segment_mm); + #endif return false; // caller will update current_position } @@ -12915,7 +13317,6 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) { */ void prepare_move_to_destination() { clamp_to_software_endstops(destination); - refresh_cmd_timeout(); #if ENABLED(PREVENT_COLD_EXTRUSION) || ENABLED(PREVENT_LENGTHY_EXTRUDE) @@ -13061,6 +13462,14 @@ void prepare_move_to_destination() { millis_t next_idle_ms = millis() + 200UL; + #if ENABLED(SCARA_FEEDRATE_SCALING) + // SCARA needs to scale the feed rate from mm/s to degrees/s + const float inv_segment_length = 1.0 / (MM_PER_ARC_SEGMENT), + inverse_secs = inv_segment_length * fr_mm_s; + float oldA = planner.position_float[A_AXIS], + oldB = planner.position_float[B_AXIS]; + #endif + #if N_ARC_CORRECTION > 1 int8_t arc_recalc_count = N_ARC_CORRECTION; #endif @@ -13104,11 +13513,28 @@ void prepare_move_to_destination() { clamp_to_software_endstops(raw); - planner.buffer_line_kinematic(raw, fr_mm_s, active_extruder); + #if ENABLED(SCARA_FEEDRATE_SCALING) + // For SCARA scale the feed rate from mm/s to degrees/s + // i.e., Complete the angular vector in the given time. + inverse_kinematics(raw); + ADJUST_DELTA(raw); + planner.buffer_segment(delta[A_AXIS], delta[B_AXIS], raw[Z_AXIS], raw[E_AXIS], HYPOT(delta[A_AXIS] - oldA, delta[B_AXIS] - oldB) * inverse_secs, active_extruder); + oldA = delta[A_AXIS]; oldB = delta[B_AXIS]; + #else + planner.buffer_line_kinematic(raw, fr_mm_s, active_extruder); + #endif } // Ensure last segment arrives at target location. - planner.buffer_line_kinematic(cart, fr_mm_s, active_extruder); + #if ENABLED(SCARA_FEEDRATE_SCALING) + inverse_kinematics(cart); + ADJUST_DELTA(cart); + const float diff2 = HYPOT2(delta[A_AXIS] - oldA, delta[B_AXIS] - oldB); + if (diff2) + planner.buffer_segment(delta[A_AXIS], delta[B_AXIS], cart[Z_AXIS], cart[E_AXIS], SQRT(diff2) * inverse_secs, active_extruder); + #else + planner.buffer_line_kinematic(cart, fr_mm_s, active_extruder); + #endif // As far as the parser is concerned, the position is now == target. In reality the // motion control system might still be processing the action and the real tool position @@ -13335,7 +13761,7 @@ void disable_all_steppers() { * - Check if cooling fan needs to be switched on * - Check if an idle but hot extruder needs filament extruded (EXTRUDER_RUNOUT_PREVENT) */ -void manage_inactivity(bool ignore_stepper_queue/*=false*/) { +void manage_inactivity(const bool ignore_stepper_queue/*=false*/) { #if ENABLED(FILAMENT_RUNOUT_SENSOR) runout.run(); @@ -13345,7 +13771,7 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) { const millis_t ms = millis(); - if (max_inactive_time && ELAPSED(ms, previous_cmd_ms + max_inactive_time)) { + if (max_inactive_time && ELAPSED(ms, previous_move_ms + max_inactive_time)) { SERIAL_ERROR_START(); SERIAL_ECHOLNPAIR(MSG_KILL_INACTIVE_TIME, parser.command_ptr); kill(PSTR(MSG_KILLED)); @@ -13358,23 +13784,26 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) { #define MOVE_AWAY_TEST true #endif - if (MOVE_AWAY_TEST && stepper_inactive_time && ELAPSED(ms, previous_cmd_ms + stepper_inactive_time) - && !ignore_stepper_queue && !planner.blocks_queued()) { - #if ENABLED(DISABLE_INACTIVE_X) - disable_X(); - #endif - #if ENABLED(DISABLE_INACTIVE_Y) - disable_Y(); - #endif - #if ENABLED(DISABLE_INACTIVE_Z) - disable_Z(); - #endif - #if ENABLED(DISABLE_INACTIVE_E) - disable_e_steppers(); - #endif - #if ENABLED(AUTO_BED_LEVELING_UBL) && ENABLED(ULTIPANEL) // Only needed with an LCD - if (ubl.lcd_map_control) ubl.lcd_map_control = defer_return_to_status = false; - #endif + if (stepper_inactive_time) { + if (planner.has_blocks_queued()) + previous_move_ms = ms; // reset_stepper_timeout to keep steppers powered + else if (MOVE_AWAY_TEST && !ignore_stepper_queue && ELAPSED(ms, previous_move_ms + stepper_inactive_time)) { + #if ENABLED(DISABLE_INACTIVE_X) + disable_X(); + #endif + #if ENABLED(DISABLE_INACTIVE_Y) + disable_Y(); + #endif + #if ENABLED(DISABLE_INACTIVE_Z) + disable_Z(); + #endif + #if ENABLED(DISABLE_INACTIVE_E) + disable_e_steppers(); + #endif + #if ENABLED(AUTO_BED_LEVELING_UBL) && ENABLED(ULTIPANEL) // Only needed with an LCD + if (ubl.lcd_map_control) ubl.lcd_map_control = defer_return_to_status = false; + #endif + } } #ifdef CHDK // Check if pin should be set to LOW after M240 set it to HIGH @@ -13433,8 +13862,8 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) { #if ENABLED(EXTRUDER_RUNOUT_PREVENT) if (thermalManager.degHotend(active_extruder) > EXTRUDER_RUNOUT_MINTEMP - && ELAPSED(ms, previous_cmd_ms + (EXTRUDER_RUNOUT_SECONDS) * 1000UL) - && !planner.blocks_queued() + && ELAPSED(ms, previous_move_ms + (EXTRUDER_RUNOUT_SECONDS) * 1000UL) + && !planner.has_blocks_queued() ) { #if ENABLED(SWITCHING_EXTRUDER) const bool oldstatus = E0_ENABLE_READ; @@ -13458,8 +13887,6 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) { } #endif // !SWITCHING_EXTRUDER - previous_cmd_ms = ms; // refresh_cmd_timeout() - const float olde = current_position[E_AXIS]; current_position[E_AXIS] += EXTRUDER_RUNOUT_EXTRUDE; planner.buffer_line_kinematic(current_position, MMM_TO_MMS(EXTRUDER_RUNOUT_SPEED), active_extruder); @@ -13485,6 +13912,8 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) { #endif // E_STEPPERS > 1 } #endif // !SWITCHING_EXTRUDER + + previous_move_ms = ms; // reset_stepper_timeout to keep steppers powered } #endif // EXTRUDER_RUNOUT_PREVENT @@ -13543,7 +13972,7 @@ void idle( #if ENABLED(I2C_POSITION_ENCODERS) static millis_t i2cpem_next_update_ms; - if (planner.blocks_queued() && ELAPSED(millis(), i2cpem_next_update_ms)) { + if (planner.has_blocks_queued() && ELAPSED(millis(), i2cpem_next_update_ms)) { I2CPEM.update(); i2cpem_next_update_ms = millis() + I2CPE_MIN_UPD_TIME_MS; } @@ -13667,6 +14096,7 @@ void setup() { SERIAL_PROTOCOLLNPGM("start"); SERIAL_ECHO_START(); + // Prepare communication for TMC drivers #if ENABLED(HAVE_TMC2130) tmc_init_cs_pins(); #endif @@ -13722,8 +14152,9 @@ void setup() { print_job_timer.init(); // Initial setup of print job timer - stepper.init(); // Initialize stepper, this enables interrupts! - servo_init(); + stepper.init(); // Initialize stepper, this enables interrupts! + + servo_init(); // Initialize all servos, stow servo probe #if HAS_PHOTOGRAPH OUT_WRITE(PHOTOGRAPH_PIN, LOW); @@ -13850,7 +14281,7 @@ void setup() { setup_endstop_interrupts(); #endif - #if ENABLED(SWITCHING_EXTRUDER) && !DONT_SWITCH + #if DO_SWITCH_EXTRUDER move_extruder_servo(0); // Initialize extruder servo #endif @@ -13868,6 +14299,10 @@ void setup() { #endif #endif + #if ENABLED(POWER_LOSS_RECOVERY) + do_print_job_recovery(); + #endif + #if ENABLED(USE_WATCHDOG) watchdog_init(); #endif @@ -13876,6 +14311,7 @@ void setup() { /** * The main Marlin program loop * + * - Abort SD printing if flagged * - Save or log commands to SD * - Process available commands (if not saving) * - Call heater manager @@ -13884,11 +14320,33 @@ void setup() { * - Call LCD update */ void loop() { - if (commands_in_queue < BUFSIZE) get_available_commands(); #if ENABLED(SDSUPPORT) + card.checkautostart(false); - #endif + + #if ENABLED(ULTIPANEL) + if (abort_sd_printing) { + abort_sd_printing = false; + card.stopSDPrint( + #if SD_RESORT + true + #endif + ); + clear_command_queue(); + quickstop_stepper(); + print_job_timer.stop(); + thermalManager.disable_all_heaters(); + #if FAN_COUNT > 0 + for (uint8_t i = 0; i < FAN_COUNT; i++) fanSpeeds[i] = 0; + #endif + wait_for_heatup = false; + } + #endif + + #endif // SDSUPPORT + + if (commands_in_queue < BUFSIZE) get_available_commands(); if (commands_in_queue) { @@ -13922,8 +14380,12 @@ void loop() { ok_to_send(); } } - else + else { process_next_command(); + #if ENABLED(POWER_LOSS_RECOVERY) + if (card.cardOK && card.sdprinting) save_job_recovery_info(); + #endif + } #else diff --git a/Marlin/Max7219_Debug_LEDs.cpp b/Marlin/Max7219_Debug_LEDs.cpp index 2d8aee2dac..43f0a2a975 100644 --- a/Marlin/Max7219_Debug_LEDs.cpp +++ b/Marlin/Max7219_Debug_LEDs.cpp @@ -64,9 +64,9 @@ static uint8_t LEDs[8] = { 0 }; #ifdef CPU_32_BIT - #define MS_DELAY() delayMicroseconds(5) // 32-bit processors need a delay to stabilize the signal + #define MS_DELAY() delayMicroseconds(7) // 32-bit processors need a delay to stabilize the signal #else - #define MS_DELAY() NOOP + #define MS_DELAY() DELAY_3_NOP #endif void Max7219_PutByte(uint8_t data) { @@ -214,6 +214,16 @@ void Max7219_Set_Column(const uint8_t col, const uint8_t val) { Max7219(8 - col, LEDs[col]); } +void Max7219_register_setup() { + //initiation of the max 7219 + Max7219(max7219_reg_scanLimit, 0x07); + Max7219(max7219_reg_decodeMode, 0x00); // using an led matrix (not digits) + Max7219(max7219_reg_shutdown, 0x01); // not in shutdown mode + Max7219(max7219_reg_displayTest, 0x00); // no display test + Max7219(max7219_reg_intensity, 0x01 & 0x0F); // the first 0x0F is the value you can set + // range: 0x00 to 0x0F +} + void Max7219_init() { uint8_t i, x, y; @@ -223,13 +233,8 @@ void Max7219_init() { OUT_WRITE(MAX7219_LOAD_PIN, HIGH); delay(1); - //initiation of the max 7219 - Max7219(max7219_reg_scanLimit, 0x07); - Max7219(max7219_reg_decodeMode, 0x00); // using an led matrix (not digits) - Max7219(max7219_reg_shutdown, 0x01); // not in shutdown mode - Max7219(max7219_reg_displayTest, 0x00); // no display test - Max7219(max7219_reg_intensity, 0x01 & 0x0F); // the first 0x0F is the value you can set - // range: 0x00 to 0x0F + Max7219_register_setup(); + for (i = 0; i <= 7; i++) { // empty registers, turn all LEDs off LEDs[i] = 0x00; Max7219(i + 1, 0); @@ -283,6 +288,13 @@ void Max7219_idle_tasks() { CRITICAL_SECTION_END #endif + static uint16_t refresh_cnt = 0; // The Max7219 circuit boards available for several dollars on eBay + if (refresh_cnt++ > 50000) { // are vulnerable to electrical noise, especially with long wires + Max7219_register_setup(); // next to high current wires. If the display becomes corrupted due + Max7219_LED_Toggle(7, 0); // to electrical noise, this will fix it within a couple of seconds. + refresh_cnt = 0; + } + #if ENABLED(MAX7219_DEBUG_PRINTER_ALIVE) static millis_t next_blink = 0; if (ELAPSED(millis(), next_blink)) { diff --git a/Marlin/SanityCheck.h b/Marlin/SanityCheck.h index 72ddef53e3..33c2e16093 100644 --- a/Marlin/SanityCheck.h +++ b/Marlin/SanityCheck.h @@ -95,6 +95,8 @@ #error "SERVO_ENDSTOP_ANGLES is deprecated. Use Z_SERVO_ANGLES instead." #elif defined(X_ENDSTOP_SERVO_NR) || defined(Y_ENDSTOP_SERVO_NR) #error "X_ENDSTOP_SERVO_NR and Y_ENDSTOP_SERVO_NR are deprecated and should be removed." +#elif defined(Z_ENDSTOP_SERVO_NR) + #error "Z_ENDSTOP_SERVO_NR is now Z_PROBE_SERVO_NR. Please update your configuration." #elif defined(DEFAULT_XYJERK) #error "DEFAULT_XYJERK is deprecated. Use DEFAULT_XJERK and DEFAULT_YJERK instead." #elif defined(XY_TRAVEL_SPEED) @@ -128,9 +130,13 @@ #elif defined(FILAMENT_CHANGE_RETRACT_LENGTH) #error "FILAMENT_CHANGE_RETRACT_LENGTH is now PAUSE_PARK_RETRACT_LENGTH. Please update your configuration." #elif defined(FILAMENT_CHANGE_EXTRUDE_FEEDRATE) - #error "FILAMENT_CHANGE_EXTRUDE_FEEDRATE is now ADVANCED_PAUSE_EXTRUDE_FEEDRATE. Please update your configuration." + #error "FILAMENT_CHANGE_EXTRUDE_FEEDRATE is now ADVANCED_PAUSE_PURGE_FEEDRATE. Please update your configuration." +#elif defined(ADVANCED_PAUSE_EXTRUDE_FEEDRATE) + #error "ADVANCED_PAUSE_EXTRUDE_FEEDRATE is now ADVANCED_PAUSE_PURGE_FEEDRATE. Please update your configuration." #elif defined(FILAMENT_CHANGE_EXTRUDE_LENGTH) - #error "FILAMENT_CHANGE_EXTRUDE_LENGTH is now ADVANCED_PAUSE_EXTRUDE_LENGTH. Please update your configuration." + #error "FILAMENT_CHANGE_EXTRUDE_LENGTH is now ADVANCED_PAUSE_PURGE_LENGTH. Please update your configuration." +#elif defined(ADVANCED_PAUSE_EXTRUDE_LENGTH) + #error "ADVANCED_PAUSE_EXTRUDE_LENGTH is now ADVANCED_PAUSE_PURGE_LENGTH. Please update your configuration." #elif defined(FILAMENT_CHANGE_NOZZLE_TIMEOUT) #error "FILAMENT_CHANGE_NOZZLE_TIMEOUT is now PAUSE_PARK_NOZZLE_TIMEOUT. Please update your configuration." #elif defined(FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS) @@ -175,6 +181,8 @@ #error "MANUAL_PROBE_Z_RANGE is now LCD_PROBE_Z_RANGE. Please update your configuration." #elif !defined(MIN_STEPS_PER_SEGMENT) #error Please replace "const int dropsegments" with "#define MIN_STEPS_PER_SEGMENT" (and increase by 1) in Configuration_adv.h. +#elif MIN_STEPS_PER_SEGMENT <= 0 + #error "MIN_STEPS_PER_SEGMENT must be at least 1. Please update your Configuration_adv.h." #elif defined(PREVENT_DANGEROUS_EXTRUDE) #error "PREVENT_DANGEROUS_EXTRUDE is now PREVENT_COLD_EXTRUSION. Please update your configuration." #elif defined(SCARA) @@ -260,6 +268,18 @@ #error "[AXIS]_IS_TMC is now [AXIS]_IS_TMC26X. Please update your Configuration_adv.h." #elif defined(AUTOMATIC_CURRENT_CONTROL) #error "AUTOMATIC_CURRENT_CONTROL is now MONITOR_DRIVER_STATUS. Please update your configuration." +#elif defined(FILAMENT_CHANGE_LOAD_LENGTH) + #error "FILAMENT_CHANGE_LOAD_LENGTH is now FILAMENT_CHANGE_FAST_LOAD_LENGTH. Please update your configuration." +#elif ENABLED(LEVEL_BED_CORNERS) && !defined(LEVEL_CORNERS_INSET) + #error "LEVEL_BED_CORNERS requires a LEVEL_CORNERS_INSET value. Please update your Configuration.h." +#endif + +#define BOARD_MKS_13 -47 +#define BOARD_TRIGORILLA -343 +#if MB(MKS_13) + #error "BOARD_MKS_13 has been renamed BOARD_MKS_GEN_13. Please update your configuration." +#elif MB(BOARD_TRIGORILLA) + #error "BOARD_TRIGORILLA has been renamed BOARD_TRIGORILLA_13. Please update your configuration." #endif /** @@ -417,7 +437,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE, #elif ENABLED(BABYSTEP_ZPROBE_OFFSET) && !HAS_BED_PROBE #error "BABYSTEP_ZPROBE_OFFSET requires a probe." #elif ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY) && !ENABLED(DOGLCD) - #error "BABYSTEP_ZPROBE_GFX_OVERLAY requires a DOGLCD." + #error "BABYSTEP_ZPROBE_GFX_OVERLAY requires a Graphical LCD." #elif ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY) && !ENABLED(BABYSTEP_ZPROBE_OFFSET) #error "BABYSTEP_ZPROBE_GFX_OVERLAY requires a BABYSTEP_ZPROBE_OFFSET." #endif @@ -462,8 +482,10 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE, #error "ADVANCED_PAUSE_FEATURE requires NOZZLE_PARK_FEATURE." #elif ENABLED(PREVENT_LENGTHY_EXTRUDE) && FILAMENT_CHANGE_UNLOAD_LENGTH > EXTRUDE_MAXLENGTH #error "FILAMENT_CHANGE_UNLOAD_LENGTH must be less than or equal to EXTRUDE_MAXLENGTH." - #elif ENABLED(PREVENT_LENGTHY_EXTRUDE) && FILAMENT_CHANGE_LOAD_LENGTH > EXTRUDE_MAXLENGTH - #error "FILAMENT_CHANGE_LOAD_LENGTH must be less than or equal to EXTRUDE_MAXLENGTH." + #elif ENABLED(PREVENT_LENGTHY_EXTRUDE) && FILAMENT_CHANGE_SLOW_LOAD_LENGTH > EXTRUDE_MAXLENGTH + #error "FILAMENT_CHANGE_SLOW_LOAD_LENGTH must be less than or equal to EXTRUDE_MAXLENGTH." + #elif ENABLED(PREVENT_LENGTHY_EXTRUDE) && FILAMENT_CHANGE_FAST_LOAD_LENGTH > EXTRUDE_MAXLENGTH + #error "FILAMENT_CHANGE_FAST_LOAD_LENGTH must be less than or equal to EXTRUDE_MAXLENGTH." #endif #endif @@ -603,8 +625,8 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE, /** * Servo deactivation depends on servo endstops, switching nozzle, or switching extruder */ -#if ENABLED(DEACTIVATE_SERVOS_AFTER_MOVE) && !HAS_Z_SERVO_ENDSTOP && !defined(SWITCHING_NOZZLE_SERVO_NR) && !defined(SWITCHING_EXTRUDER_SERVO_NR) - #error "Z_ENDSTOP_SERVO_NR, switching nozzle, or switching extruder is required for DEACTIVATE_SERVOS_AFTER_MOVE." +#if ENABLED(DEACTIVATE_SERVOS_AFTER_MOVE) && !HAS_Z_SERVO_PROBE && !defined(SWITCHING_NOZZLE_SERVO_NR) && !defined(SWITCHING_EXTRUDER_SERVO_NR) + #error "Z_PROBE_SERVO_NR, switching nozzle, or switching extruder is required for DEACTIVATE_SERVOS_AFTER_MOVE." #endif /** @@ -670,7 +692,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE, #if 1 < 0 \ + ENABLED(PROBE_MANUALLY) \ + ENABLED(FIX_MOUNTED_PROBE) \ - + (HAS_Z_SERVO_ENDSTOP && DISABLED(BLTOUCH)) \ + + (HAS_Z_SERVO_PROBE && DISABLED(BLTOUCH)) \ + ENABLED(BLTOUCH) \ + ENABLED(SOLENOID_PROBE) \ + ENABLED(Z_PROBE_ALLEN_KEY) \ @@ -701,11 +723,11 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE, /** * NUM_SERVOS is required for a Z servo probe */ - #if HAS_Z_SERVO_ENDSTOP + #if HAS_Z_SERVO_PROBE #ifndef NUM_SERVOS - #error "You must set NUM_SERVOS for a Z servo probe (Z_ENDSTOP_SERVO_NR)." - #elif Z_ENDSTOP_SERVO_NR >= NUM_SERVOS - #error "Z_ENDSTOP_SERVO_NR must be smaller than NUM_SERVOS." + #error "You must set NUM_SERVOS for a Z servo probe (Z_PROBE_SERVO_NR)." + #elif Z_PROBE_SERVO_NR >= NUM_SERVOS + #error "Z_PROBE_SERVO_NR must be smaller than NUM_SERVOS." #endif #endif @@ -749,6 +771,10 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE, #error "MULTIPLE_PROBING must be >= 2." #endif + #if Z_PROBE_LOW_POINT > 0 + #error "Z_PROBE_LOW_POINT must be less than or equal to 0." + #endif + #else /** @@ -804,8 +830,8 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE, #error "AUTO_BED_LEVELING_UBL requires EEPROM_SETTINGS. Please update your configuration." #elif !WITHIN(GRID_MAX_POINTS_X, 3, 15) || !WITHIN(GRID_MAX_POINTS_Y, 3, 15) #error "GRID_MAX_POINTS_[XY] must be a whole number between 3 and 15." - #elif DISABLED(RESTORE_LEVELING_AFTER_G28) - #error "AUTO_BED_LEVELING_UBL (<=1.1.8) always has RESTORE_LEVELING_AFTER_G28 enabled. To keep this behavior, #define RESTORE_LEVELING_AFTER_G28. To keep it disabled comment out this line in SanityCheck.h." + #elif !defined(RESTORE_LEVELING_AFTER_G28) + #error "AUTO_BED_LEVELING_UBL used to enable RESTORE_LEVELING_AFTER_G28. To keep this behavior enable RESTORE_LEVELING_AFTER_G28. Otherwise define it as 'false'." #endif #elif OLDSCHOOL_ABL @@ -852,7 +878,9 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE, #endif -#if !HAS_MESH && ENABLED(G26_MESH_VALIDATION) +#if HAS_MESH + static_assert(DEFAULT_ZJERK > 0.1, "Low DEFAULT_ZJERK values are incompatible with mesh-based leveling."); +#elif ENABLED(G26_MESH_VALIDATION) #error "G26_MESH_VALIDATION requires MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, or AUTO_BED_LEVELING_UBL." #endif @@ -891,15 +919,15 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE, */ #if ENABLED(Z_SAFE_HOMING) #if HAS_BED_PROBE - #if !WITHIN(Z_SAFE_HOMING_X_POINT, MIN_PROBE_X, MAX_PROBE_X) - #error "Z_SAFE_HOMING_X_POINT is outside the probe region." - #elif !WITHIN(Z_SAFE_HOMING_Y_POINT, MIN_PROBE_Y, MAX_PROBE_Y) - #error "Z_SAFE_HOMING_Y_POINT is outside the probe region." - #endif - #elif !WITHIN(Z_SAFE_HOMING_X_POINT, X_MIN_POS, X_MAX_POS) - #error "Z_SAFE_HOMING_X_POINT can't be reached by the nozzle." - #elif !WITHIN(Z_SAFE_HOMING_Y_POINT, Y_MIN_POS, Y_MAX_POS) - #error "Z_SAFE_HOMING_Y_POINT can't be reached by the nozzle." + static_assert(WITHIN(Z_SAFE_HOMING_X_POINT, MIN_PROBE_X, MAX_PROBE_X), + "Z_SAFE_HOMING_X_POINT is outside the probe region."); + static_assert(WITHIN(Z_SAFE_HOMING_Y_POINT, MIN_PROBE_Y, MAX_PROBE_Y), + "Z_SAFE_HOMING_Y_POINT is outside the probe region."); + #else + static_assert(WITHIN(Z_SAFE_HOMING_X_POINT, X_MIN_POS, X_MAX_POS), + "Z_SAFE_HOMING_X_POINT can't be reached by the nozzle."); + static_assert(WITHIN(Z_SAFE_HOMING_Y_POINT, Y_MIN_POS, Y_MAX_POS), + "Z_SAFE_HOMING_Y_POINT can't be reached by the nozzle."); #endif #endif // Z_SAFE_HOMING @@ -1306,6 +1334,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE, * SAV_3DGLCD => U8GLIB_SH1106 => ULTIMAKERCONTROLLER * MKS_12864OLED => U8GLIB_SH1106 => ULTIMAKERCONTROLLER * MKS_12864OLED_SSD1306 => U8GLIB_SSD1306 => ULTIMAKERCONTROLLER + * MKS_MINI_12864 => MINIPANEL * miniVIKI => ULTIMAKERCONTROLLER * VIKI2 => ULTIMAKERCONTROLLER * ELB_FULL_GRAPHIC_CONTROLLER => ULTIMAKERCONTROLLER @@ -1422,12 +1451,26 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE, #error "E4_CS_PIN is required for E4_IS_TMC2130. Define E4_CS_PIN in Configuration_adv.h." #endif - // Require STEALTHCHOP for SENSORLESS_HOMING on DELTA as the transition from spreadCycle to stealthChop - // is necessary in order to reset the stallGuard indication between the initial movement of all three - // towers to +Z and the individual homing of each tower. This restriction can be removed once a means of - // clearing the stallGuard activated status is found. - #if ENABLED(SENSORLESS_HOMING) && ENABLED(DELTA) && !ENABLED(STEALTHCHOP) - #error "SENSORLESS_HOMING on DELTA currently requires STEALTHCHOP." + #if ENABLED(SENSORLESS_HOMING) + // Require STEALTHCHOP for SENSORLESS_HOMING on DELTA as the transition from spreadCycle to stealthChop + // is necessary in order to reset the stallGuard indication between the initial movement of all three + // towers to +Z and the individual homing of each tower. This restriction can be removed once a means of + // clearing the stallGuard activated status is found. + #if ENABLED(DELTA) && !ENABLED(STEALTHCHOP) + #error "SENSORLESS_HOMING on DELTA currently requires STEALTHCHOP." + #elif X_SENSORLESS && X_HOME_DIR == -1 && (DISABLED(X_MIN_ENDSTOP_INVERTING) || DISABLED(ENDSTOPPULLUP_XMIN)) + #error "SENSORLESS_HOMING requires X_MIN_ENDSTOP_INVERTING and ENDSTOPPULLUP_XMIN when homing to X_MIN." + #elif X_SENSORLESS && X_HOME_DIR == 1 && (DISABLED(X_MAX_ENDSTOP_INVERTING) || DISABLED(ENDSTOPPULLUP_XMAX)) + #error "SENSORLESS_HOMING requires X_MAX_ENDSTOP_INVERTING and ENDSTOPPULLUP_XMAX when homing to X_MAX." + #elif Y_SENSORLESS && Y_HOME_DIR == -1 && (DISABLED(Y_MIN_ENDSTOP_INVERTING) || DISABLED(ENDSTOPPULLUP_YMIN)) + #error "SENSORLESS_HOMING requires Y_MIN_ENDSTOP_INVERTING and ENDSTOPPULLUP_YMIN when homing to Y_MIN." + #elif Y_SENSORLESS && Y_HOME_DIR == 1 && (DISABLED(Y_MAX_ENDSTOP_INVERTING) || DISABLED(ENDSTOPPULLUP_YMAX)) + #error "SENSORLESS_HOMING requires Y_MAX_ENDSTOP_INVERTING and ENDSTOPPULLUP_YMAX when homing to Y_MAX." + #elif Z_SENSORLESS && Z_HOME_DIR == -1 && (DISABLED(Z_MIN_ENDSTOP_INVERTING) || DISABLED(ENDSTOPPULLUP_ZMIN)) + #error "SENSORLESS_HOMING requires Z_MIN_ENDSTOP_INVERTING and ENDSTOPPULLUP_ZMIN when homing to Z_MIN." + #elif Z_SENSORLESS && Z_HOME_DIR == 1 && (DISABLED(Z_MAX_ENDSTOP_INVERTING) || DISABLED(ENDSTOPPULLUP_ZMAX)) + #error "SENSORLESS_HOMING requires Z_MAX_ENDSTOP_INVERTING and ENDSTOPPULLUP_ZMAX when homing to Z_MAX." + #endif #endif // Sensorless homing is required for both combined steppers in an H-bot @@ -1702,4 +1745,8 @@ static_assert(COUNT(sanity_arr_3) <= XYZE_N, "DEFAULT_MAX_ACCELERATION has too m #endif #endif +#if ENABLED(POWER_LOSS_RECOVERY) && !ENABLED(ULTIPANEL) + #error "POWER_LOSS_RECOVERY currently requires an LCD Controller." +#endif + #endif // _SANITYCHECK_H_ diff --git a/Marlin/boards.h b/Marlin/boards.h index 459ddba885..a7aceff081 100644 --- a/Marlin/boards.h +++ b/Marlin/boards.h @@ -58,9 +58,10 @@ #define BOARD_K8400 79 // Velleman K8400 Controller (derived from 3Drag Controller) #define BOARD_BAM_DICE 401 // 2PrintBeta BAM&DICE with STK drivers #define BOARD_BAM_DICE_DUE 402 // 2PrintBeta BAM&DICE Due with STK drivers -#define BOARD_MKS_BASE 40 // MKS BASE 1.0 +#define BOARD_MKS_BASE 40 // MKS BASE v1.0 +#define BOARD_MKS_BASE_15 405 // MKS v1.5 with Allegro A4982 stepper drivers #define BOARD_MKS_BASE_HEROIC 41 // MKS BASE 1.0 with Heroic HR4982 stepper drivers -#define BOARD_MKS_13 47 // MKS v1.3 or 1.4 (maybe higher) +#define BOARD_MKS_GEN_13 47 // MKS GEN v1.3 or 1.4 #define BOARD_MKS_GEN_L 53 // MKS GEN L #define BOARD_ZRIB_V20 504 // zrib V2.0 control board (Chinese knock off RAMPS replica) #define BOARD_FELIX2 37 // Felix 2.0+ Electronics Board (RAMPS like) @@ -75,7 +76,9 @@ #define BOARD_RUMBA 80 // Rumba #define BOARD_BQ_ZUM_MEGA_3D 503 // bq ZUM Mega 3D #define BOARD_MAKEBOARD_MINI 431 // MakeBoard Mini v2.1.2 is a control board sold by MicroMake -#define BOARD_TRIGORILLA 343 // TriGorilla Anycubic version 1.3 based on RAMPS EFB +#define BOARD_TRIGORILLA_13 343 // TriGorilla Anycubic version 1.3 based on RAMPS EFB +#define BOARD_TRIGORILLA_14 443 // TriGorilla Anycubic version 1.4 based on RAMPS EFB +#define BOARD_RAMPS_ENDER_4 243 // Creality: Ender-4, CR-8 // // Other ATmega1280, ATmega2560 @@ -94,6 +97,7 @@ #define BOARD_MINIRAMBO 302 // Mini-Rambo #define BOARD_MINIRAMBO_10A 303 // Mini-Rambo 1.0a #define BOARD_EINSY_RAMBO 304 // Einsy Rambo +#define BOARD_EINSY_RETRO 305 // Einsy Retro #define BOARD_ELEFU_3 21 // Elefu Ra Board (v3) #define BOARD_LEAPFROG 999 // Leapfrog #define BOARD_MEGACONTROLLER 310 // Mega controller @@ -121,6 +125,7 @@ #define BOARD_MELZI_TRONXY 505 // Tronxy X5S #define BOARD_STB_11 64 // STB V1.1 #define BOARD_AZTEEG_X1 65 // Azteeg X1 +#define BOARD_ANET_10 69 // Anet 1.0 (Melzi clone) // // Other ATmega644P, ATmega644, ATmega1284P @@ -137,7 +142,6 @@ #define BOARD_OMCA_A 90 // Alpha OMCA board #define BOARD_OMCA 91 // Final OMCA board #define BOARD_SETHI 20 // Sethi 3D_1 -#define BOARD_ANET_10 69 // Anet 1.0 (Melzi clone) // // Teensyduino - AT90USB1286, AT90USB1286P diff --git a/Marlin/cardreader.cpp b/Marlin/cardreader.cpp index 97aaa901e4..581e0ec5af 100644 --- a/Marlin/cardreader.cpp +++ b/Marlin/cardreader.cpp @@ -31,6 +31,10 @@ #include "language.h" #include "printcounter.h" +#if ENABLED(POWER_LOSS_RECOVERY) + #include "power_loss_recovery.h" +#endif + #define LONGEST_FILENAME (longFilename[0] ? longFilename : filename) CardReader::CardReader() { @@ -420,8 +424,7 @@ void CardReader::openFile(char* name, const bool read, const bool subcall/*=fals strncpy(subdirname, dirname_start, dirname_end - dirname_start); subdirname[dirname_end - dirname_start] = '\0'; if (!myDir.open(curDir, subdirname, O_READ)) { - SERIAL_PROTOCOLPGM(MSG_SD_OPEN_FILE_FAIL); - SERIAL_PROTOCOL(subdirname); + SERIAL_PROTOCOLPAIR(MSG_SD_OPEN_FILE_FAIL, subdirname); SERIAL_PROTOCOLCHAR('.'); return; } @@ -928,6 +931,15 @@ void CardReader::printingHasFinished() { } else { sdprinting = false; + + #if ENABLED(POWER_LOSS_RECOVERY) + openJobRecoveryFile(false); + job_recovery_info.valid_head = job_recovery_info.valid_foot = 0; + (void)saveJobRecoveryInfo(); + closeJobRecoveryFile(); + job_recovery_commands_count = 0; + #endif + #if ENABLED(SD_FINISHED_STEPPERRELEASE) && defined(SD_FINISHED_RELEASECOMMAND) stepper.cleaning_buffer_counter = 1; // The command will fire from the Stepper ISR #endif @@ -937,6 +949,9 @@ void CardReader::printingHasFinished() { #if ENABLED(SDCARD_SORT_ALPHA) presort(); #endif + #if ENABLED(ULTRA_LCD) && ENABLED(LCD_SET_PROGRESS_MANUALLY) + progress_bar_percent = 0; + #endif #if ENABLED(SD_REPRINT_LAST_SELECTED_FILE) lcd_reselect_last_file(); #endif @@ -956,4 +971,46 @@ void CardReader::printingHasFinished() { } #endif // AUTO_REPORT_SD_STATUS +#if ENABLED(POWER_LOSS_RECOVERY) + + char job_recovery_file_name[4] = "bin"; + + void CardReader::openJobRecoveryFile(const bool read) { + if (!cardOK) return; + if (jobRecoveryFile.isOpen()) return; + if (!jobRecoveryFile.open(&root, job_recovery_file_name, read ? O_READ : O_CREAT | O_WRITE | O_TRUNC | O_SYNC)) { + SERIAL_PROTOCOLPAIR(MSG_SD_OPEN_FILE_FAIL, job_recovery_file_name); + SERIAL_PROTOCOLCHAR('.'); + SERIAL_EOL(); + } + else + SERIAL_PROTOCOLLNPAIR(MSG_SD_WRITE_TO_FILE, job_recovery_file_name); + } + + void CardReader::closeJobRecoveryFile() { jobRecoveryFile.close(); } + + bool CardReader::jobRecoverFileExists() { + return jobRecoveryFile.open(&root, job_recovery_file_name, O_READ); + } + + int16_t CardReader::saveJobRecoveryInfo() { + jobRecoveryFile.seekSet(0); + const int16_t ret = jobRecoveryFile.write(&job_recovery_info, sizeof(job_recovery_info)); + if (ret == -1) SERIAL_PROTOCOLLNPGM("Power-loss file write failed."); + return ret; + } + + int16_t CardReader::loadJobRecoveryInfo() { + return jobRecoveryFile.read(&job_recovery_info, sizeof(job_recovery_info)); + } + + void CardReader::removeJobRecoveryFile() { + if (jobRecoveryFile.remove(&root, job_recovery_file_name)) + SERIAL_PROTOCOLLNPGM("Power-loss file deleted."); + else + SERIAL_PROTOCOLLNPGM("Power-loss file delete failed."); + } + +#endif // POWER_LOSS_RECOVERY + #endif // SDSUPPORT diff --git a/Marlin/cardreader.h b/Marlin/cardreader.h index d9c068e4df..a7bb1cd46f 100644 --- a/Marlin/cardreader.h +++ b/Marlin/cardreader.h @@ -89,11 +89,21 @@ class CardReader { #endif #endif + #if ENABLED(POWER_LOSS_RECOVERY) + void openJobRecoveryFile(const bool read); + void closeJobRecoveryFile(); + bool jobRecoverFileExists(); + int16_t saveJobRecoveryInfo(); + int16_t loadJobRecoveryInfo(); + void removeJobRecoveryFile(); + #endif + FORCE_INLINE void pauseSDPrint() { sdprinting = false; } FORCE_INLINE bool isFileOpen() { return file.isOpen(); } FORCE_INLINE bool eof() { return sdpos >= filesize; } FORCE_INLINE int16_t get() { sdpos = file.curPosition(); return (int16_t)file.read(); } - FORCE_INLINE void setIndex(long index) { sdpos = index; file.seekSet(index); } + FORCE_INLINE void setIndex(const uint32_t index) { sdpos = index; file.seekSet(index); } + FORCE_INLINE uint32_t getIndex() { return sdpos; } FORCE_INLINE uint8_t percentDone() { return (isFileOpen() && filesize) ? sdpos / ((filesize + 99) / 100) : 0; } FORCE_INLINE char* getWorkDirName() { workDir.getFilename(filename); return filename; } @@ -168,6 +178,10 @@ class CardReader { SdVolume volume; SdFile file; + #if ENABLED(POWER_LOSS_RECOVERY) + SdFile jobRecoveryFile; + #endif + #define SD_PROCEDURE_DEPTH 1 #define MAXPATHNAMELENGTH (FILENAME_LENGTH*MAX_DIR_DEPTH + MAX_DIR_DEPTH + 1) uint8_t file_subcall_ctr; diff --git a/Marlin/configuration_store.cpp b/Marlin/configuration_store.cpp index a65fd88604..a6632a6bcf 100644 --- a/Marlin/configuration_store.cpp +++ b/Marlin/configuration_store.cpp @@ -37,7 +37,7 @@ */ // Change EEPROM version if the structure changes -#define EEPROM_VERSION "V52" +#define EEPROM_VERSION "V54" #define EEPROM_OFFSET 100 // Check the integrity of data offsets. @@ -61,6 +61,8 @@ #if HAS_TRINAMIC #include "stepper_indirection.h" + #include "tmc_util.h" + #define TMC_GET_PWMTHRS(P,Q) _tmc_thrs(stepper##Q.microsteps(), stepper##Q.TPWMTHRS(), planner.axis_steps_per_mm[P##_AXIS]) #endif #if ENABLED(AUTO_BED_LEVELING_UBL) @@ -215,7 +217,9 @@ typedef struct SettingsDataStruct { // // HAS_TRINAMIC // - uint16_t tmc_stepper_current[11]; // M906 X Y Z X2 Y2 Z2 E0 E1 E2 E3 E4 + #define TMC_AXES (MAX_EXTRUDERS + 6) + uint16_t tmc_stepper_current[TMC_AXES]; // M906 X Y Z X2 Y2 Z2 E0 E1 E2 E3 E4 + uint32_t tmc_hybrid_threshold[TMC_AXES]; // M913 X Y Z X2 Y2 Z2 E0 E1 E2 E3 E4 int16_t tmc_sgt[XYZ]; // M914 X Y Z // @@ -673,7 +677,7 @@ void MarlinSettings::postprocess() { _FIELD_TEST(tmc_stepper_current); - uint16_t currents[11] = { + uint16_t tmc_stepper_current[TMC_AXES] = { #if HAS_TRINAMIC #if X_IS_TRINAMIC stepperX.getCurrent(), @@ -734,24 +738,95 @@ void MarlinSettings::postprocess() { 0 #endif }; - EEPROM_WRITE(currents); + EEPROM_WRITE(tmc_stepper_current); + + // + // Save TMC2130 or TMC2208 Hybrid Threshold, and placeholder values + // + + _FIELD_TEST(tmc_hybrid_threshold); + + uint32_t tmc_hybrid_threshold[TMC_AXES] = { + #if ENABLED(HYBRID_THRESHOLD) + #if X_IS_TRINAMIC + TMC_GET_PWMTHRS(X, X), + #else + X_HYBRID_THRESHOLD, + #endif + #if Y_IS_TRINAMIC + TMC_GET_PWMTHRS(Y, Y), + #else + Y_HYBRID_THRESHOLD, + #endif + #if Z_IS_TRINAMIC + TMC_GET_PWMTHRS(Z, Z), + #else + Z_HYBRID_THRESHOLD, + #endif + #if X2_IS_TRINAMIC + TMC_GET_PWMTHRS(X, X2), + #else + X2_HYBRID_THRESHOLD, + #endif + #if Y2_IS_TRINAMIC + TMC_GET_PWMTHRS(Y, Y2), + #else + Y2_HYBRID_THRESHOLD, + #endif + #if Z2_IS_TRINAMIC + TMC_GET_PWMTHRS(Z, Z2), + #else + Z2_HYBRID_THRESHOLD, + #endif + #if E0_IS_TRINAMIC + TMC_GET_PWMTHRS(E, E0), + #else + E0_HYBRID_THRESHOLD, + #endif + #if E1_IS_TRINAMIC + TMC_GET_PWMTHRS(E, E1), + #else + E1_HYBRID_THRESHOLD, + #endif + #if E2_IS_TRINAMIC + TMC_GET_PWMTHRS(E, E2), + #else + E2_HYBRID_THRESHOLD, + #endif + #if E3_IS_TRINAMIC + TMC_GET_PWMTHRS(E, E3), + #else + E3_HYBRID_THRESHOLD, + #endif + #if E4_IS_TRINAMIC + TMC_GET_PWMTHRS(E, E4) + #else + E4_HYBRID_THRESHOLD + #endif + #else + 100, 100, 3, // X, Y, Z + 100, 100, 3, // X2, Y2, Z2 + 30, 30, 30, 30, 30 // E0, E1, E2, E3, E4 + #endif + }; + EEPROM_WRITE(tmc_hybrid_threshold); // // TMC2130 Sensorless homing threshold // - int16_t thrs[XYZ] = { + int16_t tmc_sgt[XYZ] = { #if ENABLED(SENSORLESS_HOMING) - #if ENABLED(X_IS_TMC2130) && defined(X_HOMING_SENSITIVITY) + #if defined(X_HOMING_SENSITIVITY) && (ENABLED(X_IS_TMC2130) || ENABLED(IS_TRAMS)) stepperX.sgt(), #else 0, #endif - #if ENABLED(Y_IS_TMC2130) && defined(Y_HOMING_SENSITIVITY) + #if defined(Y_HOMING_SENSITIVITY) && (ENABLED(Y_IS_TMC2130) || ENABLED(IS_TRAMS)) stepperY.sgt(), #else - 0 + 0, #endif - #if ENABLED(Z_IS_TMC2130) && defined(Z_HOMING_SENSITIVITY) + #if defined(Z_HOMING_SENSITIVITY) && (ENABLED(Z_IS_TMC2130) || ENABLED(IS_TRAMS)) stepperZ.sgt() #else 0 @@ -760,7 +835,7 @@ void MarlinSettings::postprocess() { 0 #endif }; - EEPROM_WRITE(thrs); + EEPROM_WRITE(tmc_sgt); // // Linear Advance @@ -1211,54 +1286,101 @@ void MarlinSettings::postprocess() { #endif + if (!validating) reset_stepper_drivers(); + // - // TMC2130 Stepper Current + // TMC2130 Stepper Settings // _FIELD_TEST(tmc_stepper_current); #if HAS_TRINAMIC - #define SET_CURR(N,Q) stepper##Q.setCurrent(currents[N] ? currents[N] : Q##_CURRENT, R_SENSE, HOLD_MULTIPLIER) - uint16_t currents[11]; + + #define SET_CURR(Q) stepper##Q.setCurrent(currents[TMC_##Q] ? currents[TMC_##Q] : Q##_CURRENT, R_SENSE, HOLD_MULTIPLIER) + uint16_t currents[TMC_AXES]; EEPROM_READ(currents); if (!validating) { #if X_IS_TRINAMIC - SET_CURR(0, X); + SET_CURR(X); #endif #if Y_IS_TRINAMIC - SET_CURR(1, Y); + SET_CURR(Y); #endif #if Z_IS_TRINAMIC - SET_CURR(2, Z); + SET_CURR(Z); #endif #if X2_IS_TRINAMIC - SET_CURR(3, X2); + SET_CURR(X2); #endif #if Y2_IS_TRINAMIC - SET_CURR(4, Y2); + SET_CURR(Y2); #endif #if Z2_IS_TRINAMIC - SET_CURR(5, Z2); + SET_CURR(Z2); #endif #if E0_IS_TRINAMIC - SET_CURR(6, E0); + SET_CURR(E0); #endif #if E1_IS_TRINAMIC - SET_CURR(7, E1); + SET_CURR(E1); #endif #if E2_IS_TRINAMIC - SET_CURR(8, E2); + SET_CURR(E2); #endif #if E3_IS_TRINAMIC - SET_CURR(9, E3); + SET_CURR(E3); #endif #if E4_IS_TRINAMIC - SET_CURR(10, E4); + SET_CURR(E4); #endif } #else uint16_t val; - for (uint8_t q=11; q--;) EEPROM_READ(val); + for (uint8_t q=TMC_AXES; q--;) EEPROM_READ(val); + #endif + + #if ENABLED(HYBRID_THRESHOLD) + #define TMC_SET_PWMTHRS(P,Q) tmc_set_pwmthrs(stepper##Q, TMC_##Q, tmc_hybrid_threshold[TMC_##Q], planner.axis_steps_per_mm[P##_AXIS]) + uint32_t tmc_hybrid_threshold[TMC_AXES]; + EEPROM_READ(tmc_hybrid_threshold); + if (!validating) { + #if X_IS_TRINAMIC + TMC_SET_PWMTHRS(X, X); + #endif + #if Y_IS_TRINAMIC + TMC_SET_PWMTHRS(Y, Y); + #endif + #if Z_IS_TRINAMIC + TMC_SET_PWMTHRS(Z, Z); + #endif + #if X2_IS_TRINAMIC + TMC_SET_PWMTHRS(X, X2); + #endif + #if Y2_IS_TRINAMIC + TMC_SET_PWMTHRS(Y, Y2); + #endif + #if Z2_IS_TRINAMIC + TMC_SET_PWMTHRS(Z, Z2); + #endif + #if E0_IS_TRINAMIC + TMC_SET_PWMTHRS(E, E0); + #endif + #if E1_IS_TRINAMIC + TMC_SET_PWMTHRS(E, E1); + #endif + #if E2_IS_TRINAMIC + TMC_SET_PWMTHRS(E, E2); + #endif + #if E3_IS_TRINAMIC + TMC_SET_PWMTHRS(E, E3); + #endif + #if E4_IS_TRINAMIC + TMC_SET_PWMTHRS(E, E4); + #endif + } + #else + uint32_t thrs_val; + for (uint8_t q=TMC_AXES; q--;) EEPROM_READ(thrs_val); #endif /* @@ -1267,32 +1389,32 @@ void MarlinSettings::postprocess() { * Y and Y2 use the same value * Z and Z2 use the same value */ - int16_t thrs[XYZ]; - EEPROM_READ(thrs); + int16_t tmc_sgt[XYZ]; + EEPROM_READ(tmc_sgt); #if ENABLED(SENSORLESS_HOMING) if (!validating) { #ifdef X_HOMING_SENSITIVITY - #if ENABLED(X_IS_TMC2130) - stepperX.sgt(thrs[0]); + #if ENABLED(X_IS_TMC2130) || ENABLED(IS_TRAMS) + stepperX.sgt(tmc_sgt[0]); #endif #if ENABLED(X2_IS_TMC2130) - stepperX2.sgt(thrs[0]); + stepperX2.sgt(tmc_sgt[0]); #endif #endif #ifdef Y_HOMING_SENSITIVITY - #if ENABLED(Y_IS_TMC2130) - stepperY.sgt(thrs[1]); + #if ENABLED(Y_IS_TMC2130) || ENABLED(IS_TRAMS) + stepperY.sgt(tmc_sgt[1]); #endif #if ENABLED(Y2_IS_TMC2130) - stepperY2.sgt(thrs[1]); + stepperY2.sgt(tmc_sgt[1]); #endif #endif #ifdef Z_HOMING_SENSITIVITY - #if ENABLED(Z_IS_TMC2130) - stepperZ.sgt(thrs[2]); + #if ENABLED(Z_IS_TMC2130) || ENABLED(IS_TRAMS) + stepperZ.sgt(tmc_sgt[2]); #endif #if ENABLED(Z2_IS_TMC2130) - stepperZ2.sgt(thrs[2]); + stepperZ2.sgt(tmc_sgt[2]); #endif #endif } @@ -1729,66 +1851,7 @@ void MarlinSettings::reset() { #endif ); - #if X_IS_TRINAMIC - stepperX.setCurrent(X_CURRENT, R_SENSE, HOLD_MULTIPLIER); - #endif - #if Y_IS_TRINAMIC - stepperY.setCurrent(Y_CURRENT, R_SENSE, HOLD_MULTIPLIER); - #endif - #if Z_IS_TRINAMIC - stepperZ.setCurrent(Z_CURRENT, R_SENSE, HOLD_MULTIPLIER); - #endif - #if X2_IS_TRINAMIC - stepperX2.setCurrent(X2_CURRENT, R_SENSE, HOLD_MULTIPLIER); - #endif - #if Y2_IS_TRINAMIC - stepperY2.setCurrent(Y2_CURRENT, R_SENSE, HOLD_MULTIPLIER); - #endif - #if Z2_IS_TRINAMIC - stepperZ2.setCurrent(Z2_CURRENT, R_SENSE, HOLD_MULTIPLIER); - #endif - #if E0_IS_TRINAMIC - stepperE0.setCurrent(E0_CURRENT, R_SENSE, HOLD_MULTIPLIER); - #endif - #if E1_IS_TRINAMIC - stepperE1.setCurrent(E1_CURRENT, R_SENSE, HOLD_MULTIPLIER); - #endif - #if E2_IS_TRINAMIC - stepperE2.setCurrent(E2_CURRENT, R_SENSE, HOLD_MULTIPLIER); - #endif - #if E3_IS_TRINAMIC - stepperE3.setCurrent(E3_CURRENT, R_SENSE, HOLD_MULTIPLIER); - #endif - #if E4_IS_TRINAMIC - stepperE4.setCurrent(E4_CURRENT, R_SENSE, HOLD_MULTIPLIER); - #endif - - #if ENABLED(SENSORLESS_HOMING) - #ifdef X_HOMING_SENSITIVITY - #if ENABLED(X_IS_TMC2130) - stepperX.sgt(X_HOMING_SENSITIVITY); - #endif - #if ENABLED(X2_IS_TMC2130) - stepperX2.sgt(X_HOMING_SENSITIVITY); - #endif - #endif - #ifdef Y_HOMING_SENSITIVITY - #if ENABLED(Y_IS_TMC2130) - stepperY.sgt(Y_HOMING_SENSITIVITY); - #endif - #if ENABLED(Y2_IS_TMC2130) - stepperY2.sgt(Y_HOMING_SENSITIVITY); - #endif - #endif - #ifdef Z_HOMING_SENSITIVITY - #if ENABLED(Z_IS_TMC2130) - stepperZ.sgt(Z_HOMING_SENSITIVITY); - #endif - #if ENABLED(Z2_IS_TMC2130) - stepperZ2.sgt(Z_HOMING_SENSITIVITY); - #endif - #endif - #endif + reset_stepper_drivers(); #if ENABLED(LIN_ADVANCE) planner.extruder_advance_K = LIN_ADVANCE_K; @@ -1811,7 +1874,7 @@ void MarlinSettings::reset() { #if ENABLED(ADVANCED_PAUSE_FEATURE) for (uint8_t e = 0; e < E_STEPPERS; e++) { filament_change_unload_length[e] = FILAMENT_CHANGE_UNLOAD_LENGTH; - filament_change_load_length[e] = FILAMENT_CHANGE_LOAD_LENGTH; + filament_change_load_length[e] = FILAMENT_CHANGE_FAST_LOAD_LENGTH; } #endif @@ -1827,6 +1890,20 @@ void MarlinSettings::reset() { #define CONFIG_ECHO_START do{ if (!forReplay) SERIAL_ECHO_START(); }while(0) + #if HAS_TRINAMIC + void say_M906() { SERIAL_ECHOPGM(" M906 "); } + #if ENABLED(HYBRID_THRESHOLD) + void say_M913() { SERIAL_ECHOPGM(" M913 "); } + #endif + #if ENABLED(SENSORLESS_HOMING) + void say_M914() { SERIAL_ECHOPGM(" M914 "); } + #endif + #endif + + #if ENABLED(ADVANCED_PAUSE_FEATURE) + void say_M603() { SERIAL_ECHOPGM(" M603 "); } + #endif + /** * M503 - Report current settings in RAM * @@ -2109,6 +2186,7 @@ void MarlinSettings::reset() { #endif // HAS_LEVELING #if ENABLED(DELTA) + if (!forReplay) { CONFIG_ECHO_START; SERIAL_ECHOLNPGM("Endstop adjustment:"); @@ -2133,6 +2211,7 @@ void MarlinSettings::reset() { SERIAL_EOL(); #elif ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || ENABLED(Z_DUAL_ENDSTOPS) + if (!forReplay) { CONFIG_ECHO_START; SERIAL_ECHOLNPGM("Endstop adjustment:"); @@ -2149,7 +2228,8 @@ void MarlinSettings::reset() { SERIAL_ECHOPAIR(" Z", LINEAR_UNIT(endstops.z_endstop_adj)); #endif SERIAL_EOL(); - #endif // DELTA + + #endif // [XYZ]_DUAL_ENDSTOPS #if ENABLED(ULTIPANEL) if (!forReplay) { @@ -2288,88 +2368,161 @@ void MarlinSettings::reset() { #endif #endif - /** - * TMC2130 stepper driver current - */ #if HAS_TRINAMIC + + /** + * TMC2130 / TMC2208 / TRAMS stepper driver current + */ if (!forReplay) { CONFIG_ECHO_START; SERIAL_ECHOLNPGM("Stepper driver current:"); } CONFIG_ECHO_START; - SERIAL_ECHOPGM(" M906"); - #if ENABLED(X_IS_TMC2130) || ENABLED(X_IS_TMC2208) - SERIAL_ECHOPAIR(" X ", stepperX.getCurrent()); + #if X_IS_TRINAMIC + say_M906(); + SERIAL_ECHOLNPAIR("X", stepperX.getCurrent()); #endif - #if ENABLED(Y_IS_TMC2130) || ENABLED(Y_IS_TMC2208) - SERIAL_ECHOPAIR(" Y ", stepperY.getCurrent()); + #if X2_IS_TRINAMIC + say_M906(); + SERIAL_ECHOLNPAIR("I1 X", stepperX2.getCurrent()); #endif - #if ENABLED(Z_IS_TMC2130) || ENABLED(Z_IS_TMC2208) - SERIAL_ECHOPAIR(" Z ", stepperZ.getCurrent()); + #if Y_IS_TRINAMIC + say_M906(); + SERIAL_ECHOLNPAIR("Y", stepperY.getCurrent()); #endif - #if ENABLED(X2_IS_TMC2130) || ENABLED(X2_IS_TMC2208) - SERIAL_ECHOPAIR(" X2 ", stepperX2.getCurrent()); + #if Y2_IS_TRINAMIC + say_M906(); + SERIAL_ECHOLNPAIR("I1 Y", stepperY2.getCurrent()); #endif - #if ENABLED(Y2_IS_TMC2130) || ENABLED(Y2_IS_TMC2208) - SERIAL_ECHOPAIR(" Y2 ", stepperY2.getCurrent()); + #if Z_IS_TRINAMIC + say_M906(); + SERIAL_ECHOLNPAIR("Z", stepperZ.getCurrent()); #endif - #if ENABLED(Z2_IS_TMC2130) || ENABLED(Z2_IS_TMC2208) - SERIAL_ECHOPAIR(" Z2 ", stepperZ2.getCurrent()); + #if Z2_IS_TRINAMIC + say_M906(); + SERIAL_ECHOLNPAIR("I1 Z", stepperZ2.getCurrent()); #endif - #if ENABLED(E0_IS_TMC2130) || ENABLED(E0_IS_TMC2208) - SERIAL_ECHOPAIR(" E0 ", stepperE0.getCurrent()); + #if E0_IS_TRINAMIC + say_M906(); + SERIAL_ECHOLNPAIR("T0 E", stepperE0.getCurrent()); #endif - #if ENABLED(E1_IS_TMC2130) || ENABLED(E1_IS_TMC2208) - SERIAL_ECHOPAIR(" E1 ", stepperE1.getCurrent()); + #if E_STEPPERS > 1 && E1_IS_TRINAMIC + say_M906(); + SERIAL_ECHOLNPAIR("T1 E", stepperE1.getCurrent()); #endif - #if ENABLED(E2_IS_TMC2130) || ENABLED(E2_IS_TMC2208) - SERIAL_ECHOPAIR(" E2 ", stepperE2.getCurrent()); + #if E_STEPPERS > 2 && E2_IS_TRINAMIC + say_M906(); + SERIAL_ECHOLNPAIR("T2 E", stepperE2.getCurrent()); #endif - #if ENABLED(E3_IS_TMC2130) || ENABLED(E3_IS_TMC2208) - SERIAL_ECHOPAIR(" E3 ", stepperE3.getCurrent()); + #if E_STEPPERS > 3 && E3_IS_TRINAMIC + say_M906(); + SERIAL_ECHOLNPAIR("T3 E", stepperE3.getCurrent()); #endif - #if ENABLED(E4_IS_TMC2130) || ENABLED(E4_IS_TMC2208) - SERIAL_ECHOPAIR(" E4 ", stepperE4.getCurrent()); + #if E_STEPPERS > 4 && E4_IS_TRINAMIC + say_M906(); + SERIAL_ECHOLNPAIR("T4 E", stepperE4.getCurrent()); #endif SERIAL_EOL(); - #endif - /** - * TMC2130 Sensorless homing thresholds - */ - #if ENABLED(SENSORLESS_HOMING) - if (!forReplay) { + /** + * TMC2130 / TMC2208 / TRAMS Hybrid Threshold + */ + #if ENABLED(HYBRID_THRESHOLD) + if (!forReplay) { + CONFIG_ECHO_START; + SERIAL_ECHOLNPGM("Hybrid Threshold:"); + } CONFIG_ECHO_START; - SERIAL_ECHOLNPGM("Sensorless homing threshold:"); - } - CONFIG_ECHO_START; - SERIAL_ECHOPGM(" M914"); - #ifdef X_HOMING_SENSITIVITY - #if ENABLED(X_IS_TMC2130) - SERIAL_ECHOPAIR(" X", stepperX.sgt()); + #if X_IS_TRINAMIC + say_M913(); + SERIAL_ECHOLNPAIR("X", TMC_GET_PWMTHRS(X, X)); #endif - #if ENABLED(X2_IS_TMC2130) - SERIAL_ECHOPAIR(" X2 ", stepperX2.sgt()); + #if X2_IS_TRINAMIC + say_M913(); + SERIAL_ECHOLNPAIR("I1 X", TMC_GET_PWMTHRS(X, X2)); #endif - #endif - #ifdef Y_HOMING_SENSITIVITY - #if ENABLED(Y_IS_TMC2130) - SERIAL_ECHOPAIR(" Y", stepperY.sgt()); + #if Y_IS_TRINAMIC + say_M913(); + SERIAL_ECHOLNPAIR("Y", TMC_GET_PWMTHRS(Y, Y)); #endif - #if ENABLED(X2_IS_TMC2130) - SERIAL_ECHOPAIR(" Y2 ", stepperY2.sgt()); + #if Y2_IS_TRINAMIC + say_M913(); + SERIAL_ECHOLNPAIR("I1 Y", TMC_GET_PWMTHRS(Y, Y2)); #endif - #endif - #ifdef Z_HOMING_SENSITIVITY - #if ENABLED(Z_IS_TMC2130) - SERIAL_ECHOPAIR(" Z", stepperZ.sgt()); + #if Z_IS_TRINAMIC + say_M913(); + SERIAL_ECHOLNPAIR("Z", TMC_GET_PWMTHRS(Z, Z)); #endif - #if ENABLED(Z2_IS_TMC2130) - SERIAL_ECHOPAIR(" Z2 ", stepperZ2.sgt()); + #if Z2_IS_TRINAMIC + say_M913(); + SERIAL_ECHOLNPAIR("I1 Z", TMC_GET_PWMTHRS(Z, Z2)); + #endif + #if E0_IS_TRINAMIC + say_M913(); + SERIAL_ECHOLNPAIR("T0 E", TMC_GET_PWMTHRS(E, E0)); + #endif + #if E_STEPPERS > 1 && E1_IS_TRINAMIC + say_M913(); + SERIAL_ECHOLNPAIR("T1 E", TMC_GET_PWMTHRS(E, E1)); + #endif + #if E_STEPPERS > 2 && E2_IS_TRINAMIC + say_M913(); + SERIAL_ECHOLNPAIR("T2 E", TMC_GET_PWMTHRS(E, E2)); #endif + #if E_STEPPERS > 3 && E3_IS_TRINAMIC + say_M913(); + SERIAL_ECHOLNPAIR("T3 E", TMC_GET_PWMTHRS(E, E3)); + #endif + #if E_STEPPERS > 4 && E4_IS_TRINAMIC + say_M913(); + SERIAL_ECHOLNPAIR("T4 E", TMC_GET_PWMTHRS(E, E4)); + #endif + SERIAL_EOL(); + #endif // HYBRID_THRESHOLD + + /** + * TMC2130 Sensorless homing thresholds + */ + #if ENABLED(SENSORLESS_HOMING) + if (!forReplay) { + CONFIG_ECHO_START; + SERIAL_ECHOLNPGM("Sensorless homing threshold:"); + } + CONFIG_ECHO_START; + #ifdef X_HOMING_SENSITIVITY + #if ENABLED(X_IS_TMC2130) || ENABLED(IS_TRAMS) + say_M914(); + SERIAL_ECHOLNPAIR("X", stepperX.sgt()); + #endif + #if ENABLED(X2_IS_TMC2130) + say_M914(); + SERIAL_ECHOLNPAIR("I1 X", stepperX2.sgt()); + #endif + #endif + #ifdef Y_HOMING_SENSITIVITY + #if ENABLED(Y_IS_TMC2130) || ENABLED(IS_TRAMS) + say_M914(); + SERIAL_ECHOLNPAIR("Y", stepperY.sgt()); + #endif + #if ENABLED(Y2_IS_TMC2130) + say_M914(); + SERIAL_ECHOLNPAIR("I1 Y", stepperY2.sgt()); + #endif + #endif + #ifdef Z_HOMING_SENSITIVITY + #if ENABLED(Z_IS_TMC2130) || ENABLED(IS_TRAMS) + say_M914(); + SERIAL_ECHOLNPAIR("Z", stepperZ.sgt()); + #endif + #if ENABLED(Z2_IS_TMC2130) + say_M914(); + SERIAL_ECHOLNPAIR("I1 Z", stepperZ2.sgt()); + #endif + #endif + SERIAL_EOL(); #endif - SERIAL_EOL(); - #endif + + #endif // HAS_TRINAMIC /** * Linear Advance @@ -2405,25 +2558,31 @@ void MarlinSettings::reset() { } CONFIG_ECHO_START; #if EXTRUDERS == 1 - SERIAL_ECHOPAIR(" M603 L", LINEAR_UNIT(filament_change_load_length[0])); + say_M603(); + SERIAL_ECHOPAIR("L", LINEAR_UNIT(filament_change_load_length[0])); SERIAL_ECHOLNPAIR(" U", LINEAR_UNIT(filament_change_unload_length[0])); #else - SERIAL_ECHOPAIR(" M603 T0 L", LINEAR_UNIT(filament_change_load_length[0])); + say_M603(); + SERIAL_ECHOPAIR("T0 L", LINEAR_UNIT(filament_change_load_length[0])); SERIAL_ECHOLNPAIR(" U", LINEAR_UNIT(filament_change_unload_length[0])); CONFIG_ECHO_START; - SERIAL_ECHOPAIR(" M603 T1 L", LINEAR_UNIT(filament_change_load_length[1])); + say_M603(); + SERIAL_ECHOPAIR("T1 L", LINEAR_UNIT(filament_change_load_length[1])); SERIAL_ECHOLNPAIR(" U", LINEAR_UNIT(filament_change_unload_length[1])); #if EXTRUDERS > 2 CONFIG_ECHO_START; - SERIAL_ECHOPAIR(" M603 T2 L", LINEAR_UNIT(filament_change_load_length[2])); + say_M603(); + SERIAL_ECHOPAIR("T2 L", LINEAR_UNIT(filament_change_load_length[2])); SERIAL_ECHOLNPAIR(" U", LINEAR_UNIT(filament_change_unload_length[2])); #if EXTRUDERS > 3 CONFIG_ECHO_START; - SERIAL_ECHOPAIR(" M603 T3 L", LINEAR_UNIT(filament_change_load_length[3])); + say_M603(); + SERIAL_ECHOPAIR("T3 L", LINEAR_UNIT(filament_change_load_length[3])); SERIAL_ECHOLNPAIR(" U", LINEAR_UNIT(filament_change_unload_length[3])); #if EXTRUDERS > 4 CONFIG_ECHO_START; - SERIAL_ECHOPAIR(" M603 T4 L", LINEAR_UNIT(filament_change_load_length[4])); + say_M603(); + SERIAL_ECHOPAIR("T4 L", LINEAR_UNIT(filament_change_load_length[4])); SERIAL_ECHOLNPAIR(" U", LINEAR_UNIT(filament_change_unload_length[4])); #endif // EXTRUDERS > 4 #endif // EXTRUDERS > 3 diff --git a/Marlin/enum.h b/Marlin/enum.h index b4e7564f58..8764b8679a 100644 --- a/Marlin/enum.h +++ b/Marlin/enum.h @@ -135,6 +135,9 @@ enum EndstopEnum : char { ADVANCED_PAUSE_MESSAGE_INSERT, ADVANCED_PAUSE_MESSAGE_LOAD, ADVANCED_PAUSE_MESSAGE_PURGE, + #if ENABLED(ADVANCED_PAUSE_CONTINUOUS_PURGE) + ADVANCED_PAUSE_MESSAGE_CONTINUOUS_PURGE, + #endif ADVANCED_PAUSE_MESSAGE_OPTION, ADVANCED_PAUSE_MESSAGE_RESUME, ADVANCED_PAUSE_MESSAGE_STATUS, diff --git a/Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h b/Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h index c7602275e2..aad12e7d4d 100644 --- a/Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h +++ b/Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h @@ -307,6 +307,7 @@ #define TEMP_SENSOR_3 0 #define TEMP_SENSOR_4 0 #define TEMP_SENSOR_BED 7 +#define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -398,23 +399,30 @@ //=========================================================================== //============================= PID > Bed Temperature Control =============== //=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ #define PIDTEMPBED //#define BED_LIMIT_SWITCHING -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ #define MAX_BED_POWER 206 // limits duty cycle to bed; 255=full current #if ENABLED(PIDTEMPBED) @@ -665,7 +673,7 @@ /** * Z Servo Probe, such as an endstop switch on a rotating arm. */ -//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles /** @@ -684,6 +692,9 @@ * readings with inductive probes and piezo sensors. */ //#define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif //#define PROBING_FANS_OFF // Turn fans off when probing //#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors @@ -756,6 +767,8 @@ #define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points //#define Z_AFTER_PROBING 5 // Z position after probing is done +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + // For M851 give a range for adjusting the Z probe offset #define Z_PROBE_OFFSET_RANGE_MIN -20 #define Z_PROBE_OFFSET_RANGE_MAX 20 @@ -856,6 +869,10 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + /** * Filament Runout Sensors * Mechanical or opto endstops are used to check for the presence of filament. @@ -1046,6 +1063,11 @@ // Add a menu item to move between bed corners for manual bed adjustment //#define LEVEL_BED_CORNERS +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + /** * Commands to execute at the end of G29 probing. * Useful to retract or move the Z probe out of the way. diff --git a/Marlin/example_configurations/AlephObjects/TAZ4/Configuration_adv.h b/Marlin/example_configurations/AlephObjects/TAZ4/Configuration_adv.h index 6bf2544bdb..41671fbe98 100644 --- a/Marlin/example_configurations/AlephObjects/TAZ4/Configuration_adv.h +++ b/Marlin/example_configurations/AlephObjects/TAZ4/Configuration_adv.h @@ -230,6 +230,7 @@ #define E2_AUTO_FAN_PIN -1 #define E3_AUTO_FAN_PIN -1 #define E4_AUTO_FAN_PIN -1 +#define CHAMBER_AUTO_FAN_PIN -1 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50 #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed @@ -554,6 +555,16 @@ // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART + /** + * Continue after Power-Loss (Creality3D) + * + * Store the current state to the SD Card at the start of each layer + * during SD printing. If the recovery file is found at boot time, present + * an option on the LCD screen to continue the print from the last-known + * point in the file. + */ + //#define POWER_LOSS_RECOVERY + /** * Sort SD file listings in alphabetical order. * @@ -899,38 +910,44 @@ */ //#define ADVANCED_PAUSE_FEATURE #if ENABLED(ADVANCED_PAUSE_FEATURE) - #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_LENGTH 100 // (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_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast. - #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (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_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate. - #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (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. - - // Filament Unload does a Retract, Delay, and Purge first: - #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. - #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. - - //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. - //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) + #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_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. + // 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. + // 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_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. + // 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. + // 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. + + // Filament Unload does a Retract, Delay, and Purge first: + #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. + #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. + + //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) #endif // @section tmc diff --git a/Marlin/example_configurations/AliExpress/CL-260/Configuration.h b/Marlin/example_configurations/AliExpress/CL-260/Configuration.h index f926171e68..70739cf1a1 100644 --- a/Marlin/example_configurations/AliExpress/CL-260/Configuration.h +++ b/Marlin/example_configurations/AliExpress/CL-260/Configuration.h @@ -307,6 +307,7 @@ #define TEMP_SENSOR_3 0 #define TEMP_SENSOR_4 0 #define TEMP_SENSOR_BED 1 +#define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -389,23 +390,30 @@ //=========================================================================== //============================= PID > Bed Temperature Control =============== //=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ //#define PIDTEMPBED //#define BED_LIMIT_SWITCHING -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #if ENABLED(PIDTEMPBED) @@ -645,7 +653,7 @@ /** * Z Servo Probe, such as an endstop switch on a rotating arm. */ -//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles /** @@ -664,6 +672,9 @@ * readings with inductive probes and piezo sensors. */ //#define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif //#define PROBING_FANS_OFF // Turn fans off when probing //#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors @@ -736,6 +747,8 @@ #define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points //#define Z_AFTER_PROBING 5 // Z position after probing is done +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + // For M851 give a range for adjusting the Z probe offset #define Z_PROBE_OFFSET_RANGE_MIN -20 #define Z_PROBE_OFFSET_RANGE_MAX 20 @@ -836,6 +849,10 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + /** * Filament Runout Sensors * Mechanical or opto endstops are used to check for the presence of filament. @@ -1026,6 +1043,11 @@ // Add a menu item to move between bed corners for manual bed adjustment //#define LEVEL_BED_CORNERS +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + /** * Commands to execute at the end of G29 probing. * Useful to retract or move the Z probe out of the way. diff --git a/Marlin/example_configurations/Anet/A6/Configuration.h b/Marlin/example_configurations/Anet/A6/Configuration.h index 3f177f4398..e926b2d5fa 100644 --- a/Marlin/example_configurations/Anet/A6/Configuration.h +++ b/Marlin/example_configurations/Anet/A6/Configuration.h @@ -307,6 +307,7 @@ #define TEMP_SENSOR_3 0 #define TEMP_SENSOR_4 0 #define TEMP_SENSOR_BED 5 +#define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -400,23 +401,30 @@ //=========================================================================== //============================= PID > Bed Temperature Control =============== //=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ #define PIDTEMPBED //#define BED_LIMIT_SWITCHING -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #if ENABLED(PIDTEMPBED) @@ -693,7 +701,7 @@ /** * Z Servo Probe, such as an endstop switch on a rotating arm. */ -//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles /** @@ -712,6 +720,9 @@ * readings with inductive probes and piezo sensors. */ #define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif #define PROBING_FANS_OFF // Turn fans off when probing //#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors @@ -802,12 +813,17 @@ * 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 // Z Clearance for Deploy/Stow -#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points -//#define Z_AFTER_PROBING 5 // Z position after probing is done -//#define Z_CLEARANCE_DEPLOY_PROBE 5 // Z Clearance for Deploy/Stow -//#define Z_CLEARANCE_BETWEEN_PROBES 3 // Z Clearance between probe points -//#define Z_AFTER_PROBING 3 // Z position after probing is done +#if 1 // 0 for less clearance + #define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow + #define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points + //#define Z_AFTER_PROBING 5 // Z position after probing is done +#else + #define Z_CLEARANCE_DEPLOY_PROBE 5 // Z Clearance for Deploy/Stow + #define Z_CLEARANCE_BETWEEN_PROBES 3 // Z Clearance between probe points + //#define Z_AFTER_PROBING 3 // Z position after probing is done +#endif + +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping // For M851 give a range for adjusting the Z probe offset #define Z_PROBE_OFFSET_RANGE_MIN -20 @@ -947,6 +963,10 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + /** * Filament Runout Sensors * Mechanical or opto endstops are used to check for the presence of filament. @@ -1161,6 +1181,11 @@ // Add a menu item to move between bed corners for manual bed adjustment //#define LEVEL_BED_CORNERS +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + /** * Commands to execute at the end of G29 probing. * Useful to retract or move the Z probe out of the way. diff --git a/Marlin/example_configurations/Anet/A6/Configuration_adv.h b/Marlin/example_configurations/Anet/A6/Configuration_adv.h index 4995baf990..cce73e7d34 100644 --- a/Marlin/example_configurations/Anet/A6/Configuration_adv.h +++ b/Marlin/example_configurations/Anet/A6/Configuration_adv.h @@ -230,6 +230,7 @@ #define E2_AUTO_FAN_PIN -1 #define E3_AUTO_FAN_PIN -1 #define E4_AUTO_FAN_PIN -1 +#define CHAMBER_AUTO_FAN_PIN -1 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50 #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed @@ -554,6 +555,16 @@ // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART + /** + * Continue after Power-Loss (Creality3D) + * + * Store the current state to the SD Card at the start of each layer + * during SD printing. If the recovery file is found at boot time, present + * an option on the LCD screen to continue the print from the last-known + * point in the file. + */ + //#define POWER_LOSS_RECOVERY + /** * Sort SD file listings in alphabetical order. * @@ -899,38 +910,44 @@ */ //#define ADVANCED_PAUSE_FEATURE #if ENABLED(ADVANCED_PAUSE_FEATURE) - #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_LENGTH 100 // (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_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast. - #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (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_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate. - #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (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. - - // Filament Unload does a Retract, Delay, and Purge first: - #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. - #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. - - //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. - //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) + #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_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. + // 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. + // 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_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. + // 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. + // 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. + + // Filament Unload does a Retract, Delay, and Purge first: + #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. + #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. + + //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) #endif // @section tmc diff --git a/Marlin/example_configurations/Anet/A8/Configuration.h b/Marlin/example_configurations/Anet/A8/Configuration.h index 9d70afe690..493156d6bf 100644 --- a/Marlin/example_configurations/Anet/A8/Configuration.h +++ b/Marlin/example_configurations/Anet/A8/Configuration.h @@ -308,6 +308,7 @@ #define TEMP_SENSOR_3 0 #define TEMP_SENSOR_4 0 #define TEMP_SENSOR_BED 5 +#define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,23 +397,30 @@ //=========================================================================== //============================= PID > Bed Temperature Control =============== //=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ //#define PIDTEMPBED #define BED_LIMIT_SWITCHING -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #if ENABLED(PIDTEMPBED) @@ -652,7 +660,7 @@ /** * Z Servo Probe, such as an endstop switch on a rotating arm. */ -//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles /** @@ -671,6 +679,9 @@ * readings with inductive probes and piezo sensors. */ //#define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif //#define PROBING_FANS_OFF // Turn fans off when probing //#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors @@ -743,6 +754,8 @@ #define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points //#define Z_AFTER_PROBING 5 // Z position after probing is done +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + // For M851 give a range for adjusting the Z probe offset #define Z_PROBE_OFFSET_RANGE_MIN -20 #define Z_PROBE_OFFSET_RANGE_MAX 20 @@ -843,6 +856,10 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + /** * Filament Runout Sensors * Mechanical or opto endstops are used to check for the presence of filament. @@ -1044,6 +1061,11 @@ // Add a menu item to move between bed corners for manual bed adjustment //#define LEVEL_BED_CORNERS +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + /** * Commands to execute at the end of G29 probing. * Useful to retract or move the Z probe out of the way. diff --git a/Marlin/example_configurations/Anet/A8/Configuration_adv.h b/Marlin/example_configurations/Anet/A8/Configuration_adv.h index 9c3999dd16..a354adffda 100644 --- a/Marlin/example_configurations/Anet/A8/Configuration_adv.h +++ b/Marlin/example_configurations/Anet/A8/Configuration_adv.h @@ -230,6 +230,7 @@ #define E2_AUTO_FAN_PIN -1 #define E3_AUTO_FAN_PIN -1 #define E4_AUTO_FAN_PIN -1 +#define CHAMBER_AUTO_FAN_PIN -1 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50 #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed @@ -554,6 +555,16 @@ // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART + /** + * Continue after Power-Loss (Creality3D) + * + * Store the current state to the SD Card at the start of each layer + * during SD printing. If the recovery file is found at boot time, present + * an option on the LCD screen to continue the print from the last-known + * point in the file. + */ + //#define POWER_LOSS_RECOVERY + /** * Sort SD file listings in alphabetical order. * @@ -899,38 +910,44 @@ */ //#define ADVANCED_PAUSE_FEATURE #if ENABLED(ADVANCED_PAUSE_FEATURE) - #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_LENGTH 100 // (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_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast. - #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (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_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate. - #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (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. - - // Filament Unload does a Retract, Delay, and Purge first: - #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. - #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. - - //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. - //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) + #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_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. + // 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. + // 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_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. + // 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. + // 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. + + // Filament Unload does a Retract, Delay, and Purge first: + #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. + #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. + + //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) #endif // @section tmc diff --git a/Marlin/example_configurations/BIBO/TouchX/Cyclops/Configuration.h b/Marlin/example_configurations/BIBO/TouchX/Cyclops/Configuration.h index 89a73a221f..a138ef5314 100644 --- a/Marlin/example_configurations/BIBO/TouchX/Cyclops/Configuration.h +++ b/Marlin/example_configurations/BIBO/TouchX/Cyclops/Configuration.h @@ -307,6 +307,7 @@ #define TEMP_SENSOR_3 0 #define TEMP_SENSOR_4 0 #define TEMP_SENSOR_BED 5 +#define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -389,23 +390,30 @@ //=========================================================================== //============================= PID > Bed Temperature Control =============== //=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ //#define PIDTEMPBED //#define BED_LIMIT_SWITCHING -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #if ENABLED(PIDTEMPBED) @@ -645,7 +653,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo /** * Z Servo Probe, such as an endstop switch on a rotating arm. */ -//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles /** @@ -664,6 +672,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo * readings with inductive probes and piezo sensors. */ //#define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif //#define PROBING_FANS_OFF // Turn fans off when probing //#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors @@ -736,6 +747,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo #define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points //#define Z_AFTER_PROBING 10 // Z position after probing is done +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + // For M851 give a range for adjusting the Z probe offset #define Z_PROBE_OFFSET_RANGE_MIN -20 #define Z_PROBE_OFFSET_RANGE_MAX 20 @@ -836,6 +849,10 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo #define MAX_SOFTWARE_ENDSTOP_Z #endif +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + /** * Filament Runout Sensors * Mechanical or opto endstops are used to check for the presence of filament. @@ -1026,6 +1043,11 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo // Add a menu item to move between bed corners for manual bed adjustment #define LEVEL_BED_CORNERS +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + /** * Commands to execute at the end of G29 probing. * Useful to retract or move the Z probe out of the way. diff --git a/Marlin/example_configurations/BIBO/TouchX/Cyclops/Configuration_adv.h b/Marlin/example_configurations/BIBO/TouchX/Cyclops/Configuration_adv.h index dacb83b6f3..4f27688262 100644 --- a/Marlin/example_configurations/BIBO/TouchX/Cyclops/Configuration_adv.h +++ b/Marlin/example_configurations/BIBO/TouchX/Cyclops/Configuration_adv.h @@ -230,6 +230,7 @@ #define E2_AUTO_FAN_PIN -1 #define E3_AUTO_FAN_PIN -1 #define E4_AUTO_FAN_PIN -1 +#define CHAMBER_AUTO_FAN_PIN -1 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50 #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed @@ -554,6 +555,16 @@ // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART + /** + * Continue after Power-Loss (Creality3D) + * + * Store the current state to the SD Card at the start of each layer + * during SD printing. If the recovery file is found at boot time, present + * an option on the LCD screen to continue the print from the last-known + * point in the file. + */ + //#define POWER_LOSS_RECOVERY + /** * Sort SD file listings in alphabetical order. * @@ -899,38 +910,44 @@ */ //#define ADVANCED_PAUSE_FEATURE #if ENABLED(ADVANCED_PAUSE_FEATURE) - #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_LENGTH 100 // (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_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast. - #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (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_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate. - #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (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. - - // Filament Unload does a Retract, Delay, and Purge first: - #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. - #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. - - //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. - //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) + #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_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. + // 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. + // 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_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. + // 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. + // 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. + + // Filament Unload does a Retract, Delay, and Purge first: + #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. + #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. + + //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) #endif // @section tmc diff --git a/Marlin/example_configurations/BIBO/TouchX/default/Configuration.h b/Marlin/example_configurations/BIBO/TouchX/default/Configuration.h index ee6c31c3cf..8bdc832ff5 100644 --- a/Marlin/example_configurations/BIBO/TouchX/default/Configuration.h +++ b/Marlin/example_configurations/BIBO/TouchX/default/Configuration.h @@ -307,6 +307,7 @@ #define TEMP_SENSOR_3 0 #define TEMP_SENSOR_4 0 #define TEMP_SENSOR_BED 60 +#define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -389,23 +390,30 @@ //=========================================================================== //============================= PID > Bed Temperature Control =============== //=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ //#define PIDTEMPBED //#define BED_LIMIT_SWITCHING -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #if ENABLED(PIDTEMPBED) @@ -645,7 +653,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo /** * Z Servo Probe, such as an endstop switch on a rotating arm. */ -//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles /** @@ -664,6 +672,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo * readings with inductive probes and piezo sensors. */ //#define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif //#define PROBING_FANS_OFF // Turn fans off when probing //#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors @@ -736,6 +747,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo #define Z_CLEARANCE_BETWEEN_PROBES 10 // Z Clearance between probe points //#define Z_AFTER_PROBING 10 // Z position after probing is done +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + // For M851 give a range for adjusting the Z probe offset #define Z_PROBE_OFFSET_RANGE_MIN -20 #define Z_PROBE_OFFSET_RANGE_MAX 20 @@ -836,6 +849,10 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo #define MAX_SOFTWARE_ENDSTOP_Z #endif +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + /** * Filament Runout Sensors * Mechanical or opto endstops are used to check for the presence of filament. @@ -1026,6 +1043,11 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo // Add a menu item to move between bed corners for manual bed adjustment #define LEVEL_BED_CORNERS +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + /** * Commands to execute at the end of G29 probing. * Useful to retract or move the Z probe out of the way. diff --git a/Marlin/example_configurations/BIBO/TouchX/default/Configuration_adv.h b/Marlin/example_configurations/BIBO/TouchX/default/Configuration_adv.h index ac8003a288..6fc096c17d 100644 --- a/Marlin/example_configurations/BIBO/TouchX/default/Configuration_adv.h +++ b/Marlin/example_configurations/BIBO/TouchX/default/Configuration_adv.h @@ -230,6 +230,7 @@ #define E2_AUTO_FAN_PIN -1 #define E3_AUTO_FAN_PIN -1 #define E4_AUTO_FAN_PIN -1 +#define CHAMBER_AUTO_FAN_PIN -1 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50 #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed @@ -554,6 +555,16 @@ // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART + /** + * Continue after Power-Loss (Creality3D) + * + * Store the current state to the SD Card at the start of each layer + * during SD printing. If the recovery file is found at boot time, present + * an option on the LCD screen to continue the print from the last-known + * point in the file. + */ + //#define POWER_LOSS_RECOVERY + /** * Sort SD file listings in alphabetical order. * @@ -899,38 +910,44 @@ */ //#define ADVANCED_PAUSE_FEATURE #if ENABLED(ADVANCED_PAUSE_FEATURE) - #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_LENGTH 100 // (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_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast. - #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (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_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate. - #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (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. - - // Filament Unload does a Retract, Delay, and Purge first: - #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. - #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. - - //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. - //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) + #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_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. + // 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. + // 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_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. + // 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. + // 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. + + // Filament Unload does a Retract, Delay, and Purge first: + #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. + #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. + + //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) #endif // @section tmc diff --git a/Marlin/example_configurations/BQ/Hephestos/Configuration.h b/Marlin/example_configurations/BQ/Hephestos/Configuration.h index 4979a9929b..ba9844c5a8 100644 --- a/Marlin/example_configurations/BQ/Hephestos/Configuration.h +++ b/Marlin/example_configurations/BQ/Hephestos/Configuration.h @@ -307,6 +307,7 @@ #define TEMP_SENSOR_3 0 #define TEMP_SENSOR_4 0 #define TEMP_SENSOR_BED 0 +#define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -377,23 +378,30 @@ //=========================================================================== //============================= PID > Bed Temperature Control =============== //=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ //#define PIDTEMPBED //#define BED_LIMIT_SWITCHING -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #if ENABLED(PIDTEMPBED) @@ -633,7 +641,7 @@ /** * Z Servo Probe, such as an endstop switch on a rotating arm. */ -//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles /** @@ -652,6 +660,9 @@ * readings with inductive probes and piezo sensors. */ //#define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif //#define PROBING_FANS_OFF // Turn fans off when probing //#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors @@ -724,6 +735,8 @@ #define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points //#define Z_AFTER_PROBING 5 // Z position after probing is done +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + // For M851 give a range for adjusting the Z probe offset #define Z_PROBE_OFFSET_RANGE_MIN -20 #define Z_PROBE_OFFSET_RANGE_MAX 20 @@ -824,6 +837,10 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + /** * Filament Runout Sensors * Mechanical or opto endstops are used to check for the presence of filament. @@ -1014,6 +1031,11 @@ // Add a menu item to move between bed corners for manual bed adjustment //#define LEVEL_BED_CORNERS +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + /** * Commands to execute at the end of G29 probing. * Useful to retract or move the Z probe out of the way. diff --git a/Marlin/example_configurations/BQ/Hephestos/Configuration_adv.h b/Marlin/example_configurations/BQ/Hephestos/Configuration_adv.h index c8d7787866..8884850962 100644 --- a/Marlin/example_configurations/BQ/Hephestos/Configuration_adv.h +++ b/Marlin/example_configurations/BQ/Hephestos/Configuration_adv.h @@ -230,6 +230,7 @@ #define E2_AUTO_FAN_PIN -1 #define E3_AUTO_FAN_PIN -1 #define E4_AUTO_FAN_PIN -1 +#define CHAMBER_AUTO_FAN_PIN -1 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50 #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed @@ -554,6 +555,16 @@ // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART + /** + * Continue after Power-Loss (Creality3D) + * + * Store the current state to the SD Card at the start of each layer + * during SD printing. If the recovery file is found at boot time, present + * an option on the LCD screen to continue the print from the last-known + * point in the file. + */ + //#define POWER_LOSS_RECOVERY + /** * Sort SD file listings in alphabetical order. * @@ -899,38 +910,44 @@ */ //#define ADVANCED_PAUSE_FEATURE #if ENABLED(ADVANCED_PAUSE_FEATURE) - #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_LENGTH 100 // (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_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast. - #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (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_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate. - #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (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. - - // Filament Unload does a Retract, Delay, and Purge first: - #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. - #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. - - //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. - //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) + #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_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. + // 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. + // 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_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. + // 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. + // 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. + + // Filament Unload does a Retract, Delay, and Purge first: + #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. + #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. + + //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) #endif // @section tmc diff --git a/Marlin/example_configurations/BQ/Hephestos_2/Configuration.h b/Marlin/example_configurations/BQ/Hephestos_2/Configuration.h index fb7514dc07..3ab40ebf81 100644 --- a/Marlin/example_configurations/BQ/Hephestos_2/Configuration.h +++ b/Marlin/example_configurations/BQ/Hephestos_2/Configuration.h @@ -315,6 +315,7 @@ #define TEMP_SENSOR_3 0 #define TEMP_SENSOR_4 0 #define TEMP_SENSOR_BED 0 +#define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -390,23 +391,30 @@ //=========================================================================== //============================= PID > Bed Temperature Control =============== //=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ //#define PIDTEMPBED //#define BED_LIMIT_SWITCHING -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #if ENABLED(PIDTEMPBED) @@ -646,7 +654,7 @@ /** * Z Servo Probe, such as an endstop switch on a rotating arm. */ -//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles /** @@ -665,6 +673,9 @@ * readings with inductive probes and piezo sensors. */ //#define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif //#define PROBING_FANS_OFF // Turn fans off when probing //#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors @@ -700,7 +711,7 @@ */ #define X_PROBE_OFFSET_FROM_EXTRUDER 34 // X offset: -left +right [of the nozzle] #define Y_PROBE_OFFSET_FROM_EXTRUDER 15 // Y offset: -front +behind [the nozzle] -#define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle] +#define Z_PROBE_OFFSET_FROM_EXTRUDER -4 // Z offset: -below +above [the nozzle] // Certain types of probes need to stay away from edges #define MIN_PROBE_EDGE 10 @@ -737,9 +748,11 @@ #define Z_CLEARANCE_BETWEEN_PROBES 2 // Z Clearance between probe points //#define Z_AFTER_PROBING 2 // Z position after probing is done +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + // For M851 give a range for adjusting the Z probe offset -#define Z_PROBE_OFFSET_RANGE_MIN -2 -#define Z_PROBE_OFFSET_RANGE_MAX 0 +#define Z_PROBE_OFFSET_RANGE_MIN -5.5 +#define Z_PROBE_OFFSET_RANGE_MAX -3 // Enable the M48 repeatability test to test probe accuracy #define Z_MIN_PROBE_REPEATABILITY_TEST @@ -837,6 +850,10 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + /** * Filament Runout Sensors * Mechanical or opto endstops are used to check for the presence of filament. @@ -1038,6 +1055,11 @@ // Add a menu item to move between bed corners for manual bed adjustment //#define LEVEL_BED_CORNERS +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + /** * Commands to execute at the end of G29 probing. * Useful to retract or move the Z probe out of the way. diff --git a/Marlin/example_configurations/BQ/Hephestos_2/Configuration_adv.h b/Marlin/example_configurations/BQ/Hephestos_2/Configuration_adv.h index 84befe1096..6d6c30a0b3 100644 --- a/Marlin/example_configurations/BQ/Hephestos_2/Configuration_adv.h +++ b/Marlin/example_configurations/BQ/Hephestos_2/Configuration_adv.h @@ -230,6 +230,7 @@ #define E2_AUTO_FAN_PIN -1 #define E3_AUTO_FAN_PIN -1 #define E4_AUTO_FAN_PIN -1 +#define CHAMBER_AUTO_FAN_PIN -1 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50 #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed @@ -554,6 +555,16 @@ // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART + /** + * Continue after Power-Loss (Creality3D) + * + * Store the current state to the SD Card at the start of each layer + * during SD printing. If the recovery file is found at boot time, present + * an option on the LCD screen to continue the print from the last-known + * point in the file. + */ + //#define POWER_LOSS_RECOVERY + /** * Sort SD file listings in alphabetical order. * @@ -899,38 +910,44 @@ */ //#define ADVANCED_PAUSE_FEATURE #if ENABLED(ADVANCED_PAUSE_FEATURE) - #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_LENGTH 100 // (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_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast. - #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (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_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate. - #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (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. - - // Filament Unload does a Retract, Delay, and Purge first: - #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. - #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. - - //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. - //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) + #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_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. + // 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. + // 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_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. + // 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. + // 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. + + // Filament Unload does a Retract, Delay, and Purge first: + #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. + #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. + + //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) #endif // @section tmc diff --git a/Marlin/example_configurations/BQ/WITBOX/Configuration.h b/Marlin/example_configurations/BQ/WITBOX/Configuration.h index 560d9a83bc..59aed80214 100644 --- a/Marlin/example_configurations/BQ/WITBOX/Configuration.h +++ b/Marlin/example_configurations/BQ/WITBOX/Configuration.h @@ -307,6 +307,7 @@ #define TEMP_SENSOR_3 0 #define TEMP_SENSOR_4 0 #define TEMP_SENSOR_BED 0 +#define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -377,23 +378,30 @@ //=========================================================================== //============================= PID > Bed Temperature Control =============== //=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ //#define PIDTEMPBED //#define BED_LIMIT_SWITCHING -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #if ENABLED(PIDTEMPBED) @@ -633,7 +641,7 @@ /** * Z Servo Probe, such as an endstop switch on a rotating arm. */ -//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles /** @@ -652,6 +660,9 @@ * readings with inductive probes and piezo sensors. */ //#define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif //#define PROBING_FANS_OFF // Turn fans off when probing //#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors @@ -724,6 +735,8 @@ #define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points //#define Z_AFTER_PROBING 5 // Z position after probing is done +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + // For M851 give a range for adjusting the Z probe offset #define Z_PROBE_OFFSET_RANGE_MIN -20 #define Z_PROBE_OFFSET_RANGE_MAX 20 @@ -824,6 +837,10 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + /** * Filament Runout Sensors * Mechanical or opto endstops are used to check for the presence of filament. @@ -1014,6 +1031,11 @@ // Add a menu item to move between bed corners for manual bed adjustment //#define LEVEL_BED_CORNERS +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + /** * Commands to execute at the end of G29 probing. * Useful to retract or move the Z probe out of the way. diff --git a/Marlin/example_configurations/BQ/WITBOX/Configuration_adv.h b/Marlin/example_configurations/BQ/WITBOX/Configuration_adv.h index c8d7787866..8884850962 100644 --- a/Marlin/example_configurations/BQ/WITBOX/Configuration_adv.h +++ b/Marlin/example_configurations/BQ/WITBOX/Configuration_adv.h @@ -230,6 +230,7 @@ #define E2_AUTO_FAN_PIN -1 #define E3_AUTO_FAN_PIN -1 #define E4_AUTO_FAN_PIN -1 +#define CHAMBER_AUTO_FAN_PIN -1 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50 #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed @@ -554,6 +555,16 @@ // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART + /** + * Continue after Power-Loss (Creality3D) + * + * Store the current state to the SD Card at the start of each layer + * during SD printing. If the recovery file is found at boot time, present + * an option on the LCD screen to continue the print from the last-known + * point in the file. + */ + //#define POWER_LOSS_RECOVERY + /** * Sort SD file listings in alphabetical order. * @@ -899,38 +910,44 @@ */ //#define ADVANCED_PAUSE_FEATURE #if ENABLED(ADVANCED_PAUSE_FEATURE) - #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_LENGTH 100 // (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_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast. - #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (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_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate. - #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (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. - - // Filament Unload does a Retract, Delay, and Purge first: - #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. - #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. - - //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. - //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) + #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_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. + // 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. + // 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_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. + // 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. + // 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. + + // Filament Unload does a Retract, Delay, and Purge first: + #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. + #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. + + //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) #endif // @section tmc diff --git a/Marlin/example_configurations/Cartesio/Configuration.h b/Marlin/example_configurations/Cartesio/Configuration.h index cf885bc5e2..6cced178b9 100644 --- a/Marlin/example_configurations/Cartesio/Configuration.h +++ b/Marlin/example_configurations/Cartesio/Configuration.h @@ -308,6 +308,7 @@ #define TEMP_SENSOR_3 0 #define TEMP_SENSOR_4 0 #define TEMP_SENSOR_BED 1 +#define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -390,23 +391,30 @@ //=========================================================================== //============================= PID > Bed Temperature Control =============== //=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ #define PIDTEMPBED //#define BED_LIMIT_SWITCHING -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #if ENABLED(PIDTEMPBED) @@ -644,7 +652,7 @@ /** * Z Servo Probe, such as an endstop switch on a rotating arm. */ -//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles /** @@ -663,6 +671,9 @@ * readings with inductive probes and piezo sensors. */ //#define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif //#define PROBING_FANS_OFF // Turn fans off when probing //#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors @@ -735,6 +746,8 @@ #define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points //#define Z_AFTER_PROBING 5 // Z position after probing is done +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + // For M851 give a range for adjusting the Z probe offset #define Z_PROBE_OFFSET_RANGE_MIN -20 #define Z_PROBE_OFFSET_RANGE_MAX 20 @@ -835,6 +848,10 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + /** * Filament Runout Sensors * Mechanical or opto endstops are used to check for the presence of filament. @@ -1025,6 +1042,11 @@ // Add a menu item to move between bed corners for manual bed adjustment //#define LEVEL_BED_CORNERS +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + /** * Commands to execute at the end of G29 probing. * Useful to retract or move the Z probe out of the way. diff --git a/Marlin/example_configurations/Cartesio/Configuration_adv.h b/Marlin/example_configurations/Cartesio/Configuration_adv.h index 7308718ecc..6919035765 100644 --- a/Marlin/example_configurations/Cartesio/Configuration_adv.h +++ b/Marlin/example_configurations/Cartesio/Configuration_adv.h @@ -230,6 +230,7 @@ #define E2_AUTO_FAN_PIN -1 #define E3_AUTO_FAN_PIN -1 #define E4_AUTO_FAN_PIN -1 +#define CHAMBER_AUTO_FAN_PIN -1 #define EXTRUDER_AUTO_FAN_TEMPERATURE 35 #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed @@ -554,6 +555,16 @@ // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART + /** + * Continue after Power-Loss (Creality3D) + * + * Store the current state to the SD Card at the start of each layer + * during SD printing. If the recovery file is found at boot time, present + * an option on the LCD screen to continue the print from the last-known + * point in the file. + */ + //#define POWER_LOSS_RECOVERY + /** * Sort SD file listings in alphabetical order. * @@ -899,38 +910,44 @@ */ //#define ADVANCED_PAUSE_FEATURE #if ENABLED(ADVANCED_PAUSE_FEATURE) - #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate. - #define PAUSE_PARK_RETRACT_LENGTH 1 // (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_LENGTH 100 // (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_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast. - #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (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_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate. - #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (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. - - // Filament Unload does a Retract, Delay, and Purge first: - #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. - #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. - - //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. - //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) + #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate. + #define PAUSE_PARK_RETRACT_LENGTH 1 // (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_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. + // 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. + // 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_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. + // 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. + // 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. + + // Filament Unload does a Retract, Delay, and Purge first: + #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. + #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. + + //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) #endif // @section tmc diff --git a/Marlin/example_configurations/Creality/CR-10/Configuration.h b/Marlin/example_configurations/Creality/CR-10/Configuration.h index 833fd6ade4..f92ac558d0 100755 --- a/Marlin/example_configurations/Creality/CR-10/Configuration.h +++ b/Marlin/example_configurations/Creality/CR-10/Configuration.h @@ -307,6 +307,7 @@ #define TEMP_SENSOR_3 0 #define TEMP_SENSOR_4 0 #define TEMP_SENSOR_BED 5 +#define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -394,23 +395,30 @@ //=========================================================================== //============================= PID > Bed Temperature Control =============== //=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ #define PIDTEMPBED //#define BED_LIMIT_SWITCHING -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #if ENABLED(PIDTEMPBED) @@ -655,7 +663,7 @@ /** * Z Servo Probe, such as an endstop switch on a rotating arm. */ -//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles /** @@ -674,6 +682,9 @@ * readings with inductive probes and piezo sensors. */ //#define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif //#define PROBING_FANS_OFF // Turn fans off when probing //#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors @@ -746,6 +757,8 @@ #define Z_CLEARANCE_BETWEEN_PROBES 10 // Z Clearance between probe points //#define Z_AFTER_PROBING 10 // Z position after probing is done +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + // For M851 give a range for adjusting the Z probe offset #define Z_PROBE_OFFSET_RANGE_MIN -20 #define Z_PROBE_OFFSET_RANGE_MAX 20 @@ -846,6 +859,10 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + /** * Filament Runout Sensors * Mechanical or opto endstops are used to check for the presence of filament. @@ -1036,6 +1053,11 @@ // Add a menu item to move between bed corners for manual bed adjustment #define LEVEL_BED_CORNERS +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + /** * Commands to execute at the end of G29 probing. * Useful to retract or move the Z probe out of the way. diff --git a/Marlin/example_configurations/Creality/CR-10/Configuration_adv.h b/Marlin/example_configurations/Creality/CR-10/Configuration_adv.h index aa6746e9ff..4b98513a68 100755 --- a/Marlin/example_configurations/Creality/CR-10/Configuration_adv.h +++ b/Marlin/example_configurations/Creality/CR-10/Configuration_adv.h @@ -230,6 +230,7 @@ #define E2_AUTO_FAN_PIN -1 #define E3_AUTO_FAN_PIN -1 #define E4_AUTO_FAN_PIN -1 +#define CHAMBER_AUTO_FAN_PIN -1 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50 #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed @@ -554,6 +555,16 @@ // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART + /** + * Continue after Power-Loss (Creality3D) + * + * Store the current state to the SD Card at the start of each layer + * during SD printing. If the recovery file is found at boot time, present + * an option on the LCD screen to continue the print from the last-known + * point in the file. + */ + //#define POWER_LOSS_RECOVERY + /** * Sort SD file listings in alphabetical order. * @@ -899,38 +910,44 @@ */ #define ADVANCED_PAUSE_FEATURE #if ENABLED(ADVANCED_PAUSE_FEATURE) - #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate. - #define PAUSE_PARK_RETRACT_LENGTH 4 // (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_LENGTH 420 // (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_LOAD_FEEDRATE 8 // (mm/s) Load filament feedrate. This can be pretty fast. - #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (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_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate. - #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (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. - - // Filament Unload does a Retract, Delay, and Purge first: - #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. - #define FILAMENT_UNLOAD_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 PAUSE_PARK_NOZZLE_TIMEOUT 120 // (seconds) Time limit before the nozzle is turned off for safety. - #define FILAMENT_CHANGE_ALERT_BEEPS 6 // 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 PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. - #define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) + #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate. + #define PAUSE_PARK_RETRACT_LENGTH 4 // (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_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate. + #define FILAMENT_CHANGE_UNLOAD_LENGTH 420 // (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. + // 0 to disable start loading and skip to fast load only + #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 8 // (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. + // 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. + // 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. + + // Filament Unload does a Retract, Delay, and Purge first: + #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. + #define FILAMENT_UNLOAD_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 PAUSE_PARK_NOZZLE_TIMEOUT 120 // (seconds) Time limit before the nozzle is turned off for safety. + #define FILAMENT_CHANGE_ALERT_BEEPS 6 // 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 PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. + #define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) #endif // @section tmc diff --git a/Marlin/example_configurations/Creality/CR-10S/Configuration.h b/Marlin/example_configurations/Creality/CR-10S/Configuration.h index 8536ad8418..937dad1896 100644 --- a/Marlin/example_configurations/Creality/CR-10S/Configuration.h +++ b/Marlin/example_configurations/Creality/CR-10S/Configuration.h @@ -307,6 +307,7 @@ #define TEMP_SENSOR_3 0 #define TEMP_SENSOR_4 0 #define TEMP_SENSOR_BED 5 +#define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -389,23 +390,30 @@ //=========================================================================== //============================= PID > Bed Temperature Control =============== //=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ //#define PIDTEMPBED //#define BED_LIMIT_SWITCHING -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #if ENABLED(PIDTEMPBED) @@ -645,7 +653,7 @@ /** * Z Servo Probe, such as an endstop switch on a rotating arm. */ -//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles /** @@ -664,6 +672,9 @@ * readings with inductive probes and piezo sensors. */ //#define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif //#define PROBING_FANS_OFF // Turn fans off when probing //#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors @@ -736,6 +747,8 @@ #define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points //#define Z_AFTER_PROBING 5 // Z position after probing is done +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + // For M851 give a range for adjusting the Z probe offset #define Z_PROBE_OFFSET_RANGE_MIN -20 #define Z_PROBE_OFFSET_RANGE_MAX 20 @@ -836,6 +849,10 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + /** * Filament Runout Sensors * Mechanical or opto endstops are used to check for the presence of filament. @@ -1027,6 +1044,11 @@ // Add a menu item to move between bed corners for manual bed adjustment #define LEVEL_BED_CORNERS +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + /** * Commands to execute at the end of G29 probing. * Useful to retract or move the Z probe out of the way. diff --git a/Marlin/example_configurations/Creality/CR-10S/Configuration_adv.h b/Marlin/example_configurations/Creality/CR-10S/Configuration_adv.h index 3b69372607..a24d470f60 100644 --- a/Marlin/example_configurations/Creality/CR-10S/Configuration_adv.h +++ b/Marlin/example_configurations/Creality/CR-10S/Configuration_adv.h @@ -230,6 +230,7 @@ #define E2_AUTO_FAN_PIN -1 #define E3_AUTO_FAN_PIN -1 #define E4_AUTO_FAN_PIN -1 +#define CHAMBER_AUTO_FAN_PIN -1 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50 #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed @@ -554,6 +555,16 @@ // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART + /** + * Continue after Power-Loss (Creality3D) + * + * Store the current state to the SD Card at the start of each layer + * during SD printing. If the recovery file is found at boot time, present + * an option on the LCD screen to continue the print from the last-known + * point in the file. + */ + //#define POWER_LOSS_RECOVERY + /** * Sort SD file listings in alphabetical order. * @@ -899,38 +910,43 @@ */ #define ADVANCED_PAUSE_FEATURE #if ENABLED(ADVANCED_PAUSE_FEATURE) - #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate. - #define PAUSE_PARK_RETRACT_LENGTH 4 // (mm) Initial retract. - // This short retract is done immediately, before parking the nozzle. - #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 41 // (mm/s) Unload filament feedrate. This can be pretty fast. - #define FILAMENT_CHANGE_UNLOAD_LENGTH 430 // (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_LOAD_FEEDRATE 41 // (mm/s) Load filament feedrate. This can be pretty fast. - #define FILAMENT_CHANGE_LOAD_LENGTH 430 // (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_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate. - #define ADVANCED_PAUSE_EXTRUDE_LENGTH 20 // (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. - - // Filament Unload does a Retract, Delay, and Purge first: - #define FILAMENT_UNLOAD_RETRACT_LENGTH 4 // (mm) Unload initial retract length. - #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract. - #define FILAMENT_UNLOAD_PURGE_LENGTH 0 // (mm) An unretract is done, then this length is purged. - - #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety. - #define FILAMENT_CHANGE_ALERT_BEEPS 6 // 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 PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. - #define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) + #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate. + #define PAUSE_PARK_RETRACT_LENGTH 4 // (mm) Initial retract. + // This short retract is done immediately, before parking the nozzle. + #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 41 // (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 430 // (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. + // 0 to disable start loading and skip to fast load only + #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 41 // (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 430 // (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 20 // (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. + + // Filament Unload does a Retract, Delay, and Purge first: + #define FILAMENT_UNLOAD_RETRACT_LENGTH 4 // (mm) Unload initial retract length. + #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract. + #define FILAMENT_UNLOAD_PURGE_LENGTH 0 // (mm) An unretract is done, then this length is purged. + #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety. + #define FILAMENT_CHANGE_ALERT_BEEPS 6 // 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 PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. + #define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) #endif // @section tmc diff --git a/Marlin/example_configurations/Creality/CR-10mini/Configuration.h b/Marlin/example_configurations/Creality/CR-10mini/Configuration.h index 10d4aa21a2..5478a8b87e 100644 --- a/Marlin/example_configurations/Creality/CR-10mini/Configuration.h +++ b/Marlin/example_configurations/Creality/CR-10mini/Configuration.h @@ -316,6 +316,7 @@ #define TEMP_SENSOR_3 0 #define TEMP_SENSOR_4 0 #define TEMP_SENSOR_BED 5 +#define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -403,23 +404,30 @@ //=========================================================================== //============================= PID > Bed Temperature Control =============== //=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ #define PIDTEMPBED //#define BED_LIMIT_SWITCHING -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #if ENABLED(PIDTEMPBED) @@ -664,7 +672,7 @@ /** * Z Servo Probe, such as an endstop switch on a rotating arm. */ -//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles /** @@ -683,6 +691,9 @@ * readings with inductive probes and piezo sensors. */ //#define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif //#define PROBING_FANS_OFF // Turn fans off when probing //#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors @@ -755,6 +766,8 @@ #define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points //#define Z_AFTER_PROBING 5 // Z position after probing is done +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + // For M851 give a range for adjusting the Z probe offset #define Z_PROBE_OFFSET_RANGE_MIN -20 #define Z_PROBE_OFFSET_RANGE_MAX 20 @@ -855,6 +868,10 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + /** * Filament Runout Sensors * Mechanical or opto endstops are used to check for the presence of filament. @@ -1045,6 +1062,11 @@ // Add a menu item to move between bed corners for manual bed adjustment //#define LEVEL_BED_CORNERS +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + /** * Commands to execute at the end of G29 probing. * Useful to retract or move the Z probe out of the way. diff --git a/Marlin/example_configurations/Creality/CR-10mini/Configuration_adv.h b/Marlin/example_configurations/Creality/CR-10mini/Configuration_adv.h index 70737d42ab..92caf17670 100644 --- a/Marlin/example_configurations/Creality/CR-10mini/Configuration_adv.h +++ b/Marlin/example_configurations/Creality/CR-10mini/Configuration_adv.h @@ -230,6 +230,7 @@ #define E2_AUTO_FAN_PIN -1 #define E3_AUTO_FAN_PIN -1 #define E4_AUTO_FAN_PIN -1 +#define CHAMBER_AUTO_FAN_PIN -1 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50 #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed @@ -554,6 +555,16 @@ // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART + /** + * Continue after Power-Loss (Creality3D) + * + * Store the current state to the SD Card at the start of each layer + * during SD printing. If the recovery file is found at boot time, present + * an option on the LCD screen to continue the print from the last-known + * point in the file. + */ + //#define POWER_LOSS_RECOVERY + /** * Sort SD file listings in alphabetical order. * @@ -899,38 +910,44 @@ */ //#define ADVANCED_PAUSE_FEATURE #if ENABLED(ADVANCED_PAUSE_FEATURE) - #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate. - #define PAUSE_PARK_RETRACT_LENGTH 4 // (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_LENGTH 420 // (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_LOAD_FEEDRATE 8 // (mm/s) Load filament feedrate. This can be pretty fast. - #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (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_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate. - #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (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. - - // Filament Unload does a Retract, Delay, and Purge first: - #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. - #define FILAMENT_UNLOAD_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 PAUSE_PARK_NOZZLE_TIMEOUT 120 // (seconds) Time limit before the nozzle is turned off for safety. - #define FILAMENT_CHANGE_ALERT_BEEPS 6 // 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 PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. - #define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) + #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate. + #define PAUSE_PARK_RETRACT_LENGTH 4 // (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_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate. + #define FILAMENT_CHANGE_UNLOAD_LENGTH 420 // (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. + // 0 to disable start loading and skip to fast load only + #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 8 // (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. + // 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. + // 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. + + // Filament Unload does a Retract, Delay, and Purge first: + #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. + #define FILAMENT_UNLOAD_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 PAUSE_PARK_NOZZLE_TIMEOUT 120 // (seconds) Time limit before the nozzle is turned off for safety. + #define FILAMENT_CHANGE_ALERT_BEEPS 6 // 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 PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. + #define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) #endif // @section tmc diff --git a/Marlin/example_configurations/Creality/CR-8/Configuration.h b/Marlin/example_configurations/Creality/CR-8/Configuration.h new file mode 100644 index 0000000000..7685e36fa3 --- /dev/null +++ b/Marlin/example_configurations/Creality/CR-8/Configuration.h @@ -0,0 +1,1836 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * Configuration.h + * + * Basic settings such as: + * + * - Type of electronics + * - Type of temperature sensor + * - Printer geometry + * - Endstop configuration + * - LCD controller + * - Extra features + * + * Advanced settings can be found in Configuration_adv.h + * + */ +#ifndef CONFIGURATION_H +#define CONFIGURATION_H +#define CONFIGURATION_H_VERSION 010107 + +//=========================================================================== +//============================= Getting Started ============================= +//=========================================================================== + +/** + * Here are some standard links for getting your machine calibrated: + * + * http://reprap.org/wiki/Calibration + * http://youtu.be/wAL9d7FgInk + * http://calculator.josefprusa.cz + * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide + * http://www.thingiverse.com/thing:5573 + * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap + * http://www.thingiverse.com/thing:298812 + */ + +//=========================================================================== +//============================= DELTA Printer =============================== +//=========================================================================== +// For a Delta printer start with one of the configuration files in the +// example_configurations/delta directory and customize for your machine. +// + +//=========================================================================== +//============================= SCARA Printer =============================== +//=========================================================================== +// For a SCARA printer start with the configuration files in +// example_configurations/SCARA and customize for your machine. +// + +// @section info + +// User-specified version info of this build to display in [Pronterface, etc] terminal window during +// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this +// build by the user have been successfully uploaded into firmware. +#define STRING_CONFIG_H_AUTHOR "(D-side, CR-8)" // Who made the changes. +#define SHOW_BOOTSCREEN +#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 +#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 + +/** + * *** VENDORS PLEASE READ *** + * + * Marlin allows you to add a custom boot image for Graphical LCDs. + * With this option Marlin will first show your custom screen followed + * by the standard Marlin logo with version number and web URL. + * + * We encourage you to take advantage of this new feature and we also + * respecfully request that you retain the unmodified Marlin boot screen. + */ + +// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +//#define SHOW_CUSTOM_BOOTSCREEN + +// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +//#define CUSTOM_STATUS_SCREEN_IMAGE + +// @section machine + +/** + * Select the serial port on the board to use for communication with the host. + * This allows the connection of wireless adapters (for instance) to non-default port pins. + * Serial port 0 is always used by the Arduino bootloader regardless of this setting. + * + * :[0, 1, 2, 3, 4, 5, 6, 7] + */ +#define SERIAL_PORT 0 + +/** + * This setting determines the communication speed of the printer. + * + * 250000 works in most cases, but you might try a lower speed if + * you commonly experience drop-outs during host printing. + * You may try up to 1000000 to speed up SD file transfer. + * + * :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000] + */ +#define BAUDRATE 115200 + +// Enable the Bluetooth serial interface on AT90USB devices +//#define BLUETOOTH + +// The following define selects which electronics board you have. +// Please choose the name from boards.h that matches your setup +#ifndef MOTHERBOARD + #define MOTHERBOARD BOARD_RAMPS_ENDER_4 +#endif + +// Optional custom name for your RepStrap or other custom machine +// Displayed in the LCD "Ready" message +#define CUSTOM_MACHINE_NAME "CR-8" + +// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines) +// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) +//#define MACHINE_UUID "00000000-0000-0000-0000-000000000000" + +// @section extruder + +// This defines the number of extruders +// :[1, 2, 3, 4, 5] +#define EXTRUDERS 1 + +// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc. +#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75 + +// For Cyclops or any "multi-extruder" that shares a single nozzle. +//#define SINGLENOZZLE + +/** + * Průša MK2 Single Nozzle Multi-Material Multiplexer, and variants. + * + * This device allows one stepper driver on a control board to drive + * two to eight stepper motors, one at a time, in a manner suitable + * for extruders. + * + * This option only allows the multiplexer to switch on tool-change. + * Additional options to configure custom E moves are pending. + */ +//#define MK2_MULTIPLEXER +#if ENABLED(MK2_MULTIPLEXER) + // Override the default DIO selector pins here, if needed. + // Some pins files may provide defaults for these pins. + //#define E_MUX0_PIN 40 // Always Required + //#define E_MUX1_PIN 42 // Needed for 3 to 8 steppers + //#define E_MUX2_PIN 44 // Needed for 5 to 8 steppers +#endif + +// A dual extruder that uses a single stepper motor +//#define SWITCHING_EXTRUDER +#if ENABLED(SWITCHING_EXTRUDER) + #define SWITCHING_EXTRUDER_SERVO_NR 0 + #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1[, E2, E3] + #if EXTRUDERS > 3 + #define SWITCHING_EXTRUDER_E23_SERVO_NR 1 + #endif +#endif + +// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles +//#define SWITCHING_NOZZLE +#if ENABLED(SWITCHING_NOZZLE) + #define SWITCHING_NOZZLE_SERVO_NR 0 + #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 + //#define HOTEND_OFFSET_Z { 0.0, 0.0 } +#endif + +/** + * Two separate X-carriages with extruders that connect to a moving part + * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN. + */ +//#define PARKING_EXTRUDER +#if ENABLED(PARKING_EXTRUDER) + #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage + #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil + #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined. + #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders + #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder + #define PARKING_EXTRUDER_SECURITY_RAISE 5 // Z-raise before parking + #define HOTEND_OFFSET_Z { 0.0, 1.3 } // Z-offsets of the two hotends. The first must be 0. +#endif + +/** + * "Mixing Extruder" + * - Adds a new code, M165, to set the current mix factors. + * - Extends the stepping routines to move multiple steppers in proportion to the mix. + * - Optional support for Repetier Firmware M163, M164, and virtual extruder. + * - This implementation supports only a single extruder. + * - Enable DIRECT_MIXING_IN_G1 for Pia Taubert's reference implementation + */ +//#define MIXING_EXTRUDER +#if ENABLED(MIXING_EXTRUDER) + #define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder + #define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164 + //#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands +#endif + +// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing). +// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder). +// For the other hotends it is their distance from the extruder 0 hotend. +//#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis +//#define HOTEND_OFFSET_Y {0.0, 5.00} // (in mm) for each extruder, offset of the hotend on the Y axis + +// @section machine + +/** + * Select your power supply here. Use 0 if you haven't connected the PS_ON_PIN + * + * 0 = No Power Switch + * 1 = ATX + * 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC) + * + * :{ 0:'No power switch', 1:'ATX', 2:'X-Box 360' } + */ +#define POWER_SUPPLY 0 + +#if POWER_SUPPLY > 0 + // Enable this option to leave the PSU off at startup. + // Power to steppers and heaters will need to be turned on with M80. + //#define PS_DEFAULT_OFF + + //#define AUTO_POWER_CONTROL // Enable automatic control of the PS_ON pin + #if ENABLED(AUTO_POWER_CONTROL) + #define AUTO_POWER_FANS // Turn on PSU if fans need power + #define AUTO_POWER_E_FANS + #define AUTO_POWER_CONTROLLERFAN + #define POWER_TIMEOUT 30 + #endif + +#endif + +// @section temperature + +//=========================================================================== +//============================= Thermal Settings ============================ +//=========================================================================== + +/** + * --NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table + * + * Temperature sensors available: + * + * -3 : thermocouple with MAX31855 (only for sensor 0) + * -2 : thermocouple with MAX6675 (only for sensor 0) + * -1 : thermocouple with AD595 + * 0 : not used + * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) + * 3 : Mendel-parts thermistor (4.7k pullup) + * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! + * 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup) + * 6 : 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup) + * 7 : 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup) + * 71 : 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup) + * 8 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) + * 9 : 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup) + * 10 : 100k RS thermistor 198-961 (4.7k pullup) + * 11 : 100k beta 3950 1% thermistor (4.7k pullup) + * 12 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed) + * 13 : 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE" + * 15 : 100k thermistor calibration for JGAurora A5 hotend + * 20 : the PT100 circuit found in the Ultimainboard V2.x + * 60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950 + * 66 : 4.7M High Temperature thermistor from Dyze Design + * 70 : the 100K thermistor found in the bq Hephestos 2 + * 75 : 100k Generic Silicon Heat Pad with NTC 100K MGB18-104F39050L32 thermistor + * + * 1k ohm pullup tables - This is atypical, and requires changing out the 4.7k pullup for 1k. + * (but gives greater accuracy and more stable PID) + * 51 : 100k thermistor - EPCOS (1k pullup) + * 52 : 200k thermistor - ATC Semitec 204GT-2 (1k pullup) + * 55 : 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup) + * + * 1047 : Pt1000 with 4k7 pullup + * 1010 : Pt1000 with 1k pullup (non standard) + * 147 : Pt100 with 4k7 pullup + * 110 : Pt100 with 1k pullup (non standard) + * + * Use these for Testing or Development purposes. NEVER for production machine. + * 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. + * + * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + */ +#define TEMP_SENSOR_0 1 +#define TEMP_SENSOR_1 0 +#define TEMP_SENSOR_2 0 +#define TEMP_SENSOR_3 0 +#define TEMP_SENSOR_4 0 +#define TEMP_SENSOR_BED 1 + +// Dummy thermistor constant temperature readings, for use with 998 and 999 +#define DUMMY_THERMISTOR_998_VALUE 25 +#define DUMMY_THERMISTOR_999_VALUE 100 + +// Use temp sensor 1 as a redundant sensor with sensor 0. If the readings +// from the two sensors differ too much the print will be aborted. +//#define TEMP_SENSOR_1_AS_REDUNDANT +#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10 + +// Extruder temperature must be close to target for this long before M109 returns success +#define TEMP_RESIDENCY_TIME 10 // (seconds) +#define TEMP_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one +#define TEMP_WINDOW 1 // (degC) Window around target to start the residency timer x degC early. + +// Bed temperature must be close to target for this long before M190 returns success +#define TEMP_BED_RESIDENCY_TIME 10 // (seconds) +#define TEMP_BED_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one +#define TEMP_BED_WINDOW 1 // (degC) Window around target to start the residency timer x degC early. + +// The minimal temperature defines the temperature below which the heater will not be enabled It is used +// to check that the wiring to the thermistor is not broken. +// Otherwise this would lead to the heater being powered on all the time. +#define HEATER_0_MINTEMP 5 +#define HEATER_1_MINTEMP 5 +#define HEATER_2_MINTEMP 5 +#define HEATER_3_MINTEMP 5 +#define HEATER_4_MINTEMP 5 +#define BED_MINTEMP 5 + +// When temperature exceeds max temp, your heater will be switched off. +// This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure! +// You should use MINTEMP for thermistor short/failure protection. +#define HEATER_0_MAXTEMP 275 +#define HEATER_1_MAXTEMP 275 +#define HEATER_2_MAXTEMP 275 +#define HEATER_3_MAXTEMP 275 +#define HEATER_4_MAXTEMP 275 +#define BED_MAXTEMP 150 + +//=========================================================================== +//============================= PID Settings ================================ +//=========================================================================== +// PID Tuning Guide here: http://reprap.org/wiki/PID_Tuning + +// Comment the following line to disable PID and enable bang-bang. +#define PIDTEMP +#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current +#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current +#define PID_K1 0.95 // Smoothing factor within any PID loop +#if ENABLED(PIDTEMP) + //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result. + //#define PID_DEBUG // Sends debug data to the serial port. + //#define PID_OPENLOOP 1 // 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_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders) + // Set/get with gcode: M301 E[extruder number, 0-2] + #define PID_FUNCTIONAL_RANGE 10 // 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. + + // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it + + // Ender-4 + #define DEFAULT_Kp 21.73 + #define DEFAULT_Ki 1.54 + #define DEFAULT_Kd 76.55 + + // Ultimaker + //#define DEFAULT_Kp 22.2 + //#define DEFAULT_Ki 1.08 + //#define DEFAULT_Kd 114 + + // MakerGear + //#define DEFAULT_Kp 7.0 + //#define DEFAULT_Ki 0.1 + //#define DEFAULT_Kd 12 + + // Mendel Parts V9 on 12V + //#define DEFAULT_Kp 63.0 + //#define DEFAULT_Ki 2.25 + //#define DEFAULT_Kd 440 + +#endif // PIDTEMP + +//=========================================================================== +//============================= PID > Bed Temperature Control =============== +//=========================================================================== + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ +//#define PIDTEMPBED + +//#define BED_LIMIT_SWITCHING + +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ +#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current + +#if ENABLED(PIDTEMPBED) + + //#define PID_BED_DEBUG // Sends debug data to the serial port. + + // Ender-4 + #define DEFAULT_bedKp 426.68 + #define DEFAULT_bedKi 78.92 + #define DEFAULT_bedKd 576.71 + + //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 + + //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) + //from pidautotune + //#define DEFAULT_bedKp 97.1 + //#define DEFAULT_bedKi 1.41 + //#define DEFAULT_bedKd 1675.16 + + // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. +#endif // PIDTEMPBED + +// @section extruder + +// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP. +// It also enables the M302 command to set the minimum extrusion temperature +// or to allow moving the extruder regardless of the hotend temperature. +// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! *** +#define PREVENT_COLD_EXTRUSION +#define EXTRUDE_MINTEMP 190 + +// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH. +// Note that for Bowden Extruders a too-small value here may prevent loading. +#define PREVENT_LENGTHY_EXTRUDE +#define EXTRUDE_MAXLENGTH 500 + +//=========================================================================== +//======================== Thermal Runaway Protection ======================= +//=========================================================================== + +/** + * Thermal Protection provides additional protection to your printer from damage + * and fire. Marlin always includes safe min and max temperature ranges which + * protect against a broken or disconnected thermistor wire. + * + * The issue: If a thermistor falls out, it will report the much lower + * temperature of the air in the room, and the the firmware will keep + * the heater on. + * + * If you get "Thermal Runaway" or "Heating failed" errors the + * details can be tuned in Configuration_adv.h + */ + +#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders +#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed + +//=========================================================================== +//============================= Mechanical Settings ========================= +//=========================================================================== + +// @section machine + +// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics +// either in the usual order or reversed +//#define COREXY +//#define COREXZ +//#define COREYZ +//#define COREYX +//#define COREZX +//#define COREZY + +//=========================================================================== +//============================== Endstop Settings =========================== +//=========================================================================== + +// @section homing + +// Specify here all the endstop connectors that are connected to any endstop or probe. +// Almost all printers will be using one per axis. Probes will use one or more of the +// extra connectors. Leave undefined any used for non-endstop and non-probe purposes. +#define USE_XMIN_PLUG +#define USE_YMIN_PLUG +#define USE_ZMIN_PLUG +//#define USE_XMAX_PLUG +//#define USE_YMAX_PLUG +//#define USE_ZMAX_PLUG + +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS +#if DISABLED(ENDSTOPPULLUPS) + // Disable ENDSTOPPULLUPS to set pullups individually + //#define ENDSTOPPULLUP_XMAX + //#define ENDSTOPPULLUP_YMAX + //#define ENDSTOPPULLUP_ZMAX + //#define ENDSTOPPULLUP_XMIN + //#define ENDSTOPPULLUP_YMIN + //#define ENDSTOPPULLUP_ZMIN + //#define ENDSTOPPULLUP_ZMIN_PROBE +#endif + +// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). +#define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. +#define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. +#define Z_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. +#define X_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. +#define Y_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. +#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. +#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. + +// Enable this feature if all enabled endstop pins are interrupt-capable. +// This will remove the need to poll the interrupt pins, saving many CPU cycles. +//#define ENDSTOP_INTERRUPTS_FEATURE + +//============================================================================= +//============================== Movement Settings ============================ +//============================================================================= +// @section motion + +/** + * Default Settings + * + * These settings can be reset by M502 + * + * Note that if EEPROM is enabled, saved values will override these. + */ + +/** + * With this option each E stepper can have its own factors for the + * following movement settings. If fewer factors are given than the + * total number of extruders, the last value applies to the rest. + */ +//#define DISTINCT_E_FACTORS + +/** + * Default Axis Steps Per Unit (steps/mm) + * Override with M92 + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] + */ +#define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 400, 92.60 } + +/** + * Default Max Feed Rate (mm/s) + * Override with M203 + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] + */ +#define DEFAULT_MAX_FEEDRATE { 500, 500, 5, 25 } + +/** + * Default Max Acceleration (change/s) change = mm/s + * (Maximum start speed for accelerated moves) + * Override with M201 + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] + */ +#define DEFAULT_MAX_ACCELERATION { 500, 500, 100, 5000 } + +/** + * Default Acceleration (change/s) change = mm/s + * Override with M204 + * + * M204 P Acceleration + * M204 R Retract Acceleration + * M204 T Travel Acceleration + */ +#define DEFAULT_ACCELERATION 500 // X, Y, Z and E acceleration for printing moves +#define DEFAULT_RETRACT_ACCELERATION 500 // E acceleration for retracts +#define DEFAULT_TRAVEL_ACCELERATION 500 // X, Y, Z acceleration for travel (non printing) moves + +/** + * Default Jerk (mm/s) + * Override with M205 X Y Z E + * + * "Jerk" specifies the minimum speed change that requires acceleration. + * When changing speed and direction, if the difference is less than the + * value set here, it may happen instantaneously. + */ +#define DEFAULT_XJERK 20.0 +#define DEFAULT_YJERK 20.0 +#define DEFAULT_ZJERK 0.4 +#define DEFAULT_EJERK 5.0 + +//=========================================================================== +//============================= Z Probe Options ============================= +//=========================================================================== +// @section probes + +// +// See http://marlinfw.org/docs/configuration/probes.html +// + +/** + * Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN + * + * Enable this option for a probe connected to the Z Min endstop pin. + */ +#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN + +/** + * Z_MIN_PROBE_ENDSTOP + * + * Enable this option for a probe connected to any pin except Z-Min. + * (By default Marlin assumes the Z-Max endstop pin.) + * To use a custom Z Probe pin, set Z_MIN_PROBE_PIN below. + * + * - The simplest option is to use a free endstop connector. + * - Use 5V for powered (usually inductive) sensors. + * + * - RAMPS 1.3/1.4 boards may use the 5V, GND, and Aux4->D32 pin: + * - For simple switches connect... + * - normally-closed switches to GND and D32. + * - normally-open switches to 5V and D32. + * + * WARNING: Setting the wrong pin may have unexpected and potentially + * disastrous consequences. Use with caution and do your homework. + * + */ +//#define Z_MIN_PROBE_ENDSTOP + +/** + * Probe Type + * + * Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, etc. + * Activate one of these to use Auto Bed Leveling below. + */ + +/** + * The "Manual Probe" provides a means to do "Auto" Bed Leveling without a probe. + * Use G29 repeatedly, adjusting the Z height at each point with movement commands + * or (with LCD_BED_LEVELING) the LCD controller. + */ +#define PROBE_MANUALLY + +/** + * A Fix-Mounted Probe either doesn't deploy or needs manual deployment. + * (e.g., an inductive probe or a nozzle-based probe-switch.) + */ +//#define FIX_MOUNTED_PROBE + +/** + * Z Servo Probe, such as an endstop switch on a rotating arm. + */ +//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles + +/** + * The BLTouch probe uses a Hall effect sensor and emulates a servo. + */ +//#define BLTOUCH +#if ENABLED(BLTOUCH) + //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed +#endif + +/** + * Enable one or more of the following if probing seems unreliable. + * Heaters and/or fans can be disabled during probing to minimize electrical + * noise. A delay can also be added to allow noise and vibration to settle. + * These options are most useful for the BLTouch probe, but may also improve + * readings with inductive probes and piezo sensors. + */ +//#define PROBING_HEATERS_OFF // Turn heaters off when probing +//#define PROBING_FANS_OFF // Turn fans off when probing +//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors + +// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) +//#define SOLENOID_PROBE + +// A sled-mounted probe like those designed by Charles Bell. +//#define Z_PROBE_SLED +//#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like. + +// +// For Z_PROBE_ALLEN_KEY see the Delta example configurations. +// + +/** + * Z Probe to nozzle (X,Y) offset, relative to (0, 0). + * X and Y offsets must be integers. + * + * In the following example the X and Y offsets are both positive: + * #define X_PROBE_OFFSET_FROM_EXTRUDER 10 + * #define Y_PROBE_OFFSET_FROM_EXTRUDER 10 + * + * +-- BACK ---+ + * | | + * L | (+) P | R <-- probe (20,20) + * E | | I + * F | (-) N (+) | G <-- nozzle (10,10) + * T | | H + * | (-) | T + * | | + * O-- FRONT --+ + * (0,0) + */ +#define X_PROBE_OFFSET_FROM_EXTRUDER 10 // X offset: -left +right [of the nozzle] +#define Y_PROBE_OFFSET_FROM_EXTRUDER 10 // Y offset: -front +behind [the nozzle] +#define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle] + +// Certain types of probes need to stay away from edges +#define MIN_PROBE_EDGE 10 + +// X and Y axis travel speed (mm/m) between probes +#define XY_PROBE_SPEED 8000 + +// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2) +#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z + +// Speed for the "accurate" probe of each point +#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2) + +// The number of probes to perform at each point. +// Set to 2 for a fast/slow probe, using the second probe result. +// Set to 3 or more for slow probes, averaging the results. +//#define MULTIPLE_PROBING 2 + +/** + * Z probes require clearance when deploying, stowing, and moving between + * probe points to avoid hitting the bed and other hardware. + * Servo-mounted probes require extra space for the arm to rotate. + * Inductive probes need space to keep from triggering early. + * + * Use these settings to specify the distance (mm) to raise the probe (or + * lower the bed). The values set here apply over and above any (negative) + * probe Z Offset set with Z_PROBE_OFFSET_FROM_EXTRUDER, M851, or the LCD. + * Only integer values >= 1 are valid here. + * + * 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 // Z Clearance for Deploy/Stow +#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points +//#define Z_AFTER_PROBING 5 // Z position after probing is done + +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + +// For M851 give a range for adjusting the Z probe offset +#define Z_PROBE_OFFSET_RANGE_MIN -20 +#define Z_PROBE_OFFSET_RANGE_MAX 20 + +// Enable the M48 repeatability test to test probe accuracy +//#define Z_MIN_PROBE_REPEATABILITY_TEST + +// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1 +// :{ 0:'Low', 1:'High' } +#define X_ENABLE_ON 0 +#define Y_ENABLE_ON 0 +#define Z_ENABLE_ON 0 +#define E_ENABLE_ON 0 // For all extruders + +// Disables axis stepper immediately when it's not being used. +// WARNING: When motors turn off there is a chance of losing position accuracy! +#define DISABLE_X false +#define DISABLE_Y false +#define DISABLE_Z false +// Warn on display about possibly reduced accuracy +//#define DISABLE_REDUCED_ACCURACY_WARNING + +// @section extruder + +#define DISABLE_E false // For all extruders +#define DISABLE_INACTIVE_EXTRUDER true // Keep only the active extruder enabled. + +// @section machine + +// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way. +#define INVERT_X_DIR true +#define INVERT_Y_DIR true +#define INVERT_Z_DIR false + +// Enable this option for Toshiba stepper drivers +//#define CONFIG_STEPPERS_TOSHIBA + +// @section extruder + +// For direct drive extruder v9 set to true, for geared extruder set to false. +#define INVERT_E0_DIR true +#define INVERT_E1_DIR false +#define INVERT_E2_DIR false +#define INVERT_E3_DIR false +#define INVERT_E4_DIR false + +// @section homing + +//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed + +//#define UNKNOWN_Z_NO_RAISE // Don't raise Z (lower the bed) if Z is "unknown." For beds that fall when Z is powered off. + +//#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ... + // Be sure you have this distance over your Z_MAX_POS in case. + +// Direction of endstops when homing; 1=MAX, -1=MIN +// :[-1,1] +#define X_HOME_DIR -1 +#define Y_HOME_DIR -1 +#define Z_HOME_DIR -1 + +// @section machine + +// The size of the print bed +#define X_BED_SIZE 220 +#define Y_BED_SIZE 220 + +// Travel limits (mm) after homing, corresponding to endstop positions. +#define X_MIN_POS 0 +#define Y_MIN_POS 0 +#define Z_MIN_POS 0 +#define X_MAX_POS X_BED_SIZE +#define Y_MAX_POS Y_BED_SIZE +#define Z_MAX_POS 310 + +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds +#define MIN_SOFTWARE_ENDSTOPS +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds +#define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif + +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + +/** + * Filament Runout Sensors + * Mechanical or opto endstops are used to check for the presence of filament. + * + * 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. + * By default the firmware assumes HIGH=FILAMENT PRESENT. + */ +//#define FILAMENT_RUNOUT_SENSOR +#if ENABLED(FILAMENT_RUNOUT_SENSOR) + #define NUM_RUNOUT_SENSORS 1 // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each. + #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + #define FILAMENT_RUNOUT_SCRIPT "M600" +#endif + +//=========================================================================== +//=============================== Bed Leveling ============================== +//=========================================================================== +// @section calibrate + +/** + * Choose one of the options below to enable G29 Bed Leveling. The parameters + * and behavior of G29 will change depending on your selection. + * + * If using a Probe for Z Homing, enable Z_SAFE_HOMING also! + * + * - AUTO_BED_LEVELING_3POINT + * Probe 3 arbitrary points on the bed (that aren't collinear) + * You specify the XY coordinates of all 3 points. + * The result is a single tilted plane. Best for a flat bed. + * + * - AUTO_BED_LEVELING_LINEAR + * Probe several points in a grid. + * You specify the rectangle and the density of sample points. + * The result is a single tilted plane. Best for a flat bed. + * + * - AUTO_BED_LEVELING_BILINEAR + * Probe several points in a grid. + * You specify the rectangle and the density of sample points. + * The result is a mesh, best for large or uneven beds. + * + * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling) + * A comprehensive bed leveling system combining the features and benefits + * of other systems. UBL also includes integrated Mesh Generation, Mesh + * Validation and Mesh Editing systems. + * + * - MESH_BED_LEVELING + * Probe a grid manually + * The result is a mesh, suitable for large or uneven beds. (See BILINEAR.) + * For machines without a probe, Mesh Bed Leveling provides a method to perform + * leveling in steps so you can manually adjust the Z height at each grid-point. + * With an LCD controller the process is guided step-by-step. + */ +//#define AUTO_BED_LEVELING_3POINT +//#define AUTO_BED_LEVELING_LINEAR +#define AUTO_BED_LEVELING_BILINEAR +//#define AUTO_BED_LEVELING_UBL +//#define MESH_BED_LEVELING + +/** + * Normally G28 leaves leveling disabled on completion. Enable + * this option to have G28 restore the prior leveling state. + */ +//#define RESTORE_LEVELING_AFTER_G28 + +/** + * Enable detailed logging of G28, G29, M48, etc. + * Turn on with the command 'M111 S32'. + * NOTE: Requires a lot of PROGMEM! + */ +//#define DEBUG_LEVELING_FEATURE + +#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) + // Gradually reduce leveling correction until a set height is reached, + // at which point movement will be level to the machine's XY plane. + // The height can be set with M420 Z + #define ENABLE_LEVELING_FADE_HEIGHT + + // For Cartesian machines, instead of dividing moves on mesh boundaries, + // split up moves into short segments like a Delta. This follows the + // contours of the bed more closely than edge-to-edge straight moves. + #define SEGMENT_LEVELED_MOVES + #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one) + + /** + * Enable the G26 Mesh Validation Pattern tool. + */ + #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 the G26 Mesh Validation Tool. + #define MESH_TEST_HOTEND_TEMP 205.0 // (°C) Default nozzle temperature for the G26 Mesh Validation Tool. + #define MESH_TEST_BED_TEMP 60.0 // (°C) Default bed temperature for the G26 Mesh Validation Tool. + #endif + +#endif + +#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) + + // Set the number of grid points per dimension. + #define GRID_MAX_POINTS_X 3 + #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X + + // Set the boundaries for probing (where the probe can reach). + //#define LEFT_PROBE_BED_POSITION MIN_PROBE_EDGE + //#define RIGHT_PROBE_BED_POSITION (X_BED_SIZE - MIN_PROBE_EDGE) + //#define FRONT_PROBE_BED_POSITION MIN_PROBE_EDGE + //#define BACK_PROBE_BED_POSITION (Y_BED_SIZE - MIN_PROBE_EDGE) + + // Probe along the Y axis, advancing X after each column + //#define PROBE_Y_FIRST + + #if ENABLED(AUTO_BED_LEVELING_BILINEAR) + + // Beyond the probed grid, continue the implied tilt? + // Default is to maintain the height of the nearest edge. + //#define EXTRAPOLATE_BEYOND_GRID + + // + // Experimental Subdivision of the grid by Catmull-Rom method. + // Synthesizes intermediate points to produce a more detailed mesh. + // + //#define ABL_BILINEAR_SUBDIVISION + #if ENABLED(ABL_BILINEAR_SUBDIVISION) + // Number of subdivisions between probe points + #define BILINEAR_SUBDIVISIONS 3 + #endif + + #endif + +#elif ENABLED(AUTO_BED_LEVELING_UBL) + + //=========================================================================== + //========================= Unified Bed Leveling ============================ + //=========================================================================== + + //#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 GRID_MAX_POINTS_Y GRID_MAX_POINTS_X + + #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. + +#elif ENABLED(MESH_BED_LEVELING) + + //=========================================================================== + //=================================== Mesh ================================== + //=========================================================================== + + #define MESH_INSET 10 // Set Mesh bounds as an inset region of the bed + #define GRID_MAX_POINTS_X 3 // Don't use more than 7 points per axis, implementation limited. + #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X + + //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS + +#endif // BED_LEVELING + +/** + * Points to probe for all 3-point Leveling procedures. + * Override if the automatically selected points are inadequate. + */ +#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) + //#define PROBE_PT_1_X 15 + //#define PROBE_PT_1_Y 180 + //#define PROBE_PT_2_X 15 + //#define PROBE_PT_2_Y 20 + //#define PROBE_PT_3_X 170 + //#define PROBE_PT_3_Y 20 +#endif + +/** + * Use the LCD controller for bed leveling + * Requires MESH_BED_LEVELING or PROBE_MANUALLY + */ +#define LCD_BED_LEVELING + +#if ENABLED(LCD_BED_LEVELING) + #define MBL_Z_STEP 0.025 // Step size while manually probing Z axis. + #define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment +#endif + +// Add a menu item to move between bed corners for manual bed adjustment +//#define LEVEL_BED_CORNERS + +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + +/** + * Commands to execute at the end of G29 probing. + * Useful to retract or move the Z probe out of the way. + */ +//#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" + + +// @section homing + +// The center of the bed is at (X=0, Y=0) +//#define BED_CENTER_AT_0_0 + +// 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_Z_HOME_POS 0 + +// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area. +// +// With this feature enabled: +// +// - Allow Z homing only after X and Y homing AND stepper drivers still enabled. +// - If stepper drivers time out, it will need X and Y homing again before Z homing. +// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28). +// - Prevent Z homing when the Z probe is outside bed area. +// +//#define Z_SAFE_HOMING + +#if ENABLED(Z_SAFE_HOMING) + #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axes (G28). + #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axes (G28). +#endif + +// Homing speeds (mm/m) +#define HOMING_FEEDRATE_XY (50*60) +#define HOMING_FEEDRATE_Z (4*60) + +// @section calibrate + +/** + * Bed Skew Compensation + * + * This feature corrects for misalignment in the XYZ axes. + * + * Take the following steps to get the bed skew in the XY plane: + * 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185) + * 2. For XY_DIAG_AC measure the diagonal A to C + * 3. For XY_DIAG_BD measure the diagonal B to D + * 4. For XY_SIDE_AD measure the edge A to D + * + * Marlin automatically computes skew factors from these measurements. + * Skew factors may also be computed and set manually: + * + * - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2 + * - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD))) + * + * If desired, follow the same procedure for XZ and YZ. + * Use these diagrams for reference: + * + * Y Z Z + * ^ B-------C ^ B-------C ^ B-------C + * | / / | / / | / / + * | / / | / / | / / + * | A-------D | A-------D | A-------D + * +-------------->X +-------------->X +-------------->Y + * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR + */ +//#define SKEW_CORRECTION + +#if ENABLED(SKEW_CORRECTION) + // Input all length measurements here: + #define XY_DIAG_AC 282.8427124746 + #define XY_DIAG_BD 282.8427124746 + #define XY_SIDE_AD 200 + + // Or, set the default skew factors directly here + // to override the above measurements: + #define XY_SKEW_FACTOR 0.0 + + //#define SKEW_CORRECTION_FOR_Z + #if ENABLED(SKEW_CORRECTION_FOR_Z) + #define XZ_DIAG_AC 282.8427124746 + #define XZ_DIAG_BD 282.8427124746 + #define YZ_DIAG_AC 282.8427124746 + #define YZ_DIAG_BD 282.8427124746 + #define YZ_SIDE_AD 200 + #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 +#endif + +//============================================================================= +//============================= Additional Features =========================== +//============================================================================= + +// @section extras + +// +// EEPROM +// +// The microcontroller can store settings in the EEPROM, e.g. max velocity... +// M500 - stores parameters in EEPROM +// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). +// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. +// +#define EEPROM_SETTINGS // Enable for M500 and M501 commands +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. + +// +// Host Keepalive +// +// When enabled Marlin will send a busy status message to the host +// every couple of seconds when it can't accept commands. +// +#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages +#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113. +#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating + +// +// M100 Free Memory Watcher +// +//#define M100_FREE_MEMORY_WATCHER // Add M100 (Free Memory Watcher) to debug memory usage + +// +// G20/G21 Inch mode support +// +//#define INCH_MODE_SUPPORT + +// +// M149 Set temperature units support +// +//#define TEMPERATURE_UNITS_SUPPORT + +// @section temperature + +// Preheat Constants +#define PREHEAT_1_TEMP_HOTEND 200 +#define PREHEAT_1_TEMP_BED 60 +#define PREHEAT_1_FAN_SPEED 0 // Value from 0 to 255 + +#define PREHEAT_2_TEMP_HOTEND 240 +#define PREHEAT_2_TEMP_BED 110 +#define PREHEAT_2_FAN_SPEED 0 // Value from 0 to 255 + +/** + * Nozzle Park + * + * Park the nozzle at the given XYZ position on idle or G27. + * + * The "P" parameter controls the action applied to the Z axis: + * + * P0 (Default) If Z is below park Z raise the nozzle. + * 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 + +#if ENABLED(NOZZLE_PARK_FEATURE) + // Specify a park position as { X, Y, Z } + #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } + #define NOZZLE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis) + #define NOZZLE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers) +#endif + +/** + * Clean Nozzle Feature -- EXPERIMENTAL + * + * Adds the G12 command to perform a nozzle cleaning process. + * + * Parameters: + * P Pattern + * S Strokes / Repetitions + * T Triangles (P1 only) + * + * Patterns: + * P0 Straight line (default). This process requires a sponge type material + * at a fixed bed location. "S" specifies strokes (i.e. back-forth motions) + * between the start / end points. + * + * P1 Zig-zag pattern between (X0, Y0) and (X1, Y1), "T" specifies the + * number of zig-zag triangles to do. "S" defines the number of strokes. + * Zig-zags are done in whichever is the narrower dimension. + * For example, "G12 P1 S1 T3" will execute: + * + * -- + * | (X0, Y1) | /\ /\ /\ | (X1, Y1) + * | | / \ / \ / \ | + * A | | / \ / \ / \ | + * | | / \ / \ / \ | + * | (X0, Y0) | / \/ \/ \ | (X1, Y0) + * -- +--------------------------------+ + * |________|_________|_________| + * T1 T2 T3 + * + * P2 Circular pattern with middle at NOZZLE_CLEAN_CIRCLE_MIDDLE. + * "R" specifies the radius. "S" specifies the stroke count. + * Before starting, the nozzle moves to NOZZLE_CLEAN_START_POINT. + * + * Caveats: The ending Z should be the same as starting Z. + * Attention: EXPERIMENTAL. G-code arguments may change. + * + */ +#define NOZZLE_CLEAN_FEATURE + +#if ENABLED(NOZZLE_CLEAN_FEATURE) + // Default number of pattern repetitions + #define NOZZLE_CLEAN_STROKES 12 + + // Default number of triangles + #define NOZZLE_CLEAN_TRIANGLES 3 + + // Specify positions as { X, Y, Z } + #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} + #define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)} + + // Circular pattern radius + #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5 + // Circular pattern circle fragments number + #define NOZZLE_CLEAN_CIRCLE_FN 10 + // Middle point of circle + #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT + + // Moves the nozzle to the initial position + #define NOZZLE_CLEAN_GOBACK +#endif + +/** + * Print Job Timer + * + * Automatically start and stop the print job timer on M104/M109/M190. + * + * M104 (hotend, no wait) - high temp = none, low temp = stop timer + * M109 (hotend, wait) - high temp = start timer, low temp = stop timer + * M190 (bed, wait) - high temp = start timer, low temp = none + * + * The timer can also be controlled with the following commands: + * + * M75 - Start the print job timer + * M76 - Pause the print job timer + * M77 - Stop the print job timer + */ +#define PRINTJOB_TIMER_AUTOSTART + +/** + * Print Counter + * + * Track statistical data such as: + * + * - Total print jobs + * - Total successful print jobs + * - Total failed print jobs + * - Total time printing + * + * View the current statistics with M78. + */ +#define PRINTCOUNTER + +//============================================================================= +//============================= LCD and SD support ============================ +//============================================================================= + +// @section lcd + +/** + * LCD LANGUAGE + * + * Select the language to display on the LCD. These languages are available: + * + * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8, + * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8, + * tr, uk, zh_CN, zh_TW, test + * + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' } + */ +#define LCD_LANGUAGE en + +/** + * LCD Character Set + * + * Note: This option is NOT applicable to Graphical Displays. + * + * All character-based LCDs provide ASCII plus one of these + * language extensions: + * + * - JAPANESE ... the most common + * - WESTERN ... with more accented characters + * - CYRILLIC ... for the Russian language + * + * To determine the language extension installed on your controller: + * + * - Compile and upload with LCD_LANGUAGE set to 'test' + * - Click the controller to view the LCD menu + * - The LCD will display Japanese, Western, or Cyrillic text + * + * See http://marlinfw.org/docs/development/lcd_language.html + * + * :['JAPANESE', 'WESTERN', 'CYRILLIC'] + */ +#define DISPLAY_CHARSET_HD44780 JAPANESE + +/** + * LCD TYPE + * + * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD. + * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display. + * (These options will be enabled automatically for most displays.) + * + * IMPORTANT: The U8glib library is required for Full Graphic Display! + * https://github.com/olikraus/U8glib_Arduino + */ +//#define ULTRA_LCD // Character based +//#define DOGLCD // Full graphics display + +/** + * SD CARD + * + * 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 + +/** + * SD CARD: SPI SPEED + * + * Enable one of the following items for a slower SPI transfer speed. + * This may be required to resolve "volume init" errors. + */ +//#define SPI_SPEED SPI_HALF_SPEED +//#define SPI_SPEED SPI_QUARTER_SPEED +//#define SPI_SPEED SPI_EIGHTH_SPEED + +/** + * SD CARD: ENABLE CRC + * + * Use CRC checks and retries on the SD communication. + */ +//#define SD_CHECK_AND_RETRY + +// +// ENCODER SETTINGS +// +// This option overrides the default number of encoder pulses needed to +// produce one step. Should be increased for high-resolution encoders. +// +//#define ENCODER_PULSES_PER_STEP 4 + +// +// Use this option to override the number of step signals required to +// move between next/prev menu items. +// +//#define ENCODER_STEPS_PER_MENU_ITEM 1 + +/** + * Encoder Direction Options + * + * Test your encoder's behavior first with both options disabled. + * + * Reversed Value Edit and Menu Nav? Enable REVERSE_ENCODER_DIRECTION. + * Reversed Menu Navigation only? Enable REVERSE_MENU_DIRECTION. + * Reversed Value Editing only? Enable BOTH options. + */ + +// +// This option reverses the encoder direction everywhere. +// +// Set this option if CLOCKWISE causes values to DECREASE +// +//#define REVERSE_ENCODER_DIRECTION + +// +// This option reverses the encoder direction for navigating LCD menus. +// +// If CLOCKWISE normally moves DOWN this makes it go UP. +// If CLOCKWISE normally moves UP this makes it go DOWN. +// +//#define REVERSE_MENU_DIRECTION + +// +// Individual Axis Homing +// +// Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu. +// +#define INDIVIDUAL_AXIS_HOMING_MENU + +// +// SPEAKER/BUZZER +// +// 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 + +// +// The duration and frequency for the UI feedback sound. +// Set these to 0 to disable audio feedback in the LCD menus. +// +// Note: Test audio output with the G-Code: +// M300 S P +// +//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2 +//#define LCD_FEEDBACK_FREQUENCY_HZ 5000 + +// +// CONTROLLER TYPE: Standard +// +// Marlin supports a wide variety of controllers. +// Enable one of the following options to specify your controller. +// + +// +// ULTIMAKER Controller. +// +//#define ULTIMAKERCONTROLLER + +// +// ULTIPANEL as seen on Thingiverse. +// +//#define ULTIPANEL + +// +// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3) +// http://reprap.org/wiki/PanelOne +// +//#define PANEL_ONE + +// +// MaKr3d Makr-Panel with graphic controller and SD support. +// http://reprap.org/wiki/MaKr3d_MaKrPanel +// +//#define MAKRPANEL + +// +// ReprapWorld Graphical LCD +// https://reprapworld.com/?products_details&products_id/1218 +// +//#define REPRAPWORLD_GRAPHICAL_LCD + +// +// Activate one of these if you have a Panucatt Devices +// Viki 2.0 or mini Viki with Graphic LCD +// http://panucatt.com +// +//#define VIKI2 +//#define miniVIKI + +// +// Adafruit ST7565 Full Graphic Controller. +// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/ +// +//#define ELB_FULL_GRAPHIC_CONTROLLER + +// +// RepRapDiscount Smart Controller. +// http://reprap.org/wiki/RepRapDiscount_Smart_Controller +// +// Note: Usually sold with a white PCB. +// +#define REPRAP_DISCOUNT_SMART_CONTROLLER + +// +// GADGETS3D G3D LCD/SD Controller +// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel +// +// Note: Usually sold with a blue PCB. +// +//#define G3D_PANEL + +// +// RepRapDiscount FULL GRAPHIC Smart Controller +// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller +// +//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER + +// +// MakerLab Mini Panel with graphic +// controller and SD support - http://reprap.org/wiki/Mini_panel +// +//#define MINIPANEL + +// +// RepRapWorld REPRAPWORLD_KEYPAD v1.1 +// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626 +// +// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key +// is pressed, a value of 10.0 means 10mm per click. +// +//#define REPRAPWORLD_KEYPAD +//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0 + +// +// RigidBot Panel V1.0 +// http://www.inventapart.com/ +// +//#define RIGIDBOT_PANEL + +// +// BQ LCD Smart Controller shipped by +// default with the BQ Hephestos 2 and Witbox 2. +// +//#define BQ_LCD_SMART_CONTROLLER + +// +// Cartesio UI +// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface +// +//#define CARTESIO_UI + +// +// ANET and Tronxy Controller supported displays. +// +//#define ZONESTAR_LCD // Requires ADC_KEYPAD_PIN to be assigned to an analog pin. + // This LCD is known to be susceptible to electrical interference + // which scrambles the display. Pressing any button clears it up. + // This is a LCD2004 display with 5 analog buttons. + +//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6 + // A clone of the RepRapDiscount full graphics display but with + // different pins/wiring (see pins_ANET_10.h). + +// +// LCD for Melzi Card with Graphical LCD +// +//#define LCD_FOR_MELZI + +// +// LCD for Malyan M200 printers. +// This requires SDSUPPORT to be enabled +// +//#define MALYAN_LCD + +// +// CONTROLLER TYPE: I2C +// +// Note: These controllers require the installation of Arduino's LiquidCrystal_I2C +// library. For more info: https://github.com/kiyoshigawa/LiquidCrystal_I2C +// + +// +// Elefu RA Board Control Panel +// http://www.elefu.com/index.php?route=product/product&product_id=53 +// +//#define RA_CONTROL_PANEL + +// +// Sainsmart (YwRobot) LCD Displays +// +// These require F.Malpartida's LiquidCrystal_I2C library +// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home +// +//#define LCD_SAINSMART_I2C_1602 +//#define LCD_SAINSMART_I2C_2004 + +// +// Generic LCM1602 LCD adapter +// +//#define LCM1602 + +// +// PANELOLU2 LCD with status LEDs, +// separate encoder and click inputs. +// +// Note: This controller requires Arduino's LiquidTWI2 library v1.2.3 or later. +// For more info: https://github.com/lincomatic/LiquidTWI2 +// +// Note: The PANELOLU2 encoder click input can either be directly connected to +// a pin (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1). +// +//#define LCD_I2C_PANELOLU2 + +// +// Panucatt VIKI LCD with status LEDs, +// integrated click & L/R/U/D buttons, separate encoder inputs. +// +//#define LCD_I2C_VIKI + +// +// SSD1306 OLED full graphics generic display +// +//#define U8GLIB_SSD1306 + +// +// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules +// +//#define SAV_3DGLCD +#if ENABLED(SAV_3DGLCD) + //#define U8GLIB_SSD1306 + #define U8GLIB_SH1106 +#endif + +// +// Original Ulticontroller from Ultimaker 2 printer with SSD1309 I2C display and encoder +// https://github.com/Ultimaker/Ultimaker2/tree/master/1249_Ulticontroller_Board_(x1) +// +//#define ULTI_CONTROLLER + +// +// CONTROLLER TYPE: Shift register panels +// +// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH +// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD +// +//#define SAV_3DLCD + +// +// TinyBoy2 128x64 OLED / Encoder Panel +// +//#define OLED_PANEL_TINYBOY2 + +// +// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller +// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html +// +//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602 + +// +// MKS MINI12864 with graphic controller and SD support +// http://reprap.org/wiki/MKS_MINI_12864 +// +//#define MKS_MINI_12864 + +// +// Factory display for Creality CR-10 +// https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html +// +// This is RAMPS-compatible using a single 10-pin connector. +// (For CR-10 owners who want to replace the Melzi Creality board but retain the display) +// +//#define CR10_STOCKDISPLAY + +// +// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER +// http://reprap.org/wiki/MKS_12864OLED +// +// Tiny, but very sharp OLED display +// +//#define MKS_12864OLED // Uses the SH1106 controller (default) +//#define MKS_12864OLED_SSD1306 // Uses the SSD1306 controller + +// +// Silvergate GLCD controller +// http://github.com/android444/Silvergate +// +//#define SILVER_GATE_GLCD_CONTROLLER + +//============================================================================= +//=============================== Extra Features ============================== +//============================================================================= + +// @section extras + +// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino +//#define FAST_PWM_FAN + +// 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 +// is too low, you should also increment SOFT_PWM_SCALE. +//#define FAN_SOFT_PWM + +// Incrementing this by 1 will double the software PWM frequency, +// affecting heaters, and the fan if FAN_SOFT_PWM is enabled. +// However, control resolution will be halved for each increment; +// at zero value, there are 128 effective control positions. +#define SOFT_PWM_SCALE 0 + +// If SOFT_PWM_SCALE is set to a value higher than 0, dithering can +// be used to mitigate the associated resolution loss. If enabled, +// some of the PWM cycles are stretched so on average the desired +// duty cycle is attained. +//#define SOFT_PWM_DITHER + +// Temperature status LEDs that display the hotend and bed temperature. +// If all hotends, bed temperature, and target temperature are under 54C +// then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis) +//#define TEMP_STAT_LEDS + +// M240 Triggers a camera by emulating a Canon RC-1 Remote +// Data from: http://www.doc-diy.net/photo/rc-1_hacked/ +//#define PHOTOGRAPH_PIN 23 + +// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure +//#define SF_ARC_FIX + +// Support for the BariCUDA Paste Extruder +//#define BARICUDA + +// Support for BlinkM/CyzRgb +//#define BLINKM + +// Support for PCA9632 PWM LED driver +//#define PCA9632 + +/** + * RGB LED / LED Strip Control + * + * Enable support for an RGB LED connected to 5V digital pins, or + * an RGB Strip connected to MOSFETs controlled by digital pins. + * + * Adds the M150 command to set the LED (or LED strip) color. + * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of + * luminance values can be set from 0 to 255. + * For Neopixel LED an overall brightness parameter is also available. + * + * *** CAUTION *** + * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * as the Arduino cannot handle the current the LEDs will require. + * Failure to follow this precaution can destroy your Arduino! + * NOTE: A separate 5V power supply is required! The Neopixel LED needs + * more current than the Arduino 5V linear regulator can produce. + * *** CAUTION *** + * + * LED Type. Enable only one of the following two options. + * + */ +//#define RGB_LED +//#define RGBW_LED + +#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) + #define RGB_LED_R_PIN 34 + #define RGB_LED_G_PIN 43 + #define RGB_LED_B_PIN 35 + #define RGB_LED_W_PIN -1 +#endif + +// Support for Adafruit Neopixel LED driver +//#define NEOPIXEL_LED +#if ENABLED(NEOPIXEL_LED) + #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) + #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip + #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 +#endif + +/** + * Printer Event LEDs + * + * During printing, the LEDs will reflect the printer status: + * + * - Gradually change from blue to violet as the heated bed gets to target temp + * - Gradually change from violet to red as the hotend gets to temperature + * - Change to white to illuminate work surface + * - Change to green once print has finished + * - Turn off after the print has finished and the user has pushed a button + */ +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED) + #define PRINTER_EVENT_LEDS +#endif + +/** + * R/C SERVO support + * Sponsored by TrinityLabs, Reworked by codexmas + */ + +/** + * Number of servos + * + * For some servo-related options NUM_SERVOS will be set automatically. + * Set this manually if there are extra servos needing manual control. + * Leave undefined or set to 0 to entirely disable the servo subsystem. + */ +//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command + +// Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle. +// 300ms is a good value but you can try less delay. +// If the servo can't reach the requested position, increase it. +#define SERVO_DELAY { 300 } + +// Servo deactivation +// +// With this option servos are powered only during movement, then turned off to prevent jitter. +//#define DEACTIVATE_SERVOS_AFTER_MOVE + +#endif // CONFIGURATION_H diff --git a/Marlin/example_configurations/Creality/CR-8/Configuration_adv.h b/Marlin/example_configurations/Creality/CR-8/Configuration_adv.h new file mode 100644 index 0000000000..e183551f3b --- /dev/null +++ b/Marlin/example_configurations/Creality/CR-8/Configuration_adv.h @@ -0,0 +1,1635 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * Configuration_adv.h + * + * Advanced settings. + * Only change these if you know exactly what you're doing. + * Some of these settings can damage your printer if improperly set! + * + * Basic settings can be found in Configuration.h + * + */ +#ifndef CONFIGURATION_ADV_H +#define CONFIGURATION_ADV_H +#define CONFIGURATION_ADV_H_VERSION 010107 + +// @section temperature + +//=========================================================================== +//=============================Thermal Settings ============================ +//=========================================================================== + +// +// Hephestos 2 24V heated bed upgrade kit. +// https://store.bq.com/en/heated-bed-kit-hephestos2 +// +//#define HEPHESTOS2_HEATED_BED_KIT +#if ENABLED(HEPHESTOS2_HEATED_BED_KIT) + #undef TEMP_SENSOR_BED + #define TEMP_SENSOR_BED 70 + #define HEATER_BED_INVERTING true +#endif + +#if DISABLED(PIDTEMPBED) + #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control + #if ENABLED(BED_LIMIT_SWITCHING) + #define BED_HYSTERESIS 2 // Only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS + #endif +#endif + +/** + * Thermal Protection provides additional protection to your printer from damage + * and fire. Marlin always includes safe min and max temperature ranges which + * protect against a broken or disconnected thermistor wire. + * + * The issue: If a thermistor falls out, it will report the much lower + * temperature of the air in the room, and the the firmware will keep + * the heater on. + * + * The solution: Once the temperature reaches the target, start observing. + * If the temperature stays too far below the target (hysteresis) for too + * long (period), the firmware will halt the machine as a safety precaution. + * + * If you get false positives for "Thermal Runaway", increase + * THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD + */ +#if ENABLED(THERMAL_PROTECTION_HOTENDS) + #define THERMAL_PROTECTION_PERIOD 40 // Seconds + #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius + + /** + * Whenever an M104, M109, or M303 increases the target temperature, the + * firmware will wait for the WATCH_TEMP_PERIOD to expire. If the temperature + * hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted and + * requires a hard reset. This test restarts with any M104/M109/M303, but only + * if the current temperature is far enough below the target for a reliable + * test. + * + * If you get false positives for "Heating failed", increase WATCH_TEMP_PERIOD + * and/or decrease WATCH_TEMP_INCREASE. WATCH_TEMP_INCREASE should not be set + * below 2. + */ + #define WATCH_TEMP_PERIOD 20 // Seconds + #define WATCH_TEMP_INCREASE 2 // Degrees Celsius +#endif + +/** + * 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 // Degrees Celsius + + /** + * As described above, except for the bed (M140/M190/M303). + */ + #define WATCH_BED_TEMP_PERIOD 60 // Seconds + #define WATCH_BED_TEMP_INCREASE 2 // Degrees Celsius +#endif + +#if ENABLED(PIDTEMP) + // this adds an experimental additional term to the heating power, proportional to the extrusion speed. + // if Kc is chosen well, the additional required power due to increased melting should be compensated. + //#define PID_EXTRUSION_SCALING + #if ENABLED(PID_EXTRUSION_SCALING) + #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) + #define LPQ_MAX_LEN 50 + #endif +#endif + +/** + * Automatic Temperature: + * The hotend target temperature is calculated by all the buffered lines of gcode. + * The maximum buffered steps/sec of the extruder motor is called "se". + * Start autotemp mode with M109 S B F + * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by + * mintemp and maxtemp. Turn this off by executing M109 without F* + * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp. + * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode + */ +#define AUTOTEMP +#if ENABLED(AUTOTEMP) + #define AUTOTEMP_OLDWEIGHT 0.98 +#endif + +// Show extra position information in M114 +#define M114_DETAIL + +// Show Temperature ADC value +// Enable for M105 to include ADC values read from temperature sensors. +//#define SHOW_TEMP_ADC_VALUES + +/** + * High Temperature Thermistor Support + * + * Thermistors able to support high temperature tend to have a hard time getting + * good readings at room and lower temperatures. This means HEATER_X_RAW_LO_TEMP + * will probably be caught when the heating element first turns on during the + * preheating process, which will trigger a min_temp_error as a safety measure + * and force stop everything. + * To circumvent this limitation, we allow for a preheat time (during which, + * min_temp_error won't be triggered) and add a min_temp buffer to handle + * aberrant readings. + * + * If you want to enable this feature for your hotend thermistor(s) + * uncomment and set values > 0 in the constants below + */ + +// The number of consecutive low temperature errors that can occur +// before a min_temp_error is triggered. (Shouldn't be more than 10.) +//#define MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED 0 + +// The number of milliseconds a hotend will preheat before starting to check +// the temperature. This value should NOT be set to the time it takes the +// hot end to reach the target temperature, but the time it takes to reach +// the minimum temperature your thermistor can read. The lower the better/safer. +// This shouldn't need to be more than 30 seconds (30000) +//#define MILLISECONDS_PREHEAT_TIME 0 + +// @section extruder + +// Extruder runout prevention. +// If the machine is idle and the temperature over MINTEMP +// then extrude some filament every couple of SECONDS. +//#define EXTRUDER_RUNOUT_PREVENT +#if ENABLED(EXTRUDER_RUNOUT_PREVENT) + #define EXTRUDER_RUNOUT_MINTEMP 190 + #define EXTRUDER_RUNOUT_SECONDS 30 + #define EXTRUDER_RUNOUT_SPEED 1500 // mm/m + #define EXTRUDER_RUNOUT_EXTRUDE 5 // mm +#endif + +// @section temperature + +//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements. +//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET" +#define TEMP_SENSOR_AD595_OFFSET 0.0 +#define TEMP_SENSOR_AD595_GAIN 1.0 + +/** + * Controller Fan + * To cool down the stepper drivers and MOSFETs. + * + * The fan will turn on automatically whenever any stepper is enabled + * and turn off after a set period after all steppers are turned off. + */ +//#define USE_CONTROLLER_FAN +#if ENABLED(USE_CONTROLLER_FAN) + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed +#endif + +// When first starting the main fan, run it at full speed for the +// given number of milliseconds. This gets the fan spinning reliably +// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu) +//#define FAN_KICKSTART_TIME 100 + +// This defines the minimal speed for the main fan, run in PWM mode +// to enable uncomment and set minimal PWM speed for reliable running (1-255) +// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM +//#define FAN_MIN_PWM 50 + +// @section extruder + +/** + * Extruder cooling fans + * + * Extruder auto fans automatically turn on when their extruders' + * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE. + * + * Your board's pins file specifies the recommended pins. Override those here + * or set to -1 to disable completely. + * + * 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 E1_AUTO_FAN_PIN -1 +#define E2_AUTO_FAN_PIN -1 +#define E3_AUTO_FAN_PIN -1 +#define E4_AUTO_FAN_PIN -1 +#define EXTRUDER_AUTO_FAN_TEMPERATURE 50 +#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed + +/** + * Part-Cooling Fan Multiplexer + * + * This feature allows you to digitally multiplex the fan output. + * The multiplexer is automatically switched at tool-change. + * Set FANMUX[012]_PINs below for up to 2, 4, or 8 multiplexed fans. + */ +#define FANMUX0_PIN -1 +#define FANMUX1_PIN -1 +#define FANMUX2_PIN -1 + +/** + * M355 Case Light on-off / brightness + */ +//#define CASE_LIGHT_ENABLE +#if ENABLED(CASE_LIGHT_ENABLE) + //#define CASE_LIGHT_PIN 4 // Override the default pin if needed + #define INVERT_CASE_LIGHT false // Set true if Case Light is ON when pin is LOW + #define CASE_LIGHT_DEFAULT_ON true // Set default power-up state on + #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // Set default power-up brightness (0-255, requires PWM pin) + //#define MENU_ITEM_CASE_LIGHT // Add a Case Light option to the LCD main menu + //#define CASE_LIGHT_USE_NEOPIXEL // Use Neopixel LED as case light, requires NEOPIXEL_LED. + #if ENABLED(CASE_LIGHT_USE_NEOPIXEL) + #define CASE_LIGHT_NEOPIXEL_COLOR { 255, 255, 255, 255 } // { Red, Green, Blue, White } + #endif +#endif + +//=========================================================================== +//============================ Mechanical Settings ========================== +//=========================================================================== + +// @section homing + +// If you want endstops to stay on (by default) even when not homing +// enable this option. Override at any time with M120, M121. +//#define ENDSTOPS_ALWAYS_ON_DEFAULT + +// @section extras + +//#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats. + +/** + * Dual Steppers / Dual Endstops + * + * This section will allow you to use extra E drivers to drive a second motor for X, Y, or Z axes. + * + * For example, set X_DUAL_STEPPER_DRIVERS setting to use a second motor. If the motors need to + * spin in opposite directions set INVERT_X2_VS_X_DIR. If the second motor needs its own endstop + * set X_DUAL_ENDSTOPS. This can adjust for "racking." Use X2_USE_ENDSTOP to set the endstop plug + * that should be used for the second endstop. Extra endstops will appear in the output of 'M119'. + * + * Use X_DUAL_ENDSTOP_ADJUSTMENT to adjust for mechanical imperfection. After homing both motors + * this offset is applied to the X2 motor. To find the offset home the X axis, and measure the error + * in X2. Dual endstop offsets can be set at runtime with 'M666 X Y Z'. + */ + +//#define X_DUAL_STEPPER_DRIVERS +#if ENABLED(X_DUAL_STEPPER_DRIVERS) + #define INVERT_X2_VS_X_DIR true // Set 'true' if X motors should rotate in opposite directions + //#define X_DUAL_ENDSTOPS + #if ENABLED(X_DUAL_ENDSTOPS) + #define X2_USE_ENDSTOP _XMAX_ + #define X_DUAL_ENDSTOPS_ADJUSTMENT 0 + #endif +#endif + +//#define Y_DUAL_STEPPER_DRIVERS +#if ENABLED(Y_DUAL_STEPPER_DRIVERS) + #define INVERT_Y2_VS_Y_DIR true // Set 'true' if Y motors should rotate in opposite directions + //#define Y_DUAL_ENDSTOPS + #if ENABLED(Y_DUAL_ENDSTOPS) + #define Y2_USE_ENDSTOP _YMAX_ + #define Y_DUAL_ENDSTOPS_ADJUSTMENT 0 + #endif +#endif + +//#define Z_DUAL_STEPPER_DRIVERS +#if ENABLED(Z_DUAL_STEPPER_DRIVERS) + //#define Z_DUAL_ENDSTOPS + #if ENABLED(Z_DUAL_ENDSTOPS) + #define Z2_USE_ENDSTOP _XMAX_ + #define Z_DUAL_ENDSTOPS_ADJUSTMENT 0 + #endif +#endif + +// Enable this for dual x-carriage printers. +// A dual x-carriage design has the advantage that the inactive extruder can be parked which +// prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage +// allowing faster printing speeds. Connect your X2 stepper to the first unused E plug. +//#define DUAL_X_CARRIAGE +#if ENABLED(DUAL_X_CARRIAGE) + // Configuration for second X-carriage + // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; + // the second x-carriage always homes to the maximum endstop. + #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage + #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed + #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position + #define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position + // However: In this mode the HOTEND_OFFSET_X value for the second extruder provides a software + // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops + // without modifying the firmware (through the "M218 T1 X???" command). + // Remember: you should set the second extruder x-offset to 0 in your slicer. + + // There are a few selectable movement modes for dual x-carriages using M605 S + // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results + // as long as it supports dual x-carriages. (M605 S0) + // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so + // that additional slicer support is not required. (M605 S1) + // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all + // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at + // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm]) + + // This is the default power-up mode which can be later using M605. + #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE + + // Default settings in "Auto-park Mode" + #define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder + #define TOOLCHANGE_UNPARK_ZLIFT 1 // the distance to raise Z axis when unparking an extruder + + // Default x offset in duplication mode (typically set to half print bed width) + #define DEFAULT_DUPLICATION_X_OFFSET 100 + +#endif // DUAL_X_CARRIAGE + +// Activate a solenoid on the active extruder with M380. Disable all with M381. +// Define SOL0_PIN, SOL1_PIN, etc., for each extruder that has a solenoid. +//#define EXT_SOLENOID + +// @section homing + +// Homing hits each endstop, retracts by these distances, then does a slower bump. +#define X_HOME_BUMP_MM 5 +#define Y_HOME_BUMP_MM 5 +#define Z_HOME_BUMP_MM 2 +#define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) +#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially + +// When G28 is called, this option will make Y home before X +//#define HOME_Y_BEFORE_X + +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + +// @section machine + +#define AXIS_RELATIVE_MODES {false, false, false, false} + +// Allow duplication mode with a basic dual-nozzle extruder +//#define DUAL_NOZZLE_DUPLICATION_MODE + +// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. +#define INVERT_X_STEP_PIN false +#define INVERT_Y_STEP_PIN false +#define INVERT_Z_STEP_PIN false +#define INVERT_E_STEP_PIN false + +// Default stepper release if idle. Set to 0 to deactivate. +// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true. +// Time can be set by M18 and M84. +#define DEFAULT_STEPPER_DEACTIVE_TIME 120 +#define DISABLE_INACTIVE_X true +#define DISABLE_INACTIVE_Y true +#define DISABLE_INACTIVE_Z false // set to false if the nozzle will fall down on your printed part when print has finished. +#define DISABLE_INACTIVE_E true + +#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate +#define DEFAULT_MINTRAVELFEEDRATE 0.0 + +//#define HOME_AFTER_DEACTIVATE // Require rehoming after steppers are deactivated + +// @section lcd + +#if ENABLED(ULTIPANEL) + #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel + #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder +#endif + +// @section extras + +// minimum time in microseconds that a movement needs to take if the buffer is emptied. +#define DEFAULT_MINSEGMENTTIME 20000 + +// If defined the movements slow down when the look ahead buffer is only half full +#define SLOWDOWN + +// Frequency limit +// See nophead's blog for more info +// Not working O +//#define XY_FREQUENCY_LIMIT 15 + +// Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end +// of the buffer and all stops. This should not be much greater than zero and should only be changed +// if unwanted behavior is observed on a user's machine when running at very slow speeds. +#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec) + +// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. +#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16] + +/** + * @section stepper motor current + * + * Some boards have a means of setting the stepper motor current via firmware. + * + * The power on motor currents are set by: + * PWM_MOTOR_CURRENT - used by MINIRAMBO & ULTIMAIN_2 + * known compatible chips: A4982 + * DIGIPOT_MOTOR_CURRENT - used by BQ_ZUM_MEGA_3D, RAMBO & SCOOVO_X9H + * known compatible chips: AD5206 + * DAC_MOTOR_CURRENT_DEFAULT - used by PRINTRBOARD_REVF & RIGIDBOARD_V2 + * known compatible chips: MCP4728 + * DIGIPOT_I2C_MOTOR_CURRENTS - used by 5DPRINT, AZTEEG_X3_PRO, MIGHTYBOARD_REVE + * known compatible chips: MCP4451, MCP4018 + * + * Motor currents can also be set by M907 - M910 and by the LCD. + * M907 - applies to all. + * M908 - BQ_ZUM_MEGA_3D, RAMBO, PRINTRBOARD_REVF, RIGIDBOARD_V2 & SCOOVO_X9H + * M909, M910 & LCD - only PRINTRBOARD_REVF & RIGIDBOARD_V2 + */ +//#define PWM_MOTOR_CURRENT { 1300, 1300, 1250 } // Values in milliamps +//#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 } // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A) +//#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 } // Default drive percent - X, Y, Z, E axis + +// Use an I2C based DIGIPOT (e.g., Azteeg X3 Pro) +//#define DIGIPOT_I2C +#if ENABLED(DIGIPOT_I2C) && !defined(DIGIPOT_I2C_ADDRESS_A) + /** + * Common slave addresses: + * + * A (A shifted) B (B shifted) IC + * Smoothie 0x2C (0x58) 0x2D (0x5A) MCP4451 + * AZTEEG_X3_PRO 0x2C (0x58) 0x2E (0x5C) MCP4451 + * MIGHTYBOARD_REVE 0x2F (0x5E) MCP4018 + */ + #define DIGIPOT_I2C_ADDRESS_A 0x2C // unshifted slave address for first DIGIPOT + #define DIGIPOT_I2C_ADDRESS_B 0x2D // unshifted slave address for second DIGIPOT +#endif + +//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster +#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 +// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS. +// These correspond to the physical drivers, so be mindful if the order is changed. +#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO + +//=========================================================================== +//=============================Additional Features=========================== +//=========================================================================== + +#define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly +#define ENCODER_10X_STEPS_PER_SEC 75 // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value +#define ENCODER_100X_STEPS_PER_SEC 160 // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value + +//#define CHDK 4 //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/ +#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again + +// @section lcd + +// Include a page of printer information in the LCD Main Menu +//#define LCD_INFO_MENU + +// Leave out seldom-used LCD menu items to recover some Program Memory +//#define SLIM_LCD_MENUS + +// Scroll a longer status message into view +#define STATUS_MESSAGE_SCROLLING + +// On the Info Screen, display XY with one decimal place when possible +//#define LCD_DECIMAL_SMALL_XY + +// The timeout (in ms) to return to the status screen from sub-menus +//#define LCD_TIMEOUT_TO_STATUS 15000 + +// Add an 'M73' G-code to set the current percentage +//#define LCD_SET_PROGRESS_MANUALLY + +#if ENABLED(SDSUPPORT) || ENABLED(LCD_SET_PROGRESS_MANUALLY) + //#define LCD_PROGRESS_BAR // Show a progress bar on HD44780 LCDs for SD printing + #if ENABLED(LCD_PROGRESS_BAR) + #define PROGRESS_BAR_BAR_TIME 2000 // (ms) Amount of time to show the bar + #define PROGRESS_BAR_MSG_TIME 3000 // (ms) Amount of time to show the status message + #define PROGRESS_MSG_EXPIRE 0 // (ms) Amount of time to retain the status message (0=forever) + //#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it + //#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar + #endif +#endif // SDSUPPORT || LCD_SET_PROGRESS_MANUALLY + +/** + * LED Control Menu + * Enable this feature to add LED Control to the LCD menu + */ +//#define LED_CONTROL_MENU +#if ENABLED(LED_CONTROL_MENU) + #define LED_COLOR_PRESETS // Enable the 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_BRIGHTNESS 255 // User defined intensity + //#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup + #endif +#endif // LED_CONTROL_MENU + +#if ENABLED(SDSUPPORT) + + // Some RAMPS and other boards don't detect when an SD card is inserted. You can work + // around this by connecting a push button or single throw switch to the pin defined + // as SD_DETECT_PIN in your board's pins definitions. + // This setting should be disabled unless you are using a push button, pulling the pin to ground. + // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). + #define SD_DETECT_INVERTED + + #define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished + #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the 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. + #define SDCARD_RATHERRECENTFIRST + + // Add an option in the menu to run all auto#.g files + //#define MENU_ADDAUTOSTART + + /** + * Continue after Power-Loss (Creality3D) + * + * Store the current state to the SD Card at the start of each layer + * during SD printing. If the recovery file is found at boot time, present + * an option on the LCD screen to continue the print from the last-known + * point in the file. + */ + //#define POWER_LOSS_RECOVERY + + /** + * Sort SD file listings in alphabetical order. + * + * With this option enabled, items on SD cards will be sorted + * by name for easier navigation. + * + * By default... + * + * - Use the slowest -but safest- method for sorting. + * - Folders are sorted to the top. + * - The sort key is statically allocated. + * - No added G-code (M34) support. + * - 40 item sorting limit. (Items after the first 40 are unsorted.) + * + * SD sorting uses static allocation (as set by SDSORT_LIMIT), allowing the + * compiler to calculate the worst-case usage and throw an error if the SRAM + * limit is exceeded. + * + * - SDSORT_USES_RAM provides faster sorting via a static directory buffer. + * - SDSORT_USES_STACK does the same, but uses a local stack-based buffer. + * - SDSORT_CACHE_NAMES will retain the sorted file listing in RAM. (Expensive!) + * - SDSORT_DYNAMIC_RAM only uses RAM when the SD menu is visible. (Use with caution!) + */ + //#define SDCARD_SORT_ALPHA + + // SD Card Sorting options + #if ENABLED(SDCARD_SORT_ALPHA) + #define SDSORT_LIMIT 40 // Maximum number of sorted items (10-256). Costs 27 bytes each. + #define FOLDER_SORTING -1 // -1=above 0=none 1=below + #define SDSORT_GCODE false // Allow turning sorting on/off with LCD and M34 g-code. + #define SDSORT_USES_RAM false // Pre-allocate a static array for faster pre-sorting. + #define SDSORT_USES_STACK false // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.) + #define SDSORT_CACHE_NAMES false // Keep sorted items in RAM longer for speedy performance. Most expensive option. + #define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use! + #define SDSORT_CACHE_VFATS 2 // Maximum number of 13-byte VFAT entries to use for sorting. + // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM. + #endif + + // This allows hosts to request long names for files and folders with M33 + //#define LONG_FILENAME_HOST_SUPPORT + + // Enable this option to scroll long filenames in the SD card menu + #define SCROLL_LONG_FILENAMES + + /** + * This option allows you to abort SD printing when any endstop is triggered. + * This feature must be enabled with "M540 S1" or from the LCD menu. + * To have any effect, endstops must be enabled during SD printing. + */ + //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED + + /** + * This option makes it easier to print the same SD Card file again. + * On print completion the LCD Menu will open with the file selected. + * You can just click to start the print, or navigate elsewhere. + */ + //#define SD_REPRINT_LAST_SELECTED_FILE + + /** + * Auto-report SdCard status with M27 S + */ + //#define AUTO_REPORT_SD_STATUS + +#endif // SDSUPPORT + +/** + * Additional options for Graphical Displays + * + * Use the optimizations here to improve printing performance, + * which can be adversely affected by graphical display drawing, + * especially when doing several short moves, and when printing + * on DELTA and SCARA machines. + * + * Some of these options may result in the display lagging behind + * controller events, as there is a trade-off between reliable + * printing performance versus fast display updates. + */ +#if ENABLED(DOGLCD) + // Show SD percentage next to the progress bar + //#define DOGM_SD_PERCENT + + // Enable to save many cycles by drawing a hollow frame on the Info Screen + #define XYZ_HOLLOW_FRAME + + // Enable to save many cycles by drawing a hollow frame on Menu Screens + #define MENU_HOLLOW_FRAME + + // A bigger font is available for edit items. Costs 3120 bytes of PROGMEM. + // Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese. + //#define USE_BIG_EDIT_FONT + + // A smaller font may be used on the Info Screen. Costs 2300 bytes of PROGMEM. + // Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese. + //#define USE_SMALL_INFOFONT + + // Enable this option and reduce the value to optimize screen updates. + // The normal delay is 10µs. Use the lowest value that still gives a reliable display. + //#define DOGM_SPI_DELAY_US 5 + + // Swap the CW/CCW indicators in the graphics overlay + //#define OVERLAY_GFX_REVERSE + + #if ENABLED(U8GLIB_ST7920) + /** + * ST7920-based LCDs can emulate a 16 x 4 character display using + * the ST7920 character-generator for very fast screen updates. + * Enable LIGHTWEIGHT_UI to use this special display mode. + * + * Since LIGHTWEIGHT_UI has limited space, the position and status + * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the + * length of time to display the status message before clearing. + * + * Set STATUS_EXPIRE_SECONDS to zero to never clear the status. + * This will prevent position updates from being displayed. + */ + //#define LIGHTWEIGHT_UI + #if ENABLED(LIGHTWEIGHT_UI) + #define STATUS_EXPIRE_SECONDS 20 + #endif + #endif + +#endif // DOGLCD + +// @section safety + +// The hardware watchdog should reset the microcontroller disabling all outputs, +// in case the firmware gets stuck and doesn't do temperature regulation. +#define USE_WATCHDOG + +#if ENABLED(USE_WATCHDOG) + // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. + // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. + // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. + //#define WATCHDOG_RESET_MANUAL +#endif + +// @section lcd + +/** + * Babystepping enables movement of the axes by tiny increments without changing + * the current position values. This feature is used primarily to adjust the Z + * axis in the first layer of a print in real-time. + * + * Warning: Does not respect endstops! + */ +#define BABYSTEPPING +#if ENABLED(BABYSTEPPING) + //#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA! + #define BABYSTEP_INVERT_Z false // Change if Z babysteps should go the other way + #define BABYSTEP_MULTIPLICATOR 5 // Babysteps are very small. Increase for faster motion. + //#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping + #define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping. + #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds. + // Note: Extra time may be added to mitigate controller latency. + //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor +#endif + +// @section extruder + +/** + * Linear Pressure Control v1.5 + * + * Assumption: advance [steps] = k * (delta velocity [steps/s]) + * K=0 means advance disabled. + * + * NOTE: K values for LIN_ADVANCE 1.5 differ from earlier versions! + * + * Set K around 0.22 for 3mm PLA Direct Drive with ~6.5cm between the drive gear and heatbreak. + * Larger K values will be needed for flexible filament and greater distances. + * If this algorithm produces a higher speed offset than the extruder can handle (compared to E jerk) + * print acceleration will be reduced during the affected moves to keep within the limit. + * + * See http://marlinfw.org/docs/features/lin_advance.html for full instructions. + * Mention @Sebastianv650 on GitHub to alert the author of any issues. + */ +//#define LIN_ADVANCE +#if ENABLED(LIN_ADVANCE) + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. +#endif + +// @section leveling + +#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) + // Override the mesh area if the automatic (max) area is too large + //#define MESH_MIN_X MESH_INSET + //#define MESH_MIN_Y MESH_INSET + //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) + //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) +#endif + +// @section extras + +// +// G2/G3 Arc Support +// +#define ARC_SUPPORT // Disable this feature to save ~3226 bytes +#if ENABLED(ARC_SUPPORT) + #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment + #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles + //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes +#endif + +// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes. +//#define BEZIER_CURVE_SUPPORT + +// G38.2 and G38.3 Probe Target +// Set MULTIPLE_PROBING if you want G38 to double touch +//#define G38_PROBE_TARGET +#if ENABLED(G38_PROBE_TARGET) + #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move) +#endif + +// Moves (or segments) with fewer steps than this will be joined with the next move +#define MIN_STEPS_PER_SEGMENT 6 + +// The minimum pulse width (in µs) for stepping a stepper. +// Set this if you find stepping unreliable, or if using a very fast CPU. +// 0 is OK for AVR, 0 is OK for A4989 drivers, 2 is needed for DRV8825 drivers +#define MINIMUM_STEPPER_PULSE 2 + +// @section temperature + +// Control heater 0 and heater 1 in parallel. +//#define HEATERS_PARALLEL + +//=========================================================================== +//================================= Buffers ================================= +//=========================================================================== + +// @section hidden + +// The number of linear motions that can be in the plan at any give time. +// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2 (e.g. 8, 16, 32) because shifts and ors are used to do the ring-buffering. +#if ENABLED(SDSUPPORT) + #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller +#else + #define BLOCK_BUFFER_SIZE 16 // maximize block buffer +#endif + +// @section serial + +// The ASCII buffer for serial input +#define MAX_CMD_SIZE 96 +#define BUFSIZE 4 + +// Transmission to Host Buffer Size +// To save 386 bytes of PROGMEM (and TX_BUFFER_SIZE+3 bytes of RAM) set to 0. +// To buffer a simple "ok" you need 4 bytes. +// For ADVANCED_OK (M105) you need 32 bytes. +// 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 + +// Host Receive Buffer Size +// Without XON/XOFF flow control (see SERIAL_XON_XOFF below) 32 bytes should be enough. +// To use flow control, set this buffer size to at least 1024 bytes. +// :[0, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048] +//#define RX_BUFFER_SIZE 1024 + +#if RX_BUFFER_SIZE >= 1024 + // Enable to have the controller send XON/XOFF control characters to + // the host to signal the RX buffer is becoming full. + //#define SERIAL_XON_XOFF +#endif + +#if ENABLED(SDSUPPORT) + // Enable this option to collect and display the maximum + // RX queue usage after transferring a file to SD. + //#define SERIAL_STATS_MAX_RX_QUEUED + + // Enable this option to collect and display the number + // of dropped bytes after a file transfer to SD. + //#define SERIAL_STATS_DROPPED_RX +#endif + +// Enable an emergency-command parser to intercept certain commands as they +// enter the serial receive buffer, so they cannot be blocked. +// Currently handles M108, M112, M410 +// Does not work on boards using AT90USB (USBCON) processors! +#define EMERGENCY_PARSER + +// Bad Serial-connections can miss a received command by sending an 'ok' +// Therefore some clients abort after 30 seconds in a timeout. +// Some other clients start sending commands while receiving a 'wait'. +// This "wait" is only sent when the buffer is empty. 1 second is a good value here. +//#define NO_TIMEOUTS 1000 // Milliseconds + +// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. +//#define ADVANCED_OK + +// @section extras + +/** + * Firmware-based and LCD-controlled retract + * + * Add G10 / G11 commands for automatic firmware-based retract / recover. + * Use M207 and M208 to define parameters for retract / recover. + * + * Use M209 to enable or disable auto-retract. + * With auto-retract enabled, all G1 E moves within the set range + * will be converted to firmware-based retract/recover moves. + * + * Be sure to turn off auto-retract during filament change. + * + * Note that M207 / M208 / M209 settings are saved to EEPROM. + * + */ +//#define FWRETRACT // ONLY PARTIALLY TESTED +#if ENABLED(FWRETRACT) + #define MIN_AUTORETRACT 0.1 // When auto-retract is on, convert E moves of this length and over + #define MAX_AUTORETRACT 10.0 // Upper limit for auto-retract conversion + #define RETRACT_LENGTH 3 // Default retract length (positive mm) + #define RETRACT_LENGTH_SWAP 13 // Default swap retract length (positive mm), for extruder change + #define RETRACT_FEEDRATE 45 // Default feedrate for retracting (mm/s) + #define RETRACT_ZLIFT 0 // Default retract Z-lift + #define RETRACT_RECOVER_LENGTH 0 // Default additional recover length (mm, added to retract length when recovering) + #define RETRACT_RECOVER_LENGTH_SWAP 0 // Default additional swap recover length (mm, added to retract length when recovering from extruder change) + #define RETRACT_RECOVER_FEEDRATE 8 // Default feedrate for recovering from retraction (mm/s) + #define RETRACT_RECOVER_FEEDRATE_SWAP 8 // Default feedrate for recovering from swap retraction (mm/s) +#endif + +/** + * Extra Fan Speed + * Adds a secondary fan speed for each print-cooling fan. + * 'M106 P T3-255' : Set a secondary speed for + * 'M106 P T2' : Use the set secondary speed + * 'M106 P T1' : Restore the previous fan speed + */ +//#define EXTRA_FAN_SPEED + +/** + * Advanced Pause + * Experimental feature for filament change support and for parking the nozzle when paused. + * Adds the GCode M600 for initiating filament change. + * If PARK_HEAD_ON_PAUSE enabled, adds the GCode M125 to pause printing and park the nozzle. + * + * Requires an LCD display. + * Requires NOZZLE_PARK_FEATURE. + * This feature is required for the default FILAMENT_RUNOUT_SCRIPT. + */ +//#define ADVANCED_PAUSE_FEATURE +#if ENABLED(ADVANCED_PAUSE_FEATURE) + #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_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. + // 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. + // 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_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. + // 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. + // 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. + + // Filament Unload does a Retract, Delay, and Purge first: + #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. + #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. + + //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) +#endif + +// @section tmc + +/** + * Enable this section if you have TMC26X motor drivers. + * You will need to import the TMC26XStepper library into the Arduino IDE for this + * (https://github.com/trinamic/TMC26XStepper.git) + */ +//#define HAVE_TMC26X +#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! + //#define X_IS_TMC26X + //#define X2_IS_TMC26X + //#define Y_IS_TMC26X + //#define Y2_IS_TMC26X + //#define Z_IS_TMC26X + //#define Z2_IS_TMC26X + //#define E0_IS_TMC26X + //#define E1_IS_TMC26X + //#define E2_IS_TMC26X + //#define E3_IS_TMC26X + //#define E4_IS_TMC26X + + #define X_MAX_CURRENT 1000 // in mA + #define X_SENSE_RESISTOR 91 // in mOhms + #define X_MICROSTEPS 16 // number of microsteps + + #define X2_MAX_CURRENT 1000 + #define X2_SENSE_RESISTOR 91 + #define X2_MICROSTEPS 16 + + #define Y_MAX_CURRENT 1000 + #define Y_SENSE_RESISTOR 91 + #define Y_MICROSTEPS 16 + + #define Y2_MAX_CURRENT 1000 + #define Y2_SENSE_RESISTOR 91 + #define Y2_MICROSTEPS 16 + + #define Z_MAX_CURRENT 1000 + #define Z_SENSE_RESISTOR 91 + #define Z_MICROSTEPS 16 + + #define Z2_MAX_CURRENT 1000 + #define Z2_SENSE_RESISTOR 91 + #define Z2_MICROSTEPS 16 + + #define E0_MAX_CURRENT 1000 + #define E0_SENSE_RESISTOR 91 + #define E0_MICROSTEPS 16 + + #define E1_MAX_CURRENT 1000 + #define E1_SENSE_RESISTOR 91 + #define E1_MICROSTEPS 16 + + #define E2_MAX_CURRENT 1000 + #define E2_SENSE_RESISTOR 91 + #define E2_MICROSTEPS 16 + + #define E3_MAX_CURRENT 1000 + #define E3_SENSE_RESISTOR 91 + #define E3_MICROSTEPS 16 + + #define E4_MAX_CURRENT 1000 + #define E4_SENSE_RESISTOR 91 + #define E4_MICROSTEPS 16 + +#endif + +// @section tmc_smart + +/** + * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to + * the hardware SPI interface on your board and define the required CS pins + * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). + * You may also use software SPI if you wish to use general purpose IO pins. + */ +//#define HAVE_TMC2130 +#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! + //#define X_IS_TMC2130 + //#define X2_IS_TMC2130 + //#define Y_IS_TMC2130 + //#define Y2_IS_TMC2130 + //#define Z_IS_TMC2130 + //#define Z2_IS_TMC2130 + //#define E0_IS_TMC2130 + //#define E1_IS_TMC2130 + //#define E2_IS_TMC2130 + //#define E3_IS_TMC2130 + //#define E4_IS_TMC2130 +#endif + +/** + * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. + * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * To use the reading capabilities, also connect #_SERIAL_RX_PIN + * to PDN_UART without a resistor. + * The drivers can also be used with hardware serial. + * + * You'll also need the TMC2208Stepper Arduino library + * (https://github.com/teemuatlut/TMC2208Stepper). + */ +//#define HAVE_TMC2208 +#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! + //#define X_IS_TMC2208 + //#define X2_IS_TMC2208 + //#define Y_IS_TMC2208 + //#define Y2_IS_TMC2208 + //#define Z_IS_TMC2208 + //#define Z2_IS_TMC2208 + //#define E0_IS_TMC2208 + //#define E1_IS_TMC2208 + //#define E2_IS_TMC2208 + //#define E3_IS_TMC2208 + //#define E4_IS_TMC2208 +#endif + +#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) + + #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 + #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current + #define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256 + + #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. + #define X_MICROSTEPS 16 // 0..256 + + #define Y_CURRENT 800 + #define Y_MICROSTEPS 16 + + #define Z_CURRENT 800 + #define Z_MICROSTEPS 16 + + #define X2_CURRENT 800 + #define X2_MICROSTEPS 16 + + #define Y2_CURRENT 800 + #define Y2_MICROSTEPS 16 + + #define Z2_CURRENT 800 + #define Z2_MICROSTEPS 16 + + #define E0_CURRENT 800 + #define E0_MICROSTEPS 16 + + #define E1_CURRENT 800 + #define E1_MICROSTEPS 16 + + #define E2_CURRENT 800 + #define E2_MICROSTEPS 16 + + #define E3_CURRENT 800 + #define E3_MICROSTEPS 16 + + #define E4_CURRENT 800 + #define E4_MICROSTEPS 16 + + /** + * Use software SPI for TMC2130. + * The default SW SPI pins are defined the respective pins files, + * but you can override or define them here. + */ + //#define TMC_USE_SW_SPI + //#define TMC_SW_MOSI -1 + //#define TMC_SW_MISO -1 + //#define TMC_SW_SCK -1 + + /** + * Use Trinamic's ultra quiet stepping mode. + * When disabled, Marlin will use spreadCycle stepping mode. + */ + #define STEALTHCHOP + + /** + * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, + * like overtemperature and short to ground. TMC2208 requires hardware serial. + * In the case of overtemperature Marlin can decrease the driver current until error condition clears. + * Other detected conditions can be used to stop the current print. + * Relevant g-codes: + * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given. + * M911 - Report stepper driver overtemperature pre-warn condition. + * M912 - Clear stepper driver overtemperature pre-warn condition flag. + * M122 S0/1 - Report driver parameters (Requires TMC_DEBUG) + */ + //#define MONITOR_DRIVER_STATUS + + #if ENABLED(MONITOR_DRIVER_STATUS) + #define CURRENT_STEP_DOWN 50 // [mA] + #define REPORT_CURRENT_CHANGE + #define STOP_ON_ERROR + #endif + + /** + * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD. + * This mode allows for faster movements at the expense of higher noise levels. + * STEALTHCHOP needs to be enabled. + * M913 X/Y/Z/E to live tune the setting + */ + //#define HYBRID_THRESHOLD + + #define X_HYBRID_THRESHOLD 100 // [mm/s] + #define X2_HYBRID_THRESHOLD 100 + #define Y_HYBRID_THRESHOLD 100 + #define Y2_HYBRID_THRESHOLD 100 + #define Z_HYBRID_THRESHOLD 3 + #define Z2_HYBRID_THRESHOLD 3 + #define E0_HYBRID_THRESHOLD 30 + #define E1_HYBRID_THRESHOLD 30 + #define E2_HYBRID_THRESHOLD 30 + #define E3_HYBRID_THRESHOLD 30 + #define E4_HYBRID_THRESHOLD 30 + + /** + * Use stallGuard2 to sense an obstacle and trigger an endstop. + * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin. + * X, Y, and Z homing will always be done in spreadCycle mode. + * + * X/Y/Z_HOMING_SENSITIVITY is used for tuning the trigger sensitivity. + * Higher values make the system LESS sensitive. + * Lower value make the system MORE sensitive. + * Too low values can lead to false positives, while too high values will collide the axis without triggering. + * It is advised to set X/Y/Z_HOME_BUMP_MM to 0. + * M914 X/Y/Z to live tune the setting + */ + //#define SENSORLESS_HOMING // TMC2130 only + + #if ENABLED(SENSORLESS_HOMING) + #define X_HOMING_SENSITIVITY 8 + #define Y_HOMING_SENSITIVITY 8 + #define Z_HOMING_SENSITIVITY 8 + #endif + + /** + * Enable M122 debugging command for TMC stepper drivers. + * M122 S0/1 will enable continous reporting. + */ + //#define TMC_DEBUG + + /** + * M915 Z Axis Calibration + * + * - Adjust Z stepper current, + * - Drive the Z axis to its physical maximum, and + * - Home Z to account for the lost steps. + * + * Use M915 Snn to specify the current. + * Use M925 Znn to add extra Z height to Z_MAX_POS. + */ + //#define TMC_Z_CALIBRATION + #if ENABLED(TMC_Z_CALIBRATION) + #define CALIBRATION_CURRENT 250 + #define CALIBRATION_EXTRA_HEIGHT 10 + #endif + + /** + * You can set your own advanced settings by filling in predefined functions. + * A list of available functions can be found on the library github page + * https://github.com/teemuatlut/TMC2130Stepper + * https://github.com/teemuatlut/TMC2208Stepper + * + * Example: + * #define TMC_ADV() { \ + * stepperX.diag0_temp_prewarn(1); \ + * stepperY.interpolate(0); \ + * } + */ + #define TMC_ADV() { } + +#endif // TMC2130 || TMC2208 + +// @section L6470 + +/** + * Enable this section if you have L6470 motor drivers. + * You need to import the L6470 library into the Arduino IDE for this. + * (https://github.com/ameyer/Arduino-L6470) + */ + +//#define HAVE_L6470DRIVER +#if ENABLED(HAVE_L6470DRIVER) + + //#define X_IS_L6470 + //#define X2_IS_L6470 + //#define Y_IS_L6470 + //#define Y2_IS_L6470 + //#define Z_IS_L6470 + //#define Z2_IS_L6470 + //#define E0_IS_L6470 + //#define E1_IS_L6470 + //#define E2_IS_L6470 + //#define E3_IS_L6470 + //#define E4_IS_L6470 + + #define X_MICROSTEPS 16 // number of microsteps + #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off + #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall + + #define X2_MICROSTEPS 16 + #define X2_OVERCURRENT 2000 + #define X2_STALLCURRENT 1500 + + #define Y_MICROSTEPS 16 + #define Y_OVERCURRENT 2000 + #define Y_STALLCURRENT 1500 + + #define Y2_MICROSTEPS 16 + #define Y2_OVERCURRENT 2000 + #define Y2_STALLCURRENT 1500 + + #define Z_MICROSTEPS 16 + #define Z_OVERCURRENT 2000 + #define Z_STALLCURRENT 1500 + + #define Z2_MICROSTEPS 16 + #define Z2_OVERCURRENT 2000 + #define Z2_STALLCURRENT 1500 + + #define E0_MICROSTEPS 16 + #define E0_OVERCURRENT 2000 + #define E0_STALLCURRENT 1500 + + #define E1_MICROSTEPS 16 + #define E1_OVERCURRENT 2000 + #define E1_STALLCURRENT 1500 + + #define E2_MICROSTEPS 16 + #define E2_OVERCURRENT 2000 + #define E2_STALLCURRENT 1500 + + #define E3_MICROSTEPS 16 + #define E3_OVERCURRENT 2000 + #define E3_STALLCURRENT 1500 + + #define E4_MICROSTEPS 16 + #define E4_OVERCURRENT 2000 + #define E4_STALLCURRENT 1500 + +#endif + +/** + * TWI/I2C BUS + * + * This feature is an EXPERIMENTAL feature so it shall not be used on production + * machines. Enabling this will allow you to send and receive I2C data from slave + * devices on the bus. + * + * ; Example #1 + * ; This macro send the string "Marlin" to the slave device with address 0x63 (99) + * ; It uses multiple M260 commands with one B arg + * M260 A99 ; Target slave address + * M260 B77 ; M + * M260 B97 ; a + * M260 B114 ; r + * M260 B108 ; l + * M260 B105 ; i + * M260 B110 ; n + * M260 S1 ; Send the current buffer + * + * ; Example #2 + * ; Request 6 bytes from slave device with address 0x63 (99) + * M261 A99 B5 + * + * ; Example #3 + * ; Example serial output of a M261 request + * echo:i2c-reply: from:99 bytes:5 data:hello + */ + +// @section i2cbus + +//#define EXPERIMENTAL_I2CBUS +#define I2C_SLAVE_ADDRESS 0 // Set a value from 8 to 127 to act as a slave + +// @section extras + +/** + * Spindle & Laser control + * + * Add the M3, M4, and M5 commands to turn the spindle/laser on and off, and + * to set spindle speed, spindle direction, and laser power. + * + * SuperPid is a router/spindle speed controller used in the CNC milling community. + * Marlin can be used to turn the spindle on and off. It can also be used to set + * the spindle speed from 5,000 to 30,000 RPM. + * + * You'll need to select a pin for the ON/OFF function and optionally choose a 0-5V + * hardware PWM pin for the speed control and a pin for the rotation direction. + * + * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. + */ +//#define SPINDLE_LASER_ENABLE +#if ENABLED(SPINDLE_LASER_ENABLE) + + #define SPINDLE_LASER_ENABLE_INVERT false // set to "true" if the on/off function is reversed + #define SPINDLE_LASER_PWM true // set to true if your controller supports setting the speed/power + #define SPINDLE_LASER_PWM_INVERT true // set to "true" if the speed/power goes up when you want it to go slower + #define SPINDLE_LASER_POWERUP_DELAY 5000 // delay in milliseconds to allow the spindle/laser to come up to speed/power + #define SPINDLE_LASER_POWERDOWN_DELAY 5000 // delay in milliseconds to allow the spindle to stop + #define SPINDLE_DIR_CHANGE true // set to true if your spindle controller supports changing spindle direction + #define SPINDLE_INVERT_DIR false + #define SPINDLE_STOP_ON_DIR_CHANGE true // set to true if Marlin should stop the spindle before changing rotation direction + + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + + //#define SPEED_POWER_SLOPE 0.3922 + //#define SPEED_POWER_INTERCEPT 0 + //#define SPEED_POWER_MIN 10 + //#define SPEED_POWER_MAX 100 // 0-100% +#endif + +/** + * Filament Width Sensor + * + * Measures the filament width in real-time and adjusts + * flow rate to compensate for any irregularities. + * + * Also allows the measured filament diameter to set the + * extrusion rate, so the slicer only has to specify the + * volume. + * + * Only a single extruder is supported at this time. + * + * 34 RAMPS_14 : Analog input 5 on the AUX2 connector + * 81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E) + * 301 RAMBO : Analog input 3 + * + * Note: May require analog pins to be defined for other boards. + */ +//#define FILAMENT_WIDTH_SENSOR + +#if ENABLED(FILAMENT_WIDTH_SENSOR) + #define FILAMENT_SENSOR_EXTRUDER_NUM 0 // Index of the extruder that has the filament sensor. :[0,1,2,3,4] + #define MEASUREMENT_DELAY_CM 14 // (cm) The distance from the filament sensor to the melting chamber + + #define FILWIDTH_ERROR_MARGIN 1.0 // (mm) If a measurement differs too much from nominal width ignore it + #define MAX_MEASUREMENT_DELAY 20 // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM. + + #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially + + // Display filament width on the LCD status line. Status messages will expire after 5 seconds. + //#define FILAMENT_LCD_DISPLAY +#endif + +/** + * CNC Coordinate Systems + * + * Enables G53 and G54-G59.3 commands to select coordinate systems + * and G92.1 to reset the workspace to native machine space. + */ +//#define CNC_COORDINATE_SYSTEMS + +/** + * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins + */ +//#define PINS_DEBUGGING + +/** + * Auto-report temperatures with M155 S + */ +#define AUTO_REPORT_TEMPERATURES + +/** + * Include capabilities in M115 output + */ +#define EXTENDED_CAPABILITIES_REPORT + +/** + * Disable all Volumetric extrusion options + */ +//#define NO_VOLUMETRICS + +#if DISABLED(NO_VOLUMETRICS) + /** + * Volumetric extrusion default state + * Activate to make volumetric extrusion the default method, + * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter. + * + * M200 D0 to disable, M200 Dn to set a new diameter. + */ + //#define VOLUMETRIC_DEFAULT_ON +#endif + +/** + * Enable this option for a leaner build of Marlin that removes all + * workspace offsets, simplifying coordinate transformations, leveling, etc. + * + * - M206 and M428 are disabled. + * - G92 will revert to its behavior from Marlin 1.0. + */ +//#define NO_WORKSPACE_OFFSETS + +/** + * Set the number of proportional font spaces required to fill up a typical character space. + * This can help to better align the output of commands like `G29 O` Mesh Output. + * + * For clients that use a fixed-width font (like OctoPrint), leave this set to 1.0. + * Otherwise, adjust according to your client and font. + */ +#define PROPORTIONAL_FONT_RATIO 1.0 + +/** + * Spend 28 bytes of SRAM to optimize the GCode parser + */ +#define FASTER_GCODE_PARSER + +/** + * User-defined menu items that execute custom GCode + */ +//#define CUSTOM_USER_MENUS +#if ENABLED(CUSTOM_USER_MENUS) + #define USER_SCRIPT_DONE "M117 User Script Done" + #define USER_SCRIPT_AUDIBLE_FEEDBACK + //#define USER_SCRIPT_RETURN // Return to status screen after a script + + #define USER_DESC_1 "Home & UBL Info" + #define USER_GCODE_1 "G28\nG29 W" + + #define USER_DESC_2 "Preheat for PLA" + #define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND) + + #define USER_DESC_3 "Preheat for ABS" + #define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND) + + #define USER_DESC_4 "Heat Bed/Home/Level" + #define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29" + + #define USER_DESC_5 "Home & Info" + #define USER_GCODE_5 "G28\nM503" +#endif + +/** + * Specify an action command to send to the host when the printer is killed. + * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. + * The host must be configured to handle the action command. + */ +//#define ACTION_ON_KILL "poweroff" + +/** + * Specify an action command to send to the host on pause and resume. + * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. + * The host must be configured to handle the action command. + */ +//#define ACTION_ON_PAUSE "pause" +//#define ACTION_ON_RESUME "resume" + +//=========================================================================== +//====================== I2C Position Encoder Settings ====================== +//=========================================================================== + +/** + * I2C position encoders for closed loop control. + * Developed by Chris Barr at Aus3D. + * + * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder + * Github: https://github.com/Aus3D/MagneticEncoder + * + * Supplier: http://aus3d.com.au/magnetic-encoder-module + * Alternative Supplier: http://reliabuild3d.com/ + * + * Reilabuild encoders have been modified to improve reliability. + */ + +//#define I2C_POSITION_ENCODERS +#if ENABLED(I2C_POSITION_ENCODERS) + + #define I2CPE_ENCODER_CNT 1 // The number of encoders installed; max of 5 + // encoders supported currently. + + #define I2CPE_ENC_1_ADDR I2CPE_PRESET_ADDR_X // I2C address of the encoder. 30-200. + #define I2CPE_ENC_1_AXIS X_AXIS // Axis the encoder module is installed on. _AXIS. + #define I2CPE_ENC_1_TYPE I2CPE_ENC_TYPE_LINEAR // Type of encoder: I2CPE_ENC_TYPE_LINEAR -or- + // I2CPE_ENC_TYPE_ROTARY. + #define I2CPE_ENC_1_TICKS_UNIT 2048 // 1024 for magnetic strips with 2mm poles; 2048 for + // 1mm poles. For linear encoders this is ticks / mm, + // for rotary encoders this is ticks / revolution. + //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper + // steps per full revolution (motor steps/rev * microstepping) + //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel. + #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction. + #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the + // printer will attempt to correct the error; errors + // smaller than this are ignored to minimize effects of + // measurement noise / latency (filter). + + #define I2CPE_ENC_2_ADDR I2CPE_PRESET_ADDR_Y // Same as above, but for encoder 2. + #define I2CPE_ENC_2_AXIS Y_AXIS + #define I2CPE_ENC_2_TYPE I2CPE_ENC_TYPE_LINEAR + #define I2CPE_ENC_2_TICKS_UNIT 2048 + //#define I2CPE_ENC_2_TICKS_REV (16 * 200) + //#define I2CPE_ENC_2_INVERT + #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP + #define I2CPE_ENC_2_EC_THRESH 0.10 + + #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options + #define I2CPE_ENC_3_AXIS Z_AXIS // as above, or use defaults below. + + #define I2CPE_ENC_4_ADDR I2CPE_PRESET_ADDR_E // Encoder 4. + #define I2CPE_ENC_4_AXIS E_AXIS + + #define I2CPE_ENC_5_ADDR 34 // Encoder 5. + #define I2CPE_ENC_5_AXIS E_AXIS + + // Default settings for encoders which are enabled, but without settings configured above. + #define I2CPE_DEF_TYPE I2CPE_ENC_TYPE_LINEAR + #define I2CPE_DEF_ENC_TICKS_UNIT 2048 + #define I2CPE_DEF_TICKS_REV (16 * 200) + #define I2CPE_DEF_EC_METHOD I2CPE_ECM_NONE + #define I2CPE_DEF_EC_THRESH 0.1 + + //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given + // axis after which the printer will abort. Comment out to + // disable abort behaviour. + + #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault + // for this amount of time (in ms) before the encoder + // is trusted again. + + /** + * Position is checked every time a new command is executed from the buffer but during long moves, + * this setting determines the minimum update time between checks. A value of 100 works well with + * error rolling average when attempting to correct only for skips and not for vibration. + */ + #define I2CPE_MIN_UPD_TIME_MS 4 // (ms) Minimum time between encoder checks. + + // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise. + #define I2CPE_ERR_ROLLING_AVERAGE + +#endif // I2C_POSITION_ENCODERS + +/** + * MAX7219 Debug Matrix + * + * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status + * display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage. + * + * Fully assembled MAX7219 boards can be found on the internet for under $2(US). + * For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049 + */ +//#define MAX7219_DEBUG +#if ENABLED(MAX7219_DEBUG) + #define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display + #define MAX7219_DIN_PIN 57 // 78 on Re-ARM + #define MAX7219_LOAD_PIN 44 // 79 on Re-ARM + + /** + * Sample debug features + * If you add more debug displays, be careful to avoid conflicts! + */ + #define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning + #define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row + #define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row + + #define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper queue depth on this and the next LED matrix row + // If you experience stuttering, reboots, etc. this option can reveal how + // tweaks made to the configuration are affecting the printer in real-time. +#endif + +/** + * NanoDLP Sync support + * + * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp" + * string to enable synchronization with DLP projector exposure. This change will allow to use + * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands + */ +//#define NANODLP_Z_SYNC +#if ENABLED(NANODLP_Z_SYNC) + //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. + // Default behaviour is limited to Z axis only. +#endif + +#endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/Creality/Ender-2/Configuration.h b/Marlin/example_configurations/Creality/Ender-2/Configuration.h index 0dd8b2b4fd..d0dd4d785b 100644 --- a/Marlin/example_configurations/Creality/Ender-2/Configuration.h +++ b/Marlin/example_configurations/Creality/Ender-2/Configuration.h @@ -307,6 +307,7 @@ #define TEMP_SENSOR_3 0 #define TEMP_SENSOR_4 0 #define TEMP_SENSOR_BED 1 +#define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -393,23 +394,30 @@ //=========================================================================== //============================= PID > Bed Temperature Control =============== //=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ //#define PIDTEMPBED //#define BED_LIMIT_SWITCHING -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #if ENABLED(PIDTEMPBED) @@ -649,7 +657,7 @@ /** * Z Servo Probe, such as an endstop switch on a rotating arm. */ -//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles /** @@ -668,6 +676,9 @@ * readings with inductive probes and piezo sensors. */ //#define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif //#define PROBING_FANS_OFF // Turn fans off when probing //#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors @@ -740,6 +751,8 @@ #define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points //#define Z_AFTER_PROBING 5 // Z position after probing is done +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + // For M851 give a range for adjusting the Z probe offset #define Z_PROBE_OFFSET_RANGE_MIN -20 #define Z_PROBE_OFFSET_RANGE_MAX 20 @@ -840,6 +853,10 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + /** * Filament Runout Sensors * Mechanical or opto endstops are used to check for the presence of filament. @@ -1030,6 +1047,11 @@ // Add a menu item to move between bed corners for manual bed adjustment //#define LEVEL_BED_CORNERS +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + /** * Commands to execute at the end of G29 probing. * Useful to retract or move the Z probe out of the way. diff --git a/Marlin/example_configurations/Creality/Ender-2/Configuration_adv.h b/Marlin/example_configurations/Creality/Ender-2/Configuration_adv.h index ac41eaabd9..87e54ed3ef 100644 --- a/Marlin/example_configurations/Creality/Ender-2/Configuration_adv.h +++ b/Marlin/example_configurations/Creality/Ender-2/Configuration_adv.h @@ -230,6 +230,7 @@ #define E2_AUTO_FAN_PIN -1 #define E3_AUTO_FAN_PIN -1 #define E4_AUTO_FAN_PIN -1 +#define CHAMBER_AUTO_FAN_PIN -1 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50 #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed @@ -554,6 +555,16 @@ // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART + /** + * Continue after Power-Loss (Creality3D) + * + * Store the current state to the SD Card at the start of each layer + * during SD printing. If the recovery file is found at boot time, present + * an option on the LCD screen to continue the print from the last-known + * point in the file. + */ + //#define POWER_LOSS_RECOVERY + /** * Sort SD file listings in alphabetical order. * @@ -899,38 +910,44 @@ */ //#define ADVANCED_PAUSE_FEATURE #if ENABLED(ADVANCED_PAUSE_FEATURE) - #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_LENGTH 100 // (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_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast. - #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (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_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate. - #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (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. - - // Filament Unload does a Retract, Delay, and Purge first: - #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. - #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. - - //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. - //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) + #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_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. + // 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. + // 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_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. + // 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. + // 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. + + // Filament Unload does a Retract, Delay, and Purge first: + #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. + #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. + + //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) #endif // @section tmc diff --git a/Marlin/example_configurations/Creality/Ender-4/Configuration.h b/Marlin/example_configurations/Creality/Ender-4/Configuration.h index fcd93ef6b6..07de606990 100644 --- a/Marlin/example_configurations/Creality/Ender-4/Configuration.h +++ b/Marlin/example_configurations/Creality/Ender-4/Configuration.h @@ -307,6 +307,7 @@ #define TEMP_SENSOR_3 0 #define TEMP_SENSOR_4 0 #define TEMP_SENSOR_BED 1 +#define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -394,23 +395,30 @@ //=========================================================================== //============================= PID > Bed Temperature Control =============== //=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ //#define PIDTEMPBED //#define BED_LIMIT_SWITCHING -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #if ENABLED(PIDTEMPBED) @@ -655,7 +663,7 @@ /** * Z Servo Probe, such as an endstop switch on a rotating arm. */ -//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles /** @@ -674,6 +682,9 @@ * readings with inductive probes and piezo sensors. */ //#define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif //#define PROBING_FANS_OFF // Turn fans off when probing //#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors @@ -746,6 +757,8 @@ #define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points //#define Z_AFTER_PROBING 5 // Z position after probing is done +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + // For M851 give a range for adjusting the Z probe offset #define Z_PROBE_OFFSET_RANGE_MIN -20 #define Z_PROBE_OFFSET_RANGE_MAX 20 @@ -846,6 +859,10 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + /** * Filament Runout Sensors * Mechanical or opto endstops are used to check for the presence of filament. @@ -1036,6 +1053,11 @@ // Add a menu item to move between bed corners for manual bed adjustment //#define LEVEL_BED_CORNERS +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + /** * Commands to execute at the end of G29 probing. * Useful to retract or move the Z probe out of the way. diff --git a/Marlin/example_configurations/Creality/Ender-4/Configuration_adv.h b/Marlin/example_configurations/Creality/Ender-4/Configuration_adv.h index d36a75c79e..cc6fe60f68 100644 --- a/Marlin/example_configurations/Creality/Ender-4/Configuration_adv.h +++ b/Marlin/example_configurations/Creality/Ender-4/Configuration_adv.h @@ -230,6 +230,7 @@ #define E2_AUTO_FAN_PIN -1 #define E3_AUTO_FAN_PIN -1 #define E4_AUTO_FAN_PIN -1 +#define CHAMBER_AUTO_FAN_PIN -1 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50 #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed @@ -554,6 +555,16 @@ // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART + /** + * Continue after Power-Loss (Creality3D) + * + * Store the current state to the SD Card at the start of each layer + * during SD printing. If the recovery file is found at boot time, present + * an option on the LCD screen to continue the print from the last-known + * point in the file. + */ + //#define POWER_LOSS_RECOVERY + /** * Sort SD file listings in alphabetical order. * @@ -899,38 +910,44 @@ */ //#define ADVANCED_PAUSE_FEATURE #if ENABLED(ADVANCED_PAUSE_FEATURE) - #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_LENGTH 100 // (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_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast. - #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (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_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate. - #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (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. - - // Filament Unload does a Retract, Delay, and Purge first: - #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. - #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. - - //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. - //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) + #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_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. + // 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. + // 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_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. + // 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. + // 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. + + // Filament Unload does a Retract, Delay, and Purge first: + #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. + #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. + + //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) #endif // @section tmc diff --git a/Marlin/example_configurations/Felix/Configuration.h b/Marlin/example_configurations/Felix/Configuration.h index b8c8463332..a0816de203 100644 --- a/Marlin/example_configurations/Felix/Configuration.h +++ b/Marlin/example_configurations/Felix/Configuration.h @@ -307,6 +307,7 @@ #define TEMP_SENSOR_3 0 #define TEMP_SENSOR_4 0 #define TEMP_SENSOR_BED 1 +#define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -377,23 +378,30 @@ //=========================================================================== //============================= PID > Bed Temperature Control =============== //=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ #define PIDTEMPBED //#define BED_LIMIT_SWITCHING -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #if ENABLED(PIDTEMPBED) @@ -627,7 +635,7 @@ /** * Z Servo Probe, such as an endstop switch on a rotating arm. */ -//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles /** @@ -646,6 +654,9 @@ * readings with inductive probes and piezo sensors. */ //#define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif //#define PROBING_FANS_OFF // Turn fans off when probing //#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors @@ -718,6 +729,8 @@ #define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points //#define Z_AFTER_PROBING 5 // Z position after probing is done +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + // For M851 give a range for adjusting the Z probe offset #define Z_PROBE_OFFSET_RANGE_MIN -20 #define Z_PROBE_OFFSET_RANGE_MAX 20 @@ -818,6 +831,10 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + /** * Filament Runout Sensors * Mechanical or opto endstops are used to check for the presence of filament. @@ -1008,6 +1025,11 @@ // Add a menu item to move between bed corners for manual bed adjustment //#define LEVEL_BED_CORNERS +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + /** * Commands to execute at the end of G29 probing. * Useful to retract or move the Z probe out of the way. diff --git a/Marlin/example_configurations/Felix/Configuration_adv.h b/Marlin/example_configurations/Felix/Configuration_adv.h index 12afdd756a..1ee9762148 100644 --- a/Marlin/example_configurations/Felix/Configuration_adv.h +++ b/Marlin/example_configurations/Felix/Configuration_adv.h @@ -230,6 +230,7 @@ #define E2_AUTO_FAN_PIN -1 #define E3_AUTO_FAN_PIN -1 #define E4_AUTO_FAN_PIN -1 +#define CHAMBER_AUTO_FAN_PIN -1 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50 #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed @@ -554,6 +555,16 @@ // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART + /** + * Continue after Power-Loss (Creality3D) + * + * Store the current state to the SD Card at the start of each layer + * during SD printing. If the recovery file is found at boot time, present + * an option on the LCD screen to continue the print from the last-known + * point in the file. + */ + //#define POWER_LOSS_RECOVERY + /** * Sort SD file listings in alphabetical order. * @@ -899,38 +910,44 @@ */ //#define ADVANCED_PAUSE_FEATURE #if ENABLED(ADVANCED_PAUSE_FEATURE) - #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_LENGTH 100 // (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_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast. - #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (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_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate. - #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (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. - - // Filament Unload does a Retract, Delay, and Purge first: - #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. - #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. - - //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. - //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) + #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_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. + // 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. + // 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_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. + // 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. + // 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. + + // Filament Unload does a Retract, Delay, and Purge first: + #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. + #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. + + //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) #endif // @section tmc diff --git a/Marlin/example_configurations/Felix/DUAL/Configuration.h b/Marlin/example_configurations/Felix/DUAL/Configuration.h index 4070678d2f..140a6d074a 100644 --- a/Marlin/example_configurations/Felix/DUAL/Configuration.h +++ b/Marlin/example_configurations/Felix/DUAL/Configuration.h @@ -307,6 +307,7 @@ #define TEMP_SENSOR_3 0 #define TEMP_SENSOR_4 0 #define TEMP_SENSOR_BED 1 +#define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -377,23 +378,30 @@ //=========================================================================== //============================= PID > Bed Temperature Control =============== //=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ #define PIDTEMPBED //#define BED_LIMIT_SWITCHING -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #if ENABLED(PIDTEMPBED) @@ -627,7 +635,7 @@ /** * Z Servo Probe, such as an endstop switch on a rotating arm. */ -//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles /** @@ -646,6 +654,9 @@ * readings with inductive probes and piezo sensors. */ //#define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif //#define PROBING_FANS_OFF // Turn fans off when probing //#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors @@ -718,6 +729,8 @@ #define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points //#define Z_AFTER_PROBING 5 // Z position after probing is done +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + // For M851 give a range for adjusting the Z probe offset #define Z_PROBE_OFFSET_RANGE_MIN -20 #define Z_PROBE_OFFSET_RANGE_MAX 20 @@ -818,6 +831,10 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + /** * Filament Runout Sensors * Mechanical or opto endstops are used to check for the presence of filament. @@ -1008,6 +1025,11 @@ // Add a menu item to move between bed corners for manual bed adjustment //#define LEVEL_BED_CORNERS +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + /** * Commands to execute at the end of G29 probing. * Useful to retract or move the Z probe out of the way. diff --git a/Marlin/example_configurations/FolgerTech/i3-2020/Configuration.h b/Marlin/example_configurations/FolgerTech/i3-2020/Configuration.h index 390cff69cd..75cae43727 100644 --- a/Marlin/example_configurations/FolgerTech/i3-2020/Configuration.h +++ b/Marlin/example_configurations/FolgerTech/i3-2020/Configuration.h @@ -307,6 +307,7 @@ #define TEMP_SENSOR_3 0 #define TEMP_SENSOR_4 0 #define TEMP_SENSOR_BED 1 +#define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -394,23 +395,30 @@ //=========================================================================== //============================= PID > Bed Temperature Control =============== //=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ #define PIDTEMPBED //#define BED_LIMIT_SWITCHING -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #if ENABLED(PIDTEMPBED) @@ -651,7 +659,7 @@ /** * Z Servo Probe, such as an endstop switch on a rotating arm. */ -#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector. +#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. #define Z_SERVO_ANGLES {40,85} // Z Servo Deploy and Stow angles /** @@ -670,6 +678,9 @@ * readings with inductive probes and piezo sensors. */ //#define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif //#define PROBING_FANS_OFF // Turn fans off when probing //#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors @@ -705,7 +716,7 @@ */ #define X_PROBE_OFFSET_FROM_EXTRUDER 38 // X offset: -left +right [of the nozzle] #define Y_PROBE_OFFSET_FROM_EXTRUDER -7 // Y offset: -front +behind [the nozzle] -#define Z_PROBE_OFFSET_FROM_EXTRUDER -10.30 // Z offset: -below +above [the nozzle] +#define Z_PROBE_OFFSET_FROM_EXTRUDER -10.75 // Z offset: -below +above [the nozzle] // Certain types of probes need to stay away from edges #define MIN_PROBE_EDGE 0 @@ -742,6 +753,8 @@ #define Z_CLEARANCE_BETWEEN_PROBES 3 // Z Clearance between probe points //#define Z_AFTER_PROBING 3 // Z position after probing is done +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + // For M851 give a range for adjusting the Z probe offset #define Z_PROBE_OFFSET_RANGE_MIN -20 #define Z_PROBE_OFFSET_RANGE_MAX 20 @@ -842,6 +855,10 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + /** * Filament Runout Sensors * Mechanical or opto endstops are used to check for the presence of filament. @@ -1050,6 +1067,11 @@ // Add a menu item to move between bed corners for manual bed adjustment //#define LEVEL_BED_CORNERS +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + /** * Commands to execute at the end of G29 probing. * Useful to retract or move the Z probe out of the way. diff --git a/Marlin/example_configurations/FolgerTech/i3-2020/Configuration_adv.h b/Marlin/example_configurations/FolgerTech/i3-2020/Configuration_adv.h index 77eec736ea..4b73b737ea 100644 --- a/Marlin/example_configurations/FolgerTech/i3-2020/Configuration_adv.h +++ b/Marlin/example_configurations/FolgerTech/i3-2020/Configuration_adv.h @@ -230,6 +230,7 @@ #define E2_AUTO_FAN_PIN -1 #define E3_AUTO_FAN_PIN -1 #define E4_AUTO_FAN_PIN -1 +#define CHAMBER_AUTO_FAN_PIN -1 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50 #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed @@ -472,7 +473,8 @@ //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 -// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS +// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS. +// These correspond to the physical drivers, so be mindful if the order is changed. #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO //=========================================================================== @@ -553,6 +555,16 @@ // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART + /** + * Continue after Power-Loss (Creality3D) + * + * Store the current state to the SD Card at the start of each layer + * during SD printing. If the recovery file is found at boot time, present + * an option on the LCD screen to continue the print from the last-known + * point in the file. + */ + //#define POWER_LOSS_RECOVERY + /** * Sort SD file listings in alphabetical order. * @@ -898,38 +910,44 @@ */ #define ADVANCED_PAUSE_FEATURE #if ENABLED(ADVANCED_PAUSE_FEATURE) - #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_LENGTH 100 // (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_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast. - #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (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_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate. - #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (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. - - // Filament Unload does a Retract, Delay, and Purge first: - #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. - #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. - - #define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. - //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) + #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_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. + // 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. + // 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_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. + // 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. + // 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. + + // Filament Unload does a Retract, Delay, and Purge first: + #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. + #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. + + #define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) #endif // @section tmc diff --git a/Marlin/example_configurations/Geeetech/GT2560/Configuration.h b/Marlin/example_configurations/Geeetech/GT2560/Configuration.h index e5e3f10f82..f497d01bdc 100644 --- a/Marlin/example_configurations/Geeetech/GT2560/Configuration.h +++ b/Marlin/example_configurations/Geeetech/GT2560/Configuration.h @@ -307,6 +307,7 @@ #define TEMP_SENSOR_3 0 #define TEMP_SENSOR_4 0 #define TEMP_SENSOR_BED 1 +#define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -399,23 +400,30 @@ //=========================================================================== //============================= PID > Bed Temperature Control =============== //=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ //#define PIDTEMPBED //#define BED_LIMIT_SWITCHING -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #if ENABLED(PIDTEMPBED) @@ -660,7 +668,7 @@ /** * Z Servo Probe, such as an endstop switch on a rotating arm. */ -//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles /** @@ -679,6 +687,9 @@ * readings with inductive probes and piezo sensors. */ //#define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif //#define PROBING_FANS_OFF // Turn fans off when probing //#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors @@ -751,6 +762,8 @@ #define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points //#define Z_AFTER_PROBING 5 // Z position after probing is done +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + // For M851 give a range for adjusting the Z probe offset #define Z_PROBE_OFFSET_RANGE_MIN -20 #define Z_PROBE_OFFSET_RANGE_MAX 20 @@ -851,6 +864,10 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + /** * Filament Runout Sensors * Mechanical or opto endstops are used to check for the presence of filament. @@ -1041,6 +1058,11 @@ // Add a menu item to move between bed corners for manual bed adjustment //#define LEVEL_BED_CORNERS +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + /** * Commands to execute at the end of G29 probing. * Useful to retract or move the Z probe out of the way. diff --git a/Marlin/example_configurations/Geeetech/I3_Pro_X-GT2560/Configuration.h b/Marlin/example_configurations/Geeetech/I3_Pro_X-GT2560/Configuration.h index b4d0349ae6..90bc590ab3 100644 --- a/Marlin/example_configurations/Geeetech/I3_Pro_X-GT2560/Configuration.h +++ b/Marlin/example_configurations/Geeetech/I3_Pro_X-GT2560/Configuration.h @@ -307,6 +307,7 @@ #define TEMP_SENSOR_3 0 #define TEMP_SENSOR_4 0 #define TEMP_SENSOR_BED 1 +#define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -389,23 +390,30 @@ //=========================================================================== //============================= PID > Bed Temperature Control =============== //=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ //#define PIDTEMPBED //#define BED_LIMIT_SWITCHING -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #if ENABLED(PIDTEMPBED) @@ -645,7 +653,7 @@ /** * Z Servo Probe, such as an endstop switch on a rotating arm. */ -//#define Z_ENDSTOP_SERVO_NR 1 // Defaults to SERVO 0 connector. +//#define Z_PROBE_SERVO_NR 1 // Defaults to SERVO 0 connector. //#define Z_SERVO_ANGLES {10,90} // Z Servo Deploy and Stow angles /** @@ -664,6 +672,9 @@ * readings with inductive probes and piezo sensors. */ //#define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif //#define PROBING_FANS_OFF // Turn fans off when probing //#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors @@ -736,6 +747,8 @@ #define Z_CLEARANCE_BETWEEN_PROBES 6 // Z Clearance between probe points //#define Z_AFTER_PROBING 6 // Z position after probing is done +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + // For M851 give a range for adjusting the Z probe offset #define Z_PROBE_OFFSET_RANGE_MIN -20 #define Z_PROBE_OFFSET_RANGE_MAX 20 @@ -836,6 +849,10 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + /** * Filament Runout Sensors * Mechanical or opto endstops are used to check for the presence of filament. @@ -1026,6 +1043,11 @@ // Add a menu item to move between bed corners for manual bed adjustment //#define LEVEL_BED_CORNERS +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + /** * Commands to execute at the end of G29 probing. * Useful to retract or move the Z probe out of the way. diff --git a/Marlin/example_configurations/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h b/Marlin/example_configurations/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h index c5cc66cfea..419bf4d254 100644 --- a/Marlin/example_configurations/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h +++ b/Marlin/example_configurations/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h @@ -307,6 +307,7 @@ #define TEMP_SENSOR_3 0 #define TEMP_SENSOR_4 0 #define TEMP_SENSOR_BED 1 +#define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -399,23 +400,30 @@ //=========================================================================== //============================= PID > Bed Temperature Control =============== //=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ //#define PIDTEMPBED //#define BED_LIMIT_SWITCHING -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #if ENABLED(PIDTEMPBED) @@ -661,7 +669,7 @@ /** * Z Servo Probe, such as an endstop switch on a rotating arm. */ -//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles /** @@ -680,6 +688,9 @@ * readings with inductive probes and piezo sensors. */ #define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif #define PROBING_FANS_OFF // Turn fans off when probing #define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors @@ -752,6 +763,8 @@ #define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points //#define Z_AFTER_PROBING 5 // Z position after probing is done +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + // For M851 give a range for adjusting the Z probe offset #define Z_PROBE_OFFSET_RANGE_MIN -20 #define Z_PROBE_OFFSET_RANGE_MAX 20 @@ -852,6 +865,10 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + /** * Filament Runout Sensors * Mechanical or opto endstops are used to check for the presence of filament. @@ -1042,6 +1059,11 @@ // Add a menu item to move between bed corners for manual bed adjustment #define LEVEL_BED_CORNERS +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + /** * Commands to execute at the end of G29 probing. * Useful to retract or move the Z probe out of the way. diff --git a/Marlin/example_configurations/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h b/Marlin/example_configurations/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h index 8c8bde7004..10ba539c24 100644 --- a/Marlin/example_configurations/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h +++ b/Marlin/example_configurations/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h @@ -307,6 +307,7 @@ #define TEMP_SENSOR_3 0 #define TEMP_SENSOR_4 0 #define TEMP_SENSOR_BED 1 +#define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -399,23 +400,30 @@ //=========================================================================== //============================= PID > Bed Temperature Control =============== //=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ //#define PIDTEMPBED //#define BED_LIMIT_SWITCHING -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #if ENABLED(PIDTEMPBED) @@ -660,7 +668,7 @@ /** * Z Servo Probe, such as an endstop switch on a rotating arm. */ -//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles /** @@ -678,7 +686,10 @@ * These options are most useful for the BLTouch probe, but may also improve * readings with inductive probes and piezo sensors. */ -//#define PROBING_HEATERS_OFF // Turn heaters off when probing +#define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif //#define PROBING_FANS_OFF // Turn fans off when probing //#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors @@ -751,6 +762,8 @@ #define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points //#define Z_AFTER_PROBING 5 // Z position after probing is done +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + // For M851 give a range for adjusting the Z probe offset #define Z_PROBE_OFFSET_RANGE_MIN -20 #define Z_PROBE_OFFSET_RANGE_MAX 20 @@ -851,6 +864,10 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + /** * Filament Runout Sensors * Mechanical or opto endstops are used to check for the presence of filament. @@ -1041,6 +1058,11 @@ // Add a menu item to move between bed corners for manual bed adjustment #define LEVEL_BED_CORNERS +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + /** * Commands to execute at the end of G29 probing. * Useful to retract or move the Z probe out of the way. diff --git a/Marlin/example_configurations/Infitary/i3-M508/Configuration.h b/Marlin/example_configurations/Infitary/i3-M508/Configuration.h index fb5ae0b513..ea7fd542ac 100644 --- a/Marlin/example_configurations/Infitary/i3-M508/Configuration.h +++ b/Marlin/example_configurations/Infitary/i3-M508/Configuration.h @@ -307,6 +307,7 @@ #define TEMP_SENSOR_3 0 #define TEMP_SENSOR_4 0 #define TEMP_SENSOR_BED 1 +#define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -393,23 +394,30 @@ //=========================================================================== //============================= PID > Bed Temperature Control =============== //=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ //#define PIDTEMPBED //#define BED_LIMIT_SWITCHING -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #if ENABLED(PIDTEMPBED) @@ -649,7 +657,7 @@ /** * Z Servo Probe, such as an endstop switch on a rotating arm. */ -//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles /** @@ -668,6 +676,9 @@ * readings with inductive probes and piezo sensors. */ //#define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif //#define PROBING_FANS_OFF // Turn fans off when probing //#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors @@ -740,6 +751,8 @@ #define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points //#define Z_AFTER_PROBING 5 // Z position after probing is done +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + // For M851 give a range for adjusting the Z probe offset #define Z_PROBE_OFFSET_RANGE_MIN -20 #define Z_PROBE_OFFSET_RANGE_MAX 20 @@ -840,6 +853,10 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + /** * Filament Runout Sensors * Mechanical or opto endstops are used to check for the presence of filament. @@ -1030,6 +1047,11 @@ // Add a menu item to move between bed corners for manual bed adjustment //#define LEVEL_BED_CORNERS +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + /** * Commands to execute at the end of G29 probing. * Useful to retract or move the Z probe out of the way. diff --git a/Marlin/example_configurations/Infitary/i3-M508/Configuration_adv.h b/Marlin/example_configurations/Infitary/i3-M508/Configuration_adv.h index 1d27c07d46..c393699428 100644 --- a/Marlin/example_configurations/Infitary/i3-M508/Configuration_adv.h +++ b/Marlin/example_configurations/Infitary/i3-M508/Configuration_adv.h @@ -230,6 +230,7 @@ #define E2_AUTO_FAN_PIN -1 #define E3_AUTO_FAN_PIN -1 #define E4_AUTO_FAN_PIN -1 +#define CHAMBER_AUTO_FAN_PIN -1 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50 #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed @@ -554,6 +555,16 @@ // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART + /** + * Continue after Power-Loss (Creality3D) + * + * Store the current state to the SD Card at the start of each layer + * during SD printing. If the recovery file is found at boot time, present + * an option on the LCD screen to continue the print from the last-known + * point in the file. + */ + //#define POWER_LOSS_RECOVERY + /** * Sort SD file listings in alphabetical order. * @@ -899,38 +910,44 @@ */ //#define ADVANCED_PAUSE_FEATURE #if ENABLED(ADVANCED_PAUSE_FEATURE) - #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_LENGTH 100 // (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_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast. - #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (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_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate. - #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (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. - - // Filament Unload does a Retract, Delay, and Purge first: - #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. - #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. - - //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. - //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) + #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_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. + // 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. + // 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_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. + // 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. + // 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. + + // Filament Unload does a Retract, Delay, and Purge first: + #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. + #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. + + //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) #endif // @section tmc diff --git a/Marlin/example_configurations/JGAurora/A5/Configuration.h b/Marlin/example_configurations/JGAurora/A5/Configuration.h index 44ff1c9c05..14d3923bbc 100644 --- a/Marlin/example_configurations/JGAurora/A5/Configuration.h +++ b/Marlin/example_configurations/JGAurora/A5/Configuration.h @@ -312,6 +312,7 @@ #define TEMP_SENSOR_3 0 #define TEMP_SENSOR_4 0 #define TEMP_SENSOR_BED 1 // measured to be satisfactorily accurate on centre of bed within +/- 1 degC. +#define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -399,23 +400,30 @@ //=========================================================================== //============================= PID > Bed Temperature Control =============== //=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ //#define PIDTEMPBED //#define BED_LIMIT_SWITCHING -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #if ENABLED(PIDTEMPBED) @@ -657,7 +665,7 @@ /** * Z Servo Probe, such as an endstop switch on a rotating arm. */ -//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles /** @@ -676,6 +684,9 @@ * readings with inductive probes and piezo sensors. */ //#define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif //#define PROBING_FANS_OFF // Turn fans off when probing //#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors @@ -748,6 +759,8 @@ #define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points //#define Z_AFTER_PROBING 5 // Z position after probing is done +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + // For M851 give a range for adjusting the Z probe offset #define Z_PROBE_OFFSET_RANGE_MIN -20 #define Z_PROBE_OFFSET_RANGE_MAX 20 @@ -848,6 +861,10 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + /** * Filament Runout Sensors * Mechanical or opto endstops are used to check for the presence of filament. @@ -1037,6 +1054,11 @@ // Add a menu item to move between bed corners for manual bed adjustment #define LEVEL_BED_CORNERS +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + /** * Commands to execute at the end of G29 probing. * Useful to retract or move the Z probe out of the way. diff --git a/Marlin/example_configurations/JGAurora/A5/Configuration_adv.h b/Marlin/example_configurations/JGAurora/A5/Configuration_adv.h index 3a1c7b34e1..eb7446c92d 100644 --- a/Marlin/example_configurations/JGAurora/A5/Configuration_adv.h +++ b/Marlin/example_configurations/JGAurora/A5/Configuration_adv.h @@ -230,6 +230,7 @@ #define E2_AUTO_FAN_PIN -1 #define E3_AUTO_FAN_PIN -1 #define E4_AUTO_FAN_PIN -1 +#define CHAMBER_AUTO_FAN_PIN -1 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50 #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed @@ -554,6 +555,16 @@ // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART + /** + * Continue after Power-Loss (Creality3D) + * + * Store the current state to the SD Card at the start of each layer + * during SD printing. If the recovery file is found at boot time, present + * an option on the LCD screen to continue the print from the last-known + * point in the file. + */ + //#define POWER_LOSS_RECOVERY + /** * Sort SD file listings in alphabetical order. * @@ -899,38 +910,44 @@ */ #define ADVANCED_PAUSE_FEATURE #if ENABLED(ADVANCED_PAUSE_FEATURE) - #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_LENGTH 100 // (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_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast. - #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (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_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate. - #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (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. - - // Filament Unload does a Retract, Delay, and Purge first: - #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. - #define FILAMENT_UNLOAD_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 PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety. - #define FILAMENT_CHANGE_ALERT_BEEPS 6 // 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 PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. - #define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) + #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_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. + // 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. + // 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_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. + // 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. + // 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. + + // Filament Unload does a Retract, Delay, and Purge first: + #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. + #define FILAMENT_UNLOAD_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 PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety. + #define FILAMENT_CHANGE_ALERT_BEEPS 6 // 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 PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. + #define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) #endif // @section tmc diff --git a/Marlin/example_configurations/Malyan/M150/Configuration.h b/Marlin/example_configurations/Malyan/M150/Configuration.h index 28c02ebad3..f5dbe14fb8 100644 --- a/Marlin/example_configurations/Malyan/M150/Configuration.h +++ b/Marlin/example_configurations/Malyan/M150/Configuration.h @@ -315,6 +315,7 @@ // For Malyan M150, some discussions around changing the TEMP_SENSOR_BED from 1 to 3 on a french discussion board. // The reasons are inconclusive so I leave at 1 #define TEMP_SENSOR_BED 1 +#define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -397,23 +398,30 @@ //=========================================================================== //============================= PID > Bed Temperature Control =============== //=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ //#define PIDTEMPBED //#define BED_LIMIT_SWITCHING -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #if ENABLED(PIDTEMPBED) @@ -665,7 +673,7 @@ /** * Z Servo Probe, such as an endstop switch on a rotating arm. */ -//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles /** @@ -684,6 +692,9 @@ * readings with inductive probes and piezo sensors. */ //#define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif //#define PROBING_FANS_OFF // Turn fans off when probing //#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors @@ -760,6 +771,8 @@ //#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points //#define Z_AFTER_PROBING 5 // Z position after probing is done +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + // For M851 give a range for adjusting the Z probe offset //#define Z_PROBE_OFFSET_RANGE_MIN -20 //#define Z_PROBE_OFFSET_RANGE_MAX 20 @@ -860,6 +873,10 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + /** * Filament Runout Sensors * Mechanical or opto endstops are used to check for the presence of filament. @@ -1065,6 +1082,11 @@ // Add a menu item to move between bed corners for manual bed adjustment //#define LEVEL_BED_CORNERS +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + /** * Commands to execute at the end of G29 probing. * Useful to retract or move the Z probe out of the way. diff --git a/Marlin/example_configurations/Malyan/M150/Configuration_adv.h b/Marlin/example_configurations/Malyan/M150/Configuration_adv.h index 625e101287..57f3f6993f 100644 --- a/Marlin/example_configurations/Malyan/M150/Configuration_adv.h +++ b/Marlin/example_configurations/Malyan/M150/Configuration_adv.h @@ -230,6 +230,7 @@ #define E2_AUTO_FAN_PIN -1 #define E3_AUTO_FAN_PIN -1 #define E4_AUTO_FAN_PIN -1 +#define CHAMBER_AUTO_FAN_PIN -1 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50 #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed @@ -554,6 +555,16 @@ // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART + /** + * Continue after Power-Loss (Creality3D) + * + * Store the current state to the SD Card at the start of each layer + * during SD printing. If the recovery file is found at boot time, present + * an option on the LCD screen to continue the print from the last-known + * point in the file. + */ + //#define POWER_LOSS_RECOVERY + /** * Sort SD file listings in alphabetical order. * @@ -899,38 +910,44 @@ */ //#define ADVANCED_PAUSE_FEATURE #if ENABLED(ADVANCED_PAUSE_FEATURE) - #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_LENGTH 100 // (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_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast. - #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (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_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate. - #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (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. - - // Filament Unload does a Retract, Delay, and Purge first: - #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. - #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. - - //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. - //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) + #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_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. + // 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. + // 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_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. + // 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. + // 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. + + // Filament Unload does a Retract, Delay, and Purge first: + #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. + #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. + + //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) #endif // @section tmc diff --git a/Marlin/example_configurations/Micromake/C1/basic/Configuration.h b/Marlin/example_configurations/Micromake/C1/basic/Configuration.h index 2f9b0c8f9b..a9c245d4e3 100644 --- a/Marlin/example_configurations/Micromake/C1/basic/Configuration.h +++ b/Marlin/example_configurations/Micromake/C1/basic/Configuration.h @@ -307,6 +307,7 @@ #define TEMP_SENSOR_3 0 #define TEMP_SENSOR_4 0 #define TEMP_SENSOR_BED 0 +#define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -389,23 +390,30 @@ //=========================================================================== //============================= PID > Bed Temperature Control =============== //=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ //#define PIDTEMPBED //#define BED_LIMIT_SWITCHING -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #if ENABLED(PIDTEMPBED) @@ -649,7 +657,7 @@ /** * Z Servo Probe, such as an endstop switch on a rotating arm. */ -//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles /** @@ -668,6 +676,9 @@ * readings with inductive probes and piezo sensors. */ //#define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif //#define PROBING_FANS_OFF // Turn fans off when probing //#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors @@ -740,6 +751,8 @@ #define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points //#define Z_AFTER_PROBING 5 // Z position after probing is done +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + // For M851 give a range for adjusting the Z probe offset #define Z_PROBE_OFFSET_RANGE_MIN -20 #define Z_PROBE_OFFSET_RANGE_MAX 20 @@ -840,6 +853,10 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + /** * Filament Runout Sensors * Mechanical or opto endstops are used to check for the presence of filament. @@ -1030,6 +1047,11 @@ // Add a menu item to move between bed corners for manual bed adjustment //#define LEVEL_BED_CORNERS +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + /** * Commands to execute at the end of G29 probing. * Useful to retract or move the Z probe out of the way. diff --git a/Marlin/example_configurations/Micromake/C1/enhanced/Configuration.h b/Marlin/example_configurations/Micromake/C1/enhanced/Configuration.h index 4999bd98dc..c8858dbc16 100644 --- a/Marlin/example_configurations/Micromake/C1/enhanced/Configuration.h +++ b/Marlin/example_configurations/Micromake/C1/enhanced/Configuration.h @@ -307,6 +307,7 @@ #define TEMP_SENSOR_3 0 #define TEMP_SENSOR_4 0 #define TEMP_SENSOR_BED 0 +#define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -389,23 +390,30 @@ //=========================================================================== //============================= PID > Bed Temperature Control =============== //=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ //#define PIDTEMPBED //#define BED_LIMIT_SWITCHING -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #if ENABLED(PIDTEMPBED) @@ -649,7 +657,7 @@ /** * Z Servo Probe, such as an endstop switch on a rotating arm. */ -//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles /** @@ -668,6 +676,9 @@ * readings with inductive probes and piezo sensors. */ //#define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif //#define PROBING_FANS_OFF // Turn fans off when probing //#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors @@ -740,6 +751,8 @@ #define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points //#define Z_AFTER_PROBING 5 // Z position after probing is done +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + // For M851 give a range for adjusting the Z probe offset #define Z_PROBE_OFFSET_RANGE_MIN -20 #define Z_PROBE_OFFSET_RANGE_MAX 20 @@ -840,6 +853,10 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + /** * Filament Runout Sensors * Mechanical or opto endstops are used to check for the presence of filament. @@ -1030,6 +1047,11 @@ // Add a menu item to move between bed corners for manual bed adjustment //#define LEVEL_BED_CORNERS +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + /** * Commands to execute at the end of G29 probing. * Useful to retract or move the Z probe out of the way. diff --git a/Marlin/example_configurations/Micromake/C1/enhanced/Configuration_adv.h b/Marlin/example_configurations/Micromake/C1/enhanced/Configuration_adv.h index aec0442a03..c7ad569b8e 100644 --- a/Marlin/example_configurations/Micromake/C1/enhanced/Configuration_adv.h +++ b/Marlin/example_configurations/Micromake/C1/enhanced/Configuration_adv.h @@ -230,6 +230,7 @@ #define E2_AUTO_FAN_PIN -1 #define E3_AUTO_FAN_PIN -1 #define E4_AUTO_FAN_PIN -1 +#define CHAMBER_AUTO_FAN_PIN -1 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50 #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed @@ -554,6 +555,16 @@ // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART + /** + * Continue after Power-Loss (Creality3D) + * + * Store the current state to the SD Card at the start of each layer + * during SD printing. If the recovery file is found at boot time, present + * an option on the LCD screen to continue the print from the last-known + * point in the file. + */ + //#define POWER_LOSS_RECOVERY + /** * Sort SD file listings in alphabetical order. * @@ -899,38 +910,44 @@ */ //#define ADVANCED_PAUSE_FEATURE #if ENABLED(ADVANCED_PAUSE_FEATURE) - #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_LENGTH 100 // (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_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast. - #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (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_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate. - #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (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. - - // Filament Unload does a Retract, Delay, and Purge first: - #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. - #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. - - //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. - //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) + #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_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. + // 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. + // 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_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. + // 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. + // 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. + + // Filament Unload does a Retract, Delay, and Purge first: + #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. + #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. + + //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) #endif // @section tmc diff --git a/Marlin/example_configurations/RepRapPro/Huxley/Configuration.h b/Marlin/example_configurations/RepRapPro/Huxley/Configuration.h new file mode 100644 index 0000000000..2cfb844491 --- /dev/null +++ b/Marlin/example_configurations/RepRapPro/Huxley/Configuration.h @@ -0,0 +1,1876 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * Configuration.h + * + * Basic settings such as: + * + * - Type of electronics + * - Type of temperature sensor + * - Printer geometry + * - Endstop configuration + * - LCD controller + * - Extra features + * + * Advanced settings can be found in Configuration_adv.h + * + */ +#ifndef CONFIGURATION_H +#define CONFIGURATION_H +#define CONFIGURATION_H_VERSION 010107 + +//=========================================================================== +//============================= Getting Started ============================= +//=========================================================================== + +/** + * Here are some standard links for getting your machine calibrated: + * + * http://reprap.org/wiki/Calibration + * http://youtu.be/wAL9d7FgInk + * http://calculator.josefprusa.cz + * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide + * http://www.thingiverse.com/thing:5573 + * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap + * http://www.thingiverse.com/thing:298812 + */ + +//=========================================================================== +//============================= DELTA Printer =============================== +//=========================================================================== +// For a Delta printer start with one of the configuration files in the +// example_configurations/delta directory and customize for your machine. +// + +//=========================================================================== +//============================= SCARA Printer =============================== +//=========================================================================== +// For a SCARA printer start with the configuration files in +// example_configurations/SCARA and customize for your machine. +// + +// @section info + +// User-specified version info of this build to display in [Pronterface, etc] terminal window during +// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this +// build by the user have been successfully uploaded into firmware. +#define STRING_CONFIG_H_AUTHOR "(indazoo, Huxley v1)" // Who made the changes. +#define SHOW_BOOTSCREEN +#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 +#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 + +/** + * *** VENDORS PLEASE READ *** + * + * Marlin allows you to add a custom boot image for Graphical LCDs. + * With this option Marlin will first show your custom screen followed + * by the standard Marlin logo with version number and web URL. + * + * We encourage you to take advantage of this new feature and we also + * respecfully request that you retain the unmodified Marlin boot screen. + */ + +// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +//#define SHOW_CUSTOM_BOOTSCREEN + +// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +//#define CUSTOM_STATUS_SCREEN_IMAGE + +// @section machine + +/** + * Select the serial port on the board to use for communication with the host. + * This allows the connection of wireless adapters (for instance) to non-default port pins. + * Serial port 0 is always used by the Arduino bootloader regardless of this setting. + * + * :[0, 1, 2, 3, 4, 5, 6, 7] + */ +#define SERIAL_PORT 0 + +/** + * This setting determines the communication speed of the printer. + * + * 250000 works in most cases, but you might try a lower speed if + * you commonly experience drop-outs during host printing. + * You may try up to 1000000 to speed up SD file transfer. + * + * :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000] + */ +#define BAUDRATE 250000 + +// Enable the Bluetooth serial interface on AT90USB devices +//#define BLUETOOTH + +// The following define selects which electronics board you have. +// Please choose the name from boards.h that matches your setup +#ifndef MOTHERBOARD + #define MOTHERBOARD BOARD_SANGUINOLOLU_12 +#endif + +// Optional custom name for your RepStrap or other custom machine +// Displayed in the LCD "Ready" message +#define CUSTOM_MACHINE_NAME "Huxley" + +// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines) +// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) +//#define MACHINE_UUID "00000000-0000-0000-0000-000000000000" + +// @section extruder + +// This defines the number of extruders +// :[1, 2, 3, 4, 5] +#define EXTRUDERS 1 + +// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc. +#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75 + +// For Cyclops or any "multi-extruder" that shares a single nozzle. +//#define SINGLENOZZLE + +/** + * Průša MK2 Single Nozzle Multi-Material Multiplexer, and variants. + * + * This device allows one stepper driver on a control board to drive + * two to eight stepper motors, one at a time, in a manner suitable + * for extruders. + * + * This option only allows the multiplexer to switch on tool-change. + * Additional options to configure custom E moves are pending. + */ +//#define MK2_MULTIPLEXER +#if ENABLED(MK2_MULTIPLEXER) + // Override the default DIO selector pins here, if needed. + // Some pins files may provide defaults for these pins. + //#define E_MUX0_PIN 40 // Always Required + //#define E_MUX1_PIN 42 // Needed for 3 to 8 steppers + //#define E_MUX2_PIN 44 // Needed for 5 to 8 steppers +#endif + +// A dual extruder that uses a single stepper motor +//#define SWITCHING_EXTRUDER +#if ENABLED(SWITCHING_EXTRUDER) + #define SWITCHING_EXTRUDER_SERVO_NR 0 + #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1[, E2, E3] + #if EXTRUDERS > 3 + #define SWITCHING_EXTRUDER_E23_SERVO_NR 1 + #endif +#endif + +// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles +//#define SWITCHING_NOZZLE +#if ENABLED(SWITCHING_NOZZLE) + #define SWITCHING_NOZZLE_SERVO_NR 0 + #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 + //#define HOTEND_OFFSET_Z { 0.0, 0.0 } +#endif + +/** + * Two separate X-carriages with extruders that connect to a moving part + * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN. + */ +//#define PARKING_EXTRUDER +#if ENABLED(PARKING_EXTRUDER) + #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage + #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil + #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined. + #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders + #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder + #define PARKING_EXTRUDER_SECURITY_RAISE 5 // Z-raise before parking + #define HOTEND_OFFSET_Z { 0.0, 1.3 } // Z-offsets of the two hotends. The first must be 0. +#endif + +/** + * "Mixing Extruder" + * - Adds a new code, M165, to set the current mix factors. + * - Extends the stepping routines to move multiple steppers in proportion to the mix. + * - Optional support for Repetier Firmware M163, M164, and virtual extruder. + * - This implementation supports only a single extruder. + * - Enable DIRECT_MIXING_IN_G1 for Pia Taubert's reference implementation + */ +//#define MIXING_EXTRUDER +#if ENABLED(MIXING_EXTRUDER) + #define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder + #define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164 + //#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands +#endif + +// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing). +// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder). +// For the other hotends it is their distance from the extruder 0 hotend. +//#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis +//#define HOTEND_OFFSET_Y {0.0, 5.00} // (in mm) for each extruder, offset of the hotend on the Y axis + +// @section machine + +/** + * Select your power supply here. Use 0 if you haven't connected the PS_ON_PIN + * + * 0 = No Power Switch + * 1 = ATX + * 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC) + * + * :{ 0:'No power switch', 1:'ATX', 2:'X-Box 360' } + */ +#define POWER_SUPPLY 0 + +#if POWER_SUPPLY > 0 + // Enable this option to leave the PSU off at startup. + // Power to steppers and heaters will need to be turned on with M80. + //#define PS_DEFAULT_OFF + + //#define AUTO_POWER_CONTROL // Enable automatic control of the PS_ON pin + #if ENABLED(AUTO_POWER_CONTROL) + #define AUTO_POWER_FANS // Turn on PSU if fans need power + #define AUTO_POWER_E_FANS + #define AUTO_POWER_CONTROLLERFAN + #define POWER_TIMEOUT 30 + #endif + +#endif + +// @section temperature + +//=========================================================================== +//============================= Thermal Settings ============================ +//=========================================================================== + +/** + * --NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table + * + * Temperature sensors available: + * + * -3 : thermocouple with MAX31855 (only for sensor 0) + * -2 : thermocouple with MAX6675 (only for sensor 0) + * -1 : thermocouple with AD595 + * 0 : not used + * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) + * 3 : Mendel-parts thermistor (4.7k pullup) + * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! + * 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup) + * 6 : 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup) + * 7 : 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup) + * 71 : 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup) + * 8 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) + * 9 : 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup) + * 10 : 100k RS thermistor 198-961 (4.7k pullup) + * 11 : 100k beta 3950 1% thermistor (4.7k pullup) + * 12 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed) + * 13 : 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE" + * 15 : 100k thermistor calibration for JGAurora A5 hotend + * 20 : the PT100 circuit found in the Ultimainboard V2.x + * 60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950 + * 66 : 4.7M High Temperature thermistor from Dyze Design + * 70 : the 100K thermistor found in the bq Hephestos 2 + * 75 : 100k Generic Silicon Heat Pad with NTC 100K MGB18-104F39050L32 thermistor + * + * 1k ohm pullup tables - This is atypical, and requires changing out the 4.7k pullup for 1k. + * (but gives greater accuracy and more stable PID) + * 51 : 100k thermistor - EPCOS (1k pullup) + * 52 : 200k thermistor - ATC Semitec 204GT-2 (1k pullup) + * 55 : 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup) + * + * 1047 : Pt1000 with 4k7 pullup + * 1010 : Pt1000 with 1k pullup (non standard) + * 147 : Pt100 with 4k7 pullup + * 110 : Pt100 with 1k pullup (non standard) + * + * Use these for Testing or Development purposes. NEVER for production machine. + * 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. + * + * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + */ +#define TEMP_SENSOR_0 1 +#define TEMP_SENSOR_1 0 +#define TEMP_SENSOR_2 0 +#define TEMP_SENSOR_3 0 +#define TEMP_SENSOR_4 0 +#define TEMP_SENSOR_BED 1 // Sanguinololu v1.3 with 4.7kOhm pullup +#define TEMP_SENSOR_CHAMBER 0 + +// Dummy thermistor constant temperature readings, for use with 998 and 999 +#define DUMMY_THERMISTOR_998_VALUE 25 +#define DUMMY_THERMISTOR_999_VALUE 100 + +// Use temp sensor 1 as a redundant sensor with sensor 0. If the readings +// from the two sensors differ too much the print will be aborted. +//#define TEMP_SENSOR_1_AS_REDUNDANT +#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10 + +// Extruder temperature must be close to target for this long before M109 returns success +#define TEMP_RESIDENCY_TIME 10 // (seconds) +#define TEMP_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one +#define TEMP_WINDOW 1 // (degC) Window around target to start the residency timer x degC early. + +// Bed temperature must be close to target for this long before M190 returns success +#define TEMP_BED_RESIDENCY_TIME 10 // (seconds) +#define TEMP_BED_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one +#define TEMP_BED_WINDOW 1 // (degC) Window around target to start the residency timer x degC early. + +// The minimal temperature defines the temperature below which the heater will not be enabled It is used +// to check that the wiring to the thermistor is not broken. +// Otherwise this would lead to the heater being powered on all the time. +#define HEATER_0_MINTEMP 5 +#define HEATER_1_MINTEMP 5 +#define HEATER_2_MINTEMP 5 +#define HEATER_3_MINTEMP 5 +#define HEATER_4_MINTEMP 5 +#define BED_MINTEMP 5 + +// When temperature exceeds max temp, your heater will be switched off. +// This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure! +// You should use MINTEMP for thermistor short/failure protection. +#define HEATER_0_MAXTEMP 275 +#define HEATER_1_MAXTEMP 275 +#define HEATER_2_MAXTEMP 275 +#define HEATER_3_MAXTEMP 275 +#define HEATER_4_MAXTEMP 275 +#define BED_MAXTEMP 150 + +//=========================================================================== +//============================= PID Settings ================================ +//=========================================================================== +// PID Tuning Guide here: http://reprap.org/wiki/PID_Tuning + +// Comment the following line to disable PID and enable bang-bang. +#define PIDTEMP +#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current +#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current +#define PID_K1 0.95 // Smoothing factor within any PID loop +#if ENABLED(PIDTEMP) + //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result. + //#define PID_DEBUG // Sends debug data to the serial port. + //#define PID_OPENLOOP 1 // 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_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders) + // Set/get with gcode: M301 E[extruder number, 0-2] + #define PID_FUNCTIONAL_RANGE 10 // 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. + + // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it + + // Ultimaker + #define DEFAULT_Kp 22.2 + #define DEFAULT_Ki 1.08 + #define DEFAULT_Kd 114 + + // MakerGear + //#define DEFAULT_Kp 7.0 + //#define DEFAULT_Ki 0.1 + //#define DEFAULT_Kd 12 + + // Mendel Parts V9 on 12V + //#define DEFAULT_Kp 63.0 + //#define DEFAULT_Ki 2.25 + //#define DEFAULT_Kd 440 + +#endif // PIDTEMP + +//=========================================================================== +//============================= PID > Bed Temperature Control =============== +//=========================================================================== + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ +//#define PIDTEMPBED + +//#define BED_LIMIT_SWITCHING + +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ +#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current + +#if ENABLED(PIDTEMPBED) + + //#define PID_BED_DEBUG // Sends debug data to the serial port. + + //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) + //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) + #define DEFAULT_bedKp 10.00 + #define DEFAULT_bedKi .023 + #define DEFAULT_bedKd 305.4 + + //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) + //from pidautotune + //#define DEFAULT_bedKp 97.1 + //#define DEFAULT_bedKi 1.41 + //#define DEFAULT_bedKd 1675.16 + + // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. +#endif // PIDTEMPBED + +// @section extruder + +// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP. +// It also enables the M302 command to set the minimum extrusion temperature +// or to allow moving the extruder regardless of the hotend temperature. +// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! *** +#define PREVENT_COLD_EXTRUSION +#define EXTRUDE_MINTEMP 170 + +// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH. +// Note that for Bowden Extruders a too-small value here may prevent loading. +#define PREVENT_LENGTHY_EXTRUDE +#define EXTRUDE_MAXLENGTH 200 + +//=========================================================================== +//======================== Thermal Runaway Protection ======================= +//=========================================================================== + +/** + * Thermal Protection provides additional protection to your printer from damage + * and fire. Marlin always includes safe min and max temperature ranges which + * protect against a broken or disconnected thermistor wire. + * + * The issue: If a thermistor falls out, it will report the much lower + * temperature of the air in the room, and the the firmware will keep + * the heater on. + * + * If you get "Thermal Runaway" or "Heating failed" errors the + * details can be tuned in Configuration_adv.h + */ + +#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders +#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed + +//=========================================================================== +//============================= Mechanical Settings ========================= +//=========================================================================== + +// @section machine + +// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics +// either in the usual order or reversed +//#define COREXY +//#define COREXZ +//#define COREYZ +//#define COREYX +//#define COREZX +//#define COREZY + +//=========================================================================== +//============================== Endstop Settings =========================== +//=========================================================================== + +// @section homing + +// Specify here all the endstop connectors that are connected to any endstop or probe. +// Almost all printers will be using one per axis. Probes will use one or more of the +// extra connectors. Leave undefined any used for non-endstop and non-probe purposes. +#define USE_XMIN_PLUG +#define USE_YMIN_PLUG +#define USE_ZMIN_PLUG +//#define USE_XMAX_PLUG +//#define USE_YMAX_PLUG +//#define USE_ZMAX_PLUG + +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS +#if DISABLED(ENDSTOPPULLUPS) + // Disable ENDSTOPPULLUPS to set pullups individually + //#define ENDSTOPPULLUP_XMAX + //#define ENDSTOPPULLUP_YMAX + //#define ENDSTOPPULLUP_ZMAX + //#define ENDSTOPPULLUP_XMIN + //#define ENDSTOPPULLUP_YMIN + //#define ENDSTOPPULLUP_ZMIN + //#define ENDSTOPPULLUP_ZMIN_PROBE +#endif + +// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). +#define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. +#define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. +#define Z_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. +#define X_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. +#define Y_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. +#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. +#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. + +// Enable this feature if all enabled endstop pins are interrupt-capable. +// This will remove the need to poll the interrupt pins, saving many CPU cycles. +//#define ENDSTOP_INTERRUPTS_FEATURE + +//============================================================================= +//============================== Movement Settings ============================ +//============================================================================= +// @section motion + +/** + * Default Settings + * + * These settings can be reset by M502 + * + * Note that if EEPROM is enabled, saved values will override these. + */ + +// +// Standard NEMA 17 with T2 belt and 20 tooth pulley +// +#define NEMA17_FULL_STEPS 200.0 +#define XY_MICROSTEPS 16.0 +#define E_MICROSTEPS 16.0 +#define Z_MICROSTEPS 16.0 + +/* RepRapPro belts +http://forums.reprap.org/read.php?1,391198 +White polyurethane belt(T2.5), 14 - tooth printed pulley : 91.4286 step per mm (Original Huxley, Legacy Mendel) +Black rubber belt(MXL), 17 - tooth printed pulley : 92.635 step per mm (Huxley, Mendel Mono and Tri since 1 / 4 / 2013) +Black rubber belt(MXL), 18 - tooth aluminium pulley : 87.489 step per mm (Huxley, Mendel Mono and Tri since 1 / 1 / 2014) +*/ +#define XY_PULLEY_PITCH 2.5 //RepRapPro Huxley has T2.5 belts +#define XY_PULLEY_TEETH 14.0 //RepRapPro Huxley has 14 teeth pulleys + +// +// Standard NEMA 17 with fancy 5mm lead screws +// +#define Z_RODS_PITCH 0.8 + +#define XY_MOTOR_STEPS (NEMA17_FULL_STEPS * XY_MICROSTEPS) +#define Z_MOTOR_STEPS (NEMA17_FULL_STEPS * Z_MICROSTEPS) +#define E_MOTOR_STEPS (NEMA17_FULL_STEPS * E_MICROSTEPS) + +// +// MK7 Direct Drive +// +#define E_MOTOR_GEAR_TEETH 11.0 //Num of teeth of gear on extruder motor +#define E_ROD_GEAR_TEETH 53.0 //Num of teeth of gear driving the extruder rod +#define E_ROD_DIAM 5.4 // ca value. M6 rod drives the filament. Manual calibration needed. +#define E_ROD_CIRC (M_PI * E_ROD_DIAM) +#define E_STEPS (E_MOTOR_STEPS / (E_MOTOR_GEAR_TEETH/E_ROD_GEAR_TEETH) / E_ROD_CIRC) + +// Get steps/mm from selected results above +#define XY_STEPS (XY_MOTOR_STEPS / (XY_PULLEY_PITCH * XY_PULLEY_TEETH)) +#define Z_STEPS (Z_MOTOR_STEPS / Z_RODS_PITCH) + +/** + * With this option each E stepper can have its own factors for the + * following movement settings. If fewer factors are given than the + * total number of extruders, the last value applies to the rest. + */ +//#define DISTINCT_E_FACTORS + +/** + * Default Axis Steps Per Unit (steps/mm) + * Override with M92 + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] + */ +#define DEFAULT_AXIS_STEPS_PER_UNIT { XY_STEPS, XY_STEPS, Z_STEPS, E_STEPS } + +/** + * Default Max Feed Rate (mm/s) + * Override with M203 + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] + */ +#define DEFAULT_MAX_Z_FEEDRATE 3.3 // older Huxley has problem with speeds > 3.3 mm/s on z axis +#define DEFAULT_MAX_FEEDRATE { 200, 200, DEFAULT_MAX_Z_FEEDRATE, 25 } + +/** + * Default Max Acceleration (change/s) change = mm/s + * (Maximum start speed for accelerated moves) + * Override with M201 + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] + */ +#define DEFAULT_MAX_ACCELERATION { 1000, 1000, 50, 1000 } + +/** + * Default Acceleration (change/s) change = mm/s + * Override with M204 + * + * M204 P Acceleration + * M204 R Retract Acceleration + * M204 T Travel Acceleration + */ +#define DEFAULT_ACCELERATION 1000 // X, Y, Z and E acceleration for printing moves +#define DEFAULT_RETRACT_ACCELERATION 1000 // E acceleration for retracts +#define DEFAULT_TRAVEL_ACCELERATION 1000 // X, Y, Z acceleration for travel (non printing) moves + +/** + * Default Jerk (mm/s) + * Override with M205 X Y Z E + * + * "Jerk" specifies the minimum speed change that requires acceleration. + * When changing speed and direction, if the difference is less than the + * value set here, it may happen instantaneously. + */ +#define DEFAULT_XJERK 10.0 +#define DEFAULT_YJERK 10.0 +#define DEFAULT_ZJERK 0.3 +#define DEFAULT_EJERK 5.0 + +//=========================================================================== +//============================= Z Probe Options ============================= +//=========================================================================== +// @section probes + +// +// See http://marlinfw.org/docs/configuration/probes.html +// + +/** + * Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN + * + * Enable this option for a probe connected to the Z Min endstop pin. + */ +#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN + +/** + * Z_MIN_PROBE_ENDSTOP + * + * Enable this option for a probe connected to any pin except Z-Min. + * (By default Marlin assumes the Z-Max endstop pin.) + * To use a custom Z Probe pin, set Z_MIN_PROBE_PIN below. + * + * - The simplest option is to use a free endstop connector. + * - Use 5V for powered (usually inductive) sensors. + * + * - RAMPS 1.3/1.4 boards may use the 5V, GND, and Aux4->D32 pin: + * - For simple switches connect... + * - normally-closed switches to GND and D32. + * - normally-open switches to 5V and D32. + * + * WARNING: Setting the wrong pin may have unexpected and potentially + * disastrous consequences. Use with caution and do your homework. + * + */ +//#define Z_MIN_PROBE_ENDSTOP + +/** + * Probe Type + * + * Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, etc. + * Activate one of these to use Auto Bed Leveling below. + */ + +/** + * The "Manual Probe" provides a means to do "Auto" Bed Leveling without a probe. + * Use G29 repeatedly, adjusting the Z height at each point with movement commands + * or (with LCD_BED_LEVELING) the LCD controller. + */ +//#define PROBE_MANUALLY + +/** + * A Fix-Mounted Probe either doesn't deploy or needs manual deployment. + * (e.g., an inductive probe or a nozzle-based probe-switch.) + */ +//#define FIX_MOUNTED_PROBE + +/** + * Z Servo Probe, such as an endstop switch on a rotating arm. + */ +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles + +/** + * The BLTouch probe uses a Hall effect sensor and emulates a servo. + */ +//#define BLTOUCH +#if ENABLED(BLTOUCH) + //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed +#endif + +/** + * Enable one or more of the following if probing seems unreliable. + * Heaters and/or fans can be disabled during probing to minimize electrical + * noise. A delay can also be added to allow noise and vibration to settle. + * These options are most useful for the BLTouch probe, but may also improve + * readings with inductive probes and piezo sensors. + */ +//#define PROBING_HEATERS_OFF // Turn heaters off when probing +//#define PROBING_FANS_OFF // Turn fans off when probing +//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors + +// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) +//#define SOLENOID_PROBE + +// A sled-mounted probe like those designed by Charles Bell. +//#define Z_PROBE_SLED +//#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like. + +// +// For Z_PROBE_ALLEN_KEY see the Delta example configurations. +// + +/** + * Z Probe to nozzle (X,Y) offset, relative to (0, 0). + * X and Y offsets must be integers. + * + * In the following example the X and Y offsets are both positive: + * #define X_PROBE_OFFSET_FROM_EXTRUDER 10 + * #define Y_PROBE_OFFSET_FROM_EXTRUDER 10 + * + * +-- BACK ---+ + * | | + * L | (+) P | R <-- probe (20,20) + * E | | I + * F | (-) N (+) | G <-- nozzle (10,10) + * T | | H + * | (-) | T + * | | + * O-- FRONT --+ + * (0,0) + */ +#define X_PROBE_OFFSET_FROM_EXTRUDER 10 // X offset: -left +right [of the nozzle] +#define Y_PROBE_OFFSET_FROM_EXTRUDER 10 // Y offset: -front +behind [the nozzle] +#define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle] + +// Certain types of probes need to stay away from edges +#define MIN_PROBE_EDGE 10 + +// X and Y axis travel speed (mm/m) between probes +#define XY_PROBE_SPEED 8000 + +// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2) +#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z + +// Speed for the "accurate" probe of each point +#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2) + +// The number of probes to perform at each point. +// Set to 2 for a fast/slow probe, using the second probe result. +// Set to 3 or more for slow probes, averaging the results. +//#define MULTIPLE_PROBING 2 + +/** + * Z probes require clearance when deploying, stowing, and moving between + * probe points to avoid hitting the bed and other hardware. + * Servo-mounted probes require extra space for the arm to rotate. + * Inductive probes need space to keep from triggering early. + * + * Use these settings to specify the distance (mm) to raise the probe (or + * lower the bed). The values set here apply over and above any (negative) + * probe Z Offset set with Z_PROBE_OFFSET_FROM_EXTRUDER, M851, or the LCD. + * Only integer values >= 1 are valid here. + * + * 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 // Z Clearance for Deploy/Stow +#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points +//#define Z_AFTER_PROBING 5 // Z position after probing is done + +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + +// For M851 give a range for adjusting the Z probe offset +#define Z_PROBE_OFFSET_RANGE_MIN -20 +#define Z_PROBE_OFFSET_RANGE_MAX 20 + +// Enable the M48 repeatability test to test probe accuracy +//#define Z_MIN_PROBE_REPEATABILITY_TEST + +// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1 +// :{ 0:'Low', 1:'High' } +#define X_ENABLE_ON 0 +#define Y_ENABLE_ON 0 +#define Z_ENABLE_ON 0 +#define E_ENABLE_ON 0 // For all extruders + +// Disables axis stepper immediately when it's not being used. +// WARNING: When motors turn off there is a chance of losing position accuracy! +#define DISABLE_X false +#define DISABLE_Y false +#define DISABLE_Z false +// Warn on display about possibly reduced accuracy +//#define DISABLE_REDUCED_ACCURACY_WARNING + +// @section extruder + +#define DISABLE_E false // For all extruders +#define DISABLE_INACTIVE_EXTRUDER true // Keep only the active extruder enabled. + +// @section machine + +// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way. +#define INVERT_X_DIR true +#define INVERT_Y_DIR false +#define INVERT_Z_DIR false + +// Enable this option for Toshiba stepper drivers +//#define CONFIG_STEPPERS_TOSHIBA + +// @section extruder + +// For direct drive extruder v9 set to true, for geared extruder set to false. +#define INVERT_E0_DIR true +#define INVERT_E1_DIR false +#define INVERT_E2_DIR false +#define INVERT_E3_DIR false +#define INVERT_E4_DIR false + +// @section homing + +//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed + +//#define UNKNOWN_Z_NO_RAISE // Don't raise Z (lower the bed) if Z is "unknown." For beds that fall when Z is powered off. + +#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ... + // Be sure you have this distance over your Z_MAX_POS in case. + +// Direction of endstops when homing; 1=MAX, -1=MIN +// :[-1,1] +#define X_HOME_DIR -1 +#define Y_HOME_DIR -1 +#define Z_HOME_DIR -1 + +// @section machine + +// The size of the print bed +// http://reprap.org/wiki/Configuring_Marlin_Bed_Dimensions +// http://marlinfw.org/docs/configuration/configuration.html#movement-bounds +#define X_BED_SIZE 140 +#define Y_BED_SIZE 140 +// Huxley with 110x110 PEI board. +//#define X_BED_SIZE 108 +//#define Y_BED_SIZE 108 + +// Travel limits (mm) after homing, corresponding to endstop positions. +#define X_MIN_POS -9 +#define Y_MIN_POS -5 +// Huxley with 110x110 PEI board. +//#define X_MIN_POS -25 +//#define Y_MIN_POS -21 +#define Z_MIN_POS 0 + +#define X_MAX_POS X_BED_SIZE +#define Y_MAX_POS Y_BED_SIZE +#define Z_MAX_POS 80 + +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds +#define MIN_SOFTWARE_ENDSTOPS +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds +#define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif + +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + +/** + * Filament Runout Sensors + * Mechanical or opto endstops are used to check for the presence of filament. + * + * 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. + * By default the firmware assumes HIGH=FILAMENT PRESENT. + */ +//#define FILAMENT_RUNOUT_SENSOR +#if ENABLED(FILAMENT_RUNOUT_SENSOR) + #define NUM_RUNOUT_SENSORS 1 // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each. + #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + #define FILAMENT_RUNOUT_SCRIPT "M600" +#endif + +//=========================================================================== +//=============================== Bed Leveling ============================== +//=========================================================================== +// @section calibrate + +/** + * Choose one of the options below to enable G29 Bed Leveling. The parameters + * and behavior of G29 will change depending on your selection. + * + * If using a Probe for Z Homing, enable Z_SAFE_HOMING also! + * + * - AUTO_BED_LEVELING_3POINT + * Probe 3 arbitrary points on the bed (that aren't collinear) + * You specify the XY coordinates of all 3 points. + * The result is a single tilted plane. Best for a flat bed. + * + * - AUTO_BED_LEVELING_LINEAR + * Probe several points in a grid. + * You specify the rectangle and the density of sample points. + * The result is a single tilted plane. Best for a flat bed. + * + * - AUTO_BED_LEVELING_BILINEAR + * Probe several points in a grid. + * You specify the rectangle and the density of sample points. + * The result is a mesh, best for large or uneven beds. + * + * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling) + * A comprehensive bed leveling system combining the features and benefits + * of other systems. UBL also includes integrated Mesh Generation, Mesh + * Validation and Mesh Editing systems. + * + * - MESH_BED_LEVELING + * Probe a grid manually + * The result is a mesh, suitable for large or uneven beds. (See BILINEAR.) + * For machines without a probe, Mesh Bed Leveling provides a method to perform + * leveling in steps so you can manually adjust the Z height at each grid-point. + * With an LCD controller the process is guided step-by-step. + */ +//#define AUTO_BED_LEVELING_3POINT +//#define AUTO_BED_LEVELING_LINEAR +//#define AUTO_BED_LEVELING_BILINEAR +//#define AUTO_BED_LEVELING_UBL +//#define MESH_BED_LEVELING + +/** + * Normally G28 leaves leveling disabled on completion. Enable + * this option to have G28 restore the prior leveling state. + */ +//#define RESTORE_LEVELING_AFTER_G28 + +/** + * Enable detailed logging of G28, G29, M48, etc. + * Turn on with the command 'M111 S32'. + * NOTE: Requires a lot of PROGMEM! + */ +//#define DEBUG_LEVELING_FEATURE + +#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) + // Gradually reduce leveling correction until a set height is reached, + // at which point movement will be level to the machine's XY plane. + // The height can be set with M420 Z + #define ENABLE_LEVELING_FADE_HEIGHT + + // For Cartesian machines, instead of dividing moves on mesh boundaries, + // split up moves into short segments like a Delta. This follows the + // contours of the bed more closely than edge-to-edge straight moves. + #define SEGMENT_LEVELED_MOVES + #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one) + + /** + * Enable the G26 Mesh Validation Pattern tool. + */ + //#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 the G26 Mesh Validation Tool. + #define MESH_TEST_HOTEND_TEMP 205.0 // (°C) Default nozzle temperature for the G26 Mesh Validation Tool. + #define MESH_TEST_BED_TEMP 60.0 // (°C) Default bed temperature for the G26 Mesh Validation Tool. + #endif + +#endif + +#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) + + // Set the number of grid points per dimension. + #define GRID_MAX_POINTS_X 3 + #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X + + // Set the boundaries for probing (where the probe can reach). + //#define LEFT_PROBE_BED_POSITION MIN_PROBE_EDGE + //#define RIGHT_PROBE_BED_POSITION (X_BED_SIZE - MIN_PROBE_EDGE) + //#define FRONT_PROBE_BED_POSITION MIN_PROBE_EDGE + //#define BACK_PROBE_BED_POSITION (Y_BED_SIZE - MIN_PROBE_EDGE) + + // Probe along the Y axis, advancing X after each column + //#define PROBE_Y_FIRST + + #if ENABLED(AUTO_BED_LEVELING_BILINEAR) + + // Beyond the probed grid, continue the implied tilt? + // Default is to maintain the height of the nearest edge. + //#define EXTRAPOLATE_BEYOND_GRID + + // + // Experimental Subdivision of the grid by Catmull-Rom method. + // Synthesizes intermediate points to produce a more detailed mesh. + // + //#define ABL_BILINEAR_SUBDIVISION + #if ENABLED(ABL_BILINEAR_SUBDIVISION) + // Number of subdivisions between probe points + #define BILINEAR_SUBDIVISIONS 3 + #endif + + #endif + +#elif ENABLED(AUTO_BED_LEVELING_UBL) + + //=========================================================================== + //========================= Unified Bed Leveling ============================ + //=========================================================================== + + //#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 GRID_MAX_POINTS_Y GRID_MAX_POINTS_X + + #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. + +#elif ENABLED(MESH_BED_LEVELING) + + //=========================================================================== + //=================================== Mesh ================================== + //=========================================================================== + + #define MESH_INSET 10 // Set Mesh bounds as an inset region of the bed + #define GRID_MAX_POINTS_X 3 // Don't use more than 7 points per axis, implementation limited. + #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X + + //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS + +#endif // BED_LEVELING + +/** + * Points to probe for all 3-point Leveling procedures. + * Override if the automatically selected points are inadequate. + */ +#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) + //#define PROBE_PT_1_X 15 + //#define PROBE_PT_1_Y 180 + //#define PROBE_PT_2_X 15 + //#define PROBE_PT_2_Y 20 + //#define PROBE_PT_3_X 170 + //#define PROBE_PT_3_Y 20 +#endif + +/** + * Use the LCD controller for bed leveling + * Requires MESH_BED_LEVELING or PROBE_MANUALLY + */ +//#define LCD_BED_LEVELING + +#if ENABLED(LCD_BED_LEVELING) + #define MBL_Z_STEP 0.025 // Step size while manually probing Z axis. + #define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment +#endif + +// Add a menu item to move between bed corners for manual bed adjustment +//#define LEVEL_BED_CORNERS + +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + +/** + * Commands to execute at the end of G29 probing. + * Useful to retract or move the Z probe out of the way. + */ +//#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" + + +// @section homing + +// The center of the bed is at (X=0, Y=0) +//#define BED_CENTER_AT_0_0 + +// 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_Z_HOME_POS 0 + +// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area. +// +// With this feature enabled: +// +// - Allow Z homing only after X and Y homing AND stepper drivers still enabled. +// - If stepper drivers time out, it will need X and Y homing again before Z homing. +// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28). +// - Prevent Z homing when the Z probe is outside bed area. +// +//#define Z_SAFE_HOMING + +#if ENABLED(Z_SAFE_HOMING) + #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axes (G28). + #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axes (G28). +#endif + +// Homing speeds (mm/m) +#define HOMING_FEEDRATE_XY (50*60) +#define HOMING_FEEDRATE_Z (DEFAULT_MAX_Z_FEEDRATE*60) + +// @section calibrate + +/** + * Bed Skew Compensation + * + * This feature corrects for misalignment in the XYZ axes. + * + * Take the following steps to get the bed skew in the XY plane: + * 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185) + * 2. For XY_DIAG_AC measure the diagonal A to C + * 3. For XY_DIAG_BD measure the diagonal B to D + * 4. For XY_SIDE_AD measure the edge A to D + * + * Marlin automatically computes skew factors from these measurements. + * Skew factors may also be computed and set manually: + * + * - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2 + * - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD))) + * + * If desired, follow the same procedure for XZ and YZ. + * Use these diagrams for reference: + * + * Y Z Z + * ^ B-------C ^ B-------C ^ B-------C + * | / / | / / | / / + * | / / | / / | / / + * | A-------D | A-------D | A-------D + * +-------------->X +-------------->X +-------------->Y + * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR + */ +//#define SKEW_CORRECTION + +#if ENABLED(SKEW_CORRECTION) + // Input all length measurements here: + #define XY_DIAG_AC 282.8427124746 + #define XY_DIAG_BD 282.8427124746 + #define XY_SIDE_AD 200 + + // Or, set the default skew factors directly here + // to override the above measurements: + #define XY_SKEW_FACTOR 0.0 + + //#define SKEW_CORRECTION_FOR_Z + #if ENABLED(SKEW_CORRECTION_FOR_Z) + #define XZ_DIAG_AC 282.8427124746 + #define XZ_DIAG_BD 282.8427124746 + #define YZ_DIAG_AC 282.8427124746 + #define YZ_DIAG_BD 282.8427124746 + #define YZ_SIDE_AD 200 + #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 +#endif + +//============================================================================= +//============================= Additional Features =========================== +//============================================================================= + +// @section extras + +// +// EEPROM +// +// The microcontroller can store settings in the EEPROM, e.g. max velocity... +// M500 - stores parameters in EEPROM +// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). +// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. +// +#define EEPROM_SETTINGS // Enable for M500 and M501 commands +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. + +// +// Host Keepalive +// +// When enabled Marlin will send a busy status message to the host +// every couple of seconds when it can't accept commands. +// +#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages +#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113. +#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating + +// +// M100 Free Memory Watcher +// +//#define M100_FREE_MEMORY_WATCHER // Add M100 (Free Memory Watcher) to debug memory usage + +// +// G20/G21 Inch mode support +// +//#define INCH_MODE_SUPPORT + +// +// M149 Set temperature units support +// +//#define TEMPERATURE_UNITS_SUPPORT + +// @section temperature + +// Preheat Constants +#define PREHEAT_1_TEMP_HOTEND 180 +#define PREHEAT_1_TEMP_BED 70 +#define PREHEAT_1_FAN_SPEED 0 // Value from 0 to 255 + +#define PREHEAT_2_TEMP_HOTEND 240 +#define PREHEAT_2_TEMP_BED 110 +#define PREHEAT_2_FAN_SPEED 0 // Value from 0 to 255 + +/** + * Nozzle Park + * + * Park the nozzle at the given XYZ position on idle or G27. + * + * The "P" parameter controls the action applied to the Z axis: + * + * P0 (Default) If Z is below park Z raise the nozzle. + * 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 + +#if ENABLED(NOZZLE_PARK_FEATURE) + // Specify a park position as { X, Y, Z } + #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } + #define NOZZLE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis) + #define NOZZLE_PARK_Z_FEEDRATE DEFAULT_MAX_Z_FEEDRATE // Z axis feedrate in mm/s (not used for delta printers) +#endif + +/** + * Clean Nozzle Feature -- EXPERIMENTAL + * + * Adds the G12 command to perform a nozzle cleaning process. + * + * Parameters: + * P Pattern + * S Strokes / Repetitions + * T Triangles (P1 only) + * + * Patterns: + * P0 Straight line (default). This process requires a sponge type material + * at a fixed bed location. "S" specifies strokes (i.e. back-forth motions) + * between the start / end points. + * + * P1 Zig-zag pattern between (X0, Y0) and (X1, Y1), "T" specifies the + * number of zig-zag triangles to do. "S" defines the number of strokes. + * Zig-zags are done in whichever is the narrower dimension. + * For example, "G12 P1 S1 T3" will execute: + * + * -- + * | (X0, Y1) | /\ /\ /\ | (X1, Y1) + * | | / \ / \ / \ | + * A | | / \ / \ / \ | + * | | / \ / \ / \ | + * | (X0, Y0) | / \/ \/ \ | (X1, Y0) + * -- +--------------------------------+ + * |________|_________|_________| + * T1 T2 T3 + * + * P2 Circular pattern with middle at NOZZLE_CLEAN_CIRCLE_MIDDLE. + * "R" specifies the radius. "S" specifies the stroke count. + * Before starting, the nozzle moves to NOZZLE_CLEAN_START_POINT. + * + * Caveats: The ending Z should be the same as starting Z. + * Attention: EXPERIMENTAL. G-code arguments may change. + * + */ +//#define NOZZLE_CLEAN_FEATURE + +#if ENABLED(NOZZLE_CLEAN_FEATURE) + // Default number of pattern repetitions + #define NOZZLE_CLEAN_STROKES 12 + + // Default number of triangles + #define NOZZLE_CLEAN_TRIANGLES 3 + + // Specify positions as { X, Y, Z } + #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} + #define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)} + + // Circular pattern radius + #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5 + // Circular pattern circle fragments number + #define NOZZLE_CLEAN_CIRCLE_FN 10 + // Middle point of circle + #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT + + // Moves the nozzle to the initial position + #define NOZZLE_CLEAN_GOBACK +#endif + +/** + * Print Job Timer + * + * Automatically start and stop the print job timer on M104/M109/M190. + * + * M104 (hotend, no wait) - high temp = none, low temp = stop timer + * M109 (hotend, wait) - high temp = start timer, low temp = stop timer + * M190 (bed, wait) - high temp = start timer, low temp = none + * + * The timer can also be controlled with the following commands: + * + * M75 - Start the print job timer + * M76 - Pause the print job timer + * M77 - Stop the print job timer + */ +#define PRINTJOB_TIMER_AUTOSTART + +/** + * Print Counter + * + * Track statistical data such as: + * + * - Total print jobs + * - Total successful print jobs + * - Total failed print jobs + * - Total time printing + * + * View the current statistics with M78. + */ +//#define PRINTCOUNTER + +//============================================================================= +//============================= LCD and SD support ============================ +//============================================================================= + +// @section lcd + +/** + * LCD LANGUAGE + * + * Select the language to display on the LCD. These languages are available: + * + * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8, + * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8, + * tr, uk, zh_CN, zh_TW, test + * + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' } + */ +#define LCD_LANGUAGE en + +/** + * LCD Character Set + * + * Note: This option is NOT applicable to Graphical Displays. + * + * All character-based LCDs provide ASCII plus one of these + * language extensions: + * + * - JAPANESE ... the most common + * - WESTERN ... with more accented characters + * - CYRILLIC ... for the Russian language + * + * To determine the language extension installed on your controller: + * + * - Compile and upload with LCD_LANGUAGE set to 'test' + * - Click the controller to view the LCD menu + * - The LCD will display Japanese, Western, or Cyrillic text + * + * See http://marlinfw.org/docs/development/lcd_language.html + * + * :['JAPANESE', 'WESTERN', 'CYRILLIC'] + */ +#define DISPLAY_CHARSET_HD44780 JAPANESE + +/** + * LCD TYPE + * + * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD. + * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display. + * (These options will be enabled automatically for most displays.) + * + * IMPORTANT: The U8glib library is required for Full Graphic Display! + * https://github.com/olikraus/U8glib_Arduino + */ +//#define ULTRA_LCD // Character based +//#define DOGLCD // Full graphics display + +/** + * SD CARD + * + * 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 + +/** + * SD CARD: SPI SPEED + * + * Enable one of the following items for a slower SPI transfer speed. + * This may be required to resolve "volume init" errors. + */ +//#define SPI_SPEED SPI_HALF_SPEED +//#define SPI_SPEED SPI_QUARTER_SPEED +//#define SPI_SPEED SPI_EIGHTH_SPEED + +/** + * SD CARD: ENABLE CRC + * + * Use CRC checks and retries on the SD communication. + */ +//#define SD_CHECK_AND_RETRY + +// +// ENCODER SETTINGS +// +// This option overrides the default number of encoder pulses needed to +// produce one step. Should be increased for high-resolution encoders. +// +//#define ENCODER_PULSES_PER_STEP 4 + +// +// Use this option to override the number of step signals required to +// move between next/prev menu items. +// +//#define ENCODER_STEPS_PER_MENU_ITEM 1 + +/** + * Encoder Direction Options + * + * Test your encoder's behavior first with both options disabled. + * + * Reversed Value Edit and Menu Nav? Enable REVERSE_ENCODER_DIRECTION. + * Reversed Menu Navigation only? Enable REVERSE_MENU_DIRECTION. + * Reversed Value Editing only? Enable BOTH options. + */ + +// +// This option reverses the encoder direction everywhere. +// +// Set this option if CLOCKWISE causes values to DECREASE +// +//#define REVERSE_ENCODER_DIRECTION + +// +// This option reverses the encoder direction for navigating LCD menus. +// +// If CLOCKWISE normally moves DOWN this makes it go UP. +// If CLOCKWISE normally moves UP this makes it go DOWN. +// +//#define REVERSE_MENU_DIRECTION + +// +// Individual Axis Homing +// +// Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu. +// +//#define INDIVIDUAL_AXIS_HOMING_MENU + +// +// SPEAKER/BUZZER +// +// 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 + +// +// The duration and frequency for the UI feedback sound. +// Set these to 0 to disable audio feedback in the LCD menus. +// +// Note: Test audio output with the G-Code: +// M300 S P +// +//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2 +//#define LCD_FEEDBACK_FREQUENCY_HZ 5000 + +// +// CONTROLLER TYPE: Standard +// +// Marlin supports a wide variety of controllers. +// Enable one of the following options to specify your controller. +// + +// +// ULTIMAKER Controller. +// +//#define ULTIMAKERCONTROLLER + +// +// ULTIPANEL as seen on Thingiverse. +// +//#define ULTIPANEL + +// +// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3) +// http://reprap.org/wiki/PanelOne +// +//#define PANEL_ONE + +// +// MaKr3d Makr-Panel with graphic controller and SD support. +// http://reprap.org/wiki/MaKr3d_MaKrPanel +// +//#define MAKRPANEL + +// +// ReprapWorld Graphical LCD +// https://reprapworld.com/?products_details&products_id/1218 +// +//#define REPRAPWORLD_GRAPHICAL_LCD + +// +// Activate one of these if you have a Panucatt Devices +// Viki 2.0 or mini Viki with Graphic LCD +// http://panucatt.com +// +//#define VIKI2 +//#define miniVIKI + +// +// Adafruit ST7565 Full Graphic Controller. +// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/ +// +//#define ELB_FULL_GRAPHIC_CONTROLLER + +// +// RepRapDiscount Smart Controller. +// http://reprap.org/wiki/RepRapDiscount_Smart_Controller +// +// Note: Usually sold with a white PCB. +// +//#define REPRAP_DISCOUNT_SMART_CONTROLLER + +// +// GADGETS3D G3D LCD/SD Controller +// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel +// +// Note: Usually sold with a blue PCB. +// +//#define G3D_PANEL + +// +// RepRapDiscount FULL GRAPHIC Smart Controller +// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller +// +//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER + +// +// MakerLab Mini Panel with graphic +// controller and SD support - http://reprap.org/wiki/Mini_panel +// +//#define MINIPANEL + +// +// RepRapWorld REPRAPWORLD_KEYPAD v1.1 +// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626 +// +// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key +// is pressed, a value of 10.0 means 10mm per click. +// +//#define REPRAPWORLD_KEYPAD +//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0 + +// +// RigidBot Panel V1.0 +// http://www.inventapart.com/ +// +//#define RIGIDBOT_PANEL + +// +// BQ LCD Smart Controller shipped by +// default with the BQ Hephestos 2 and Witbox 2. +// +//#define BQ_LCD_SMART_CONTROLLER + +// +// Cartesio UI +// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface +// +//#define CARTESIO_UI + +// +// ANET and Tronxy Controller supported displays. +// +//#define ZONESTAR_LCD // Requires ADC_KEYPAD_PIN to be assigned to an analog pin. + // This LCD is known to be susceptible to electrical interference + // which scrambles the display. Pressing any button clears it up. + // This is a LCD2004 display with 5 analog buttons. + +//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6 + // A clone of the RepRapDiscount full graphics display but with + // different pins/wiring (see pins_ANET_10.h). + +// +// LCD for Melzi Card with Graphical LCD +// +//#define LCD_FOR_MELZI + +// +// LCD for Malyan M200 printers. +// This requires SDSUPPORT to be enabled +// +//#define MALYAN_LCD + +// +// CONTROLLER TYPE: I2C +// +// Note: These controllers require the installation of Arduino's LiquidCrystal_I2C +// library. For more info: https://github.com/kiyoshigawa/LiquidCrystal_I2C +// + +// +// Elefu RA Board Control Panel +// http://www.elefu.com/index.php?route=product/product&product_id=53 +// +//#define RA_CONTROL_PANEL + +// +// Sainsmart (YwRobot) LCD Displays +// +// These require F.Malpartida's LiquidCrystal_I2C library +// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home +// +//#define LCD_SAINSMART_I2C_1602 +//#define LCD_SAINSMART_I2C_2004 + +// +// Generic LCM1602 LCD adapter +// +//#define LCM1602 + +// +// PANELOLU2 LCD with status LEDs, +// separate encoder and click inputs. +// +// Note: This controller requires Arduino's LiquidTWI2 library v1.2.3 or later. +// For more info: https://github.com/lincomatic/LiquidTWI2 +// +// Note: The PANELOLU2 encoder click input can either be directly connected to +// a pin (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1). +// +//#define LCD_I2C_PANELOLU2 + +// +// Panucatt VIKI LCD with status LEDs, +// integrated click & L/R/U/D buttons, separate encoder inputs. +// +//#define LCD_I2C_VIKI + +// +// SSD1306 OLED full graphics generic display +// +//#define U8GLIB_SSD1306 + +// +// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules +// +//#define SAV_3DGLCD +#if ENABLED(SAV_3DGLCD) + //#define U8GLIB_SSD1306 + #define U8GLIB_SH1106 +#endif + +// +// Original Ulticontroller from Ultimaker 2 printer with SSD1309 I2C display and encoder +// https://github.com/Ultimaker/Ultimaker2/tree/master/1249_Ulticontroller_Board_(x1) +// +//#define ULTI_CONTROLLER + +// +// CONTROLLER TYPE: Shift register panels +// +// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH +// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD +// +//#define SAV_3DLCD + +// +// TinyBoy2 128x64 OLED / Encoder Panel +// +//#define OLED_PANEL_TINYBOY2 + +// +// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller +// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html +// +//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602 + +// +// MKS MINI12864 with graphic controller and SD support +// http://reprap.org/wiki/MKS_MINI_12864 +// +//#define MKS_MINI_12864 + +// +// Factory display for Creality CR-10 +// https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html +// +// This is RAMPS-compatible using a single 10-pin connector. +// (For CR-10 owners who want to replace the Melzi Creality board but retain the display) +// +//#define CR10_STOCKDISPLAY + +// +// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER +// http://reprap.org/wiki/MKS_12864OLED +// +// Tiny, but very sharp OLED display +// +//#define MKS_12864OLED // Uses the SH1106 controller (default) +//#define MKS_12864OLED_SSD1306 // Uses the SSD1306 controller + +// +// Silvergate GLCD controller +// http://github.com/android444/Silvergate +// +//#define SILVER_GATE_GLCD_CONTROLLER + +//============================================================================= +//=============================== Extra Features ============================== +//============================================================================= + +// @section extras + +// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino +//#define FAST_PWM_FAN + +// 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 +// is too low, you should also increment SOFT_PWM_SCALE. +//#define FAN_SOFT_PWM + +// Incrementing this by 1 will double the software PWM frequency, +// affecting heaters, and the fan if FAN_SOFT_PWM is enabled. +// However, control resolution will be halved for each increment; +// at zero value, there are 128 effective control positions. +#define SOFT_PWM_SCALE 0 + +// If SOFT_PWM_SCALE is set to a value higher than 0, dithering can +// be used to mitigate the associated resolution loss. If enabled, +// some of the PWM cycles are stretched so on average the desired +// duty cycle is attained. +//#define SOFT_PWM_DITHER + +// Temperature status LEDs that display the hotend and bed temperature. +// If all hotends, bed temperature, and target temperature are under 54C +// then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis) +//#define TEMP_STAT_LEDS + +// M240 Triggers a camera by emulating a Canon RC-1 Remote +// Data from: http://www.doc-diy.net/photo/rc-1_hacked/ +//#define PHOTOGRAPH_PIN 23 + +// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure +//#define SF_ARC_FIX + +// Support for the BariCUDA Paste Extruder +//#define BARICUDA + +// Support for BlinkM/CyzRgb +//#define BLINKM + +// Support for PCA9632 PWM LED driver +//#define PCA9632 + +/** + * RGB LED / LED Strip Control + * + * Enable support for an RGB LED connected to 5V digital pins, or + * an RGB Strip connected to MOSFETs controlled by digital pins. + * + * Adds the M150 command to set the LED (or LED strip) color. + * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of + * luminance values can be set from 0 to 255. + * For Neopixel LED an overall brightness parameter is also available. + * + * *** CAUTION *** + * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * as the Arduino cannot handle the current the LEDs will require. + * Failure to follow this precaution can destroy your Arduino! + * NOTE: A separate 5V power supply is required! The Neopixel LED needs + * more current than the Arduino 5V linear regulator can produce. + * *** CAUTION *** + * + * LED Type. Enable only one of the following two options. + * + */ +//#define RGB_LED +//#define RGBW_LED + +#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) + #define RGB_LED_R_PIN 34 + #define RGB_LED_G_PIN 43 + #define RGB_LED_B_PIN 35 + #define RGB_LED_W_PIN -1 +#endif + +// Support for Adafruit Neopixel LED driver +//#define NEOPIXEL_LED +#if ENABLED(NEOPIXEL_LED) + #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) + #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip + #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 +#endif + +/** + * Printer Event LEDs + * + * During printing, the LEDs will reflect the printer status: + * + * - Gradually change from blue to violet as the heated bed gets to target temp + * - Gradually change from violet to red as the hotend gets to temperature + * - Change to white to illuminate work surface + * - Change to green once print has finished + * - Turn off after the print has finished and the user has pushed a button + */ +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED) + #define PRINTER_EVENT_LEDS +#endif + +/** + * R/C SERVO support + * Sponsored by TrinityLabs, Reworked by codexmas + */ + +/** + * Number of servos + * + * For some servo-related options NUM_SERVOS will be set automatically. + * Set this manually if there are extra servos needing manual control. + * Leave undefined or set to 0 to entirely disable the servo subsystem. + */ +//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command + +// Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle. +// 300ms is a good value but you can try less delay. +// If the servo can't reach the requested position, increase it. +#define SERVO_DELAY { 300 } + +// Servo deactivation +// +// With this option servos are powered only during movement, then turned off to prevent jitter. +//#define DEACTIVATE_SERVOS_AFTER_MOVE + +#endif // CONFIGURATION_H diff --git a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h index 009e33674c..17ada4f86b 100644 --- a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h +++ b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h @@ -307,6 +307,7 @@ #define TEMP_SENSOR_3 0 #define TEMP_SENSOR_4 0 #define TEMP_SENSOR_BED 1 +#define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -389,23 +390,30 @@ //=========================================================================== //============================= PID > Bed Temperature Control =============== //=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ //#define PIDTEMPBED //#define BED_LIMIT_SWITCHING -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #if ENABLED(PIDTEMPBED) @@ -645,7 +653,7 @@ /** * Z Servo Probe, such as an endstop switch on a rotating arm. */ -//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles /** @@ -664,6 +672,9 @@ * readings with inductive probes and piezo sensors. */ //#define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif //#define PROBING_FANS_OFF // Turn fans off when probing //#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors @@ -736,6 +747,8 @@ #define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points //#define Z_AFTER_PROBING 5 // Z position after probing is done +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + // For M851 give a range for adjusting the Z probe offset #define Z_PROBE_OFFSET_RANGE_MIN -20 #define Z_PROBE_OFFSET_RANGE_MAX 20 @@ -836,6 +849,10 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + /** * Filament Runout Sensors * Mechanical or opto endstops are used to check for the presence of filament. @@ -1026,6 +1043,11 @@ // Add a menu item to move between bed corners for manual bed adjustment //#define LEVEL_BED_CORNERS +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + /** * Commands to execute at the end of G29 probing. * Useful to retract or move the Z probe out of the way. diff --git a/Marlin/example_configurations/RigidBot/Configuration.h b/Marlin/example_configurations/RigidBot/Configuration.h index 0f92bcea74..70fb32c493 100644 --- a/Marlin/example_configurations/RigidBot/Configuration.h +++ b/Marlin/example_configurations/RigidBot/Configuration.h @@ -310,6 +310,7 @@ #define TEMP_SENSOR_3 0 #define TEMP_SENSOR_4 0 #define TEMP_SENSOR_BED 1 +#define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -392,23 +393,30 @@ //=========================================================================== //============================= PID > Bed Temperature Control =============== //=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ //#define PIDTEMPBED //#define BED_LIMIT_SWITCHING -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #if ENABLED(PIDTEMPBED) @@ -643,7 +651,7 @@ /** * Z Servo Probe, such as an endstop switch on a rotating arm. */ -//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles /** @@ -662,6 +670,9 @@ * readings with inductive probes and piezo sensors. */ //#define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif //#define PROBING_FANS_OFF // Turn fans off when probing //#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors @@ -734,6 +745,8 @@ #define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points //#define Z_AFTER_PROBING 5 // Z position after probing is done +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + // For M851 give a range for adjusting the Z probe offset #define Z_PROBE_OFFSET_RANGE_MIN -20 #define Z_PROBE_OFFSET_RANGE_MAX 20 @@ -834,6 +847,10 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + /** * Filament Runout Sensors * Mechanical or opto endstops are used to check for the presence of filament. @@ -1024,6 +1041,11 @@ // Add a menu item to move between bed corners for manual bed adjustment //#define LEVEL_BED_CORNERS +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + /** * Commands to execute at the end of G29 probing. * Useful to retract or move the Z probe out of the way. diff --git a/Marlin/example_configurations/RigidBot/Configuration_adv.h b/Marlin/example_configurations/RigidBot/Configuration_adv.h index ef4a613921..e6a44267bb 100644 --- a/Marlin/example_configurations/RigidBot/Configuration_adv.h +++ b/Marlin/example_configurations/RigidBot/Configuration_adv.h @@ -230,6 +230,7 @@ #define E2_AUTO_FAN_PIN -1 #define E3_AUTO_FAN_PIN -1 #define E4_AUTO_FAN_PIN -1 +#define CHAMBER_AUTO_FAN_PIN -1 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50 #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed @@ -554,6 +555,16 @@ // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART + /** + * Continue after Power-Loss (Creality3D) + * + * Store the current state to the SD Card at the start of each layer + * during SD printing. If the recovery file is found at boot time, present + * an option on the LCD screen to continue the print from the last-known + * point in the file. + */ + //#define POWER_LOSS_RECOVERY + /** * Sort SD file listings in alphabetical order. * @@ -899,38 +910,44 @@ */ //#define ADVANCED_PAUSE_FEATURE #if ENABLED(ADVANCED_PAUSE_FEATURE) - #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_LENGTH 100 // (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_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast. - #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (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_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate. - #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (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. - - // Filament Unload does a Retract, Delay, and Purge first: - #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. - #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. - - //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. - //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) + #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_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. + // 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. + // 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_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. + // 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. + // 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. + + // Filament Unload does a Retract, Delay, and Purge first: + #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. + #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. + + //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) #endif // @section tmc diff --git a/Marlin/example_configurations/SCARA/Configuration.h b/Marlin/example_configurations/SCARA/Configuration.h index cbd6f59949..699aabecfa 100644 --- a/Marlin/example_configurations/SCARA/Configuration.h +++ b/Marlin/example_configurations/SCARA/Configuration.h @@ -73,6 +73,7 @@ #if ENABLED(MORGAN_SCARA) || ENABLED(MAKERARM_SCARA) //#define DEBUG_SCARA_KINEMATICS + //#define SCARA_FEEDRATE_SCALING // Convert XY feedrate from mm/s to degrees/s on the fly // If movement is choppy try lowering this value #define SCARA_SEGMENTS_PER_SECOND 200 @@ -336,6 +337,7 @@ #define TEMP_SENSOR_3 0 #define TEMP_SENSOR_4 0 #define TEMP_SENSOR_BED 1 +#define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -406,23 +408,30 @@ //=========================================================================== //============================= PID > Bed Temperature Control =============== //=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ #define PIDTEMPBED //#define BED_LIMIT_SWITCHING -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #if ENABLED(PIDTEMPBED) @@ -496,23 +505,23 @@ // Specify here all the endstop connectors that are connected to any endstop or probe. // Almost all printers will be using one per axis. Probes will use one or more of the // extra connectors. Leave undefined any used for non-endstop and non-probe purposes. -#define USE_XMIN_PLUG -#define USE_YMIN_PLUG +//#define USE_XMIN_PLUG +//#define USE_YMIN_PLUG #define USE_ZMIN_PLUG -//#define USE_XMAX_PLUG -//#define USE_YMAX_PLUG +#define USE_XMAX_PLUG +#define USE_YMAX_PLUG //#define USE_ZMAX_PLUG // Enable pullup for all endstops to prevent a floating state //#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) // Disable ENDSTOPPULLUPS to set pullups individually - //#define ENDSTOPPULLUP_XMAX - //#define ENDSTOPPULLUP_YMAX - #define ENDSTOPPULLUP_ZMAX // open pin, inverted - #define ENDSTOPPULLUP_XMIN // open pin, inverted - #define ENDSTOPPULLUP_YMIN // open pin, inverted - //#define ENDSTOPPULLUP_ZMIN + #define ENDSTOPPULLUP_XMAX + #define ENDSTOPPULLUP_YMAX + //#define ENDSTOPPULLUP_ZMAX // open pin, inverted + //#define ENDSTOPPULLUP_XMIN // open pin, inverted + //#define ENDSTOPPULLUP_YMIN // open pin, inverted + #define ENDSTOPPULLUP_ZMIN //#define ENDSTOPPULLUP_ZMIN_PROBE #endif @@ -656,7 +665,7 @@ /** * Z Servo Probe, such as an endstop switch on a rotating arm. */ -//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles /** @@ -675,6 +684,9 @@ * readings with inductive probes and piezo sensors. */ //#define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif //#define PROBING_FANS_OFF // Turn fans off when probing //#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors @@ -747,6 +759,8 @@ #define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points //#define Z_AFTER_PROBING 5 // Z position after probing is done +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + // For M851 give a range for adjusting the Z probe offset #define Z_PROBE_OFFSET_RANGE_MIN -20 #define Z_PROBE_OFFSET_RANGE_MAX 20 @@ -847,6 +861,10 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + /** * Filament Runout Sensors * Mechanical or opto endstops are used to check for the presence of filament. @@ -1037,6 +1055,11 @@ // Add a menu item to move between bed corners for manual bed adjustment //#define LEVEL_BED_CORNERS +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + /** * Commands to execute at the end of G29 probing. * Useful to retract or move the Z probe out of the way. diff --git a/Marlin/example_configurations/SCARA/Configuration_adv.h b/Marlin/example_configurations/SCARA/Configuration_adv.h index 71597ab6a2..a203253afe 100644 --- a/Marlin/example_configurations/SCARA/Configuration_adv.h +++ b/Marlin/example_configurations/SCARA/Configuration_adv.h @@ -230,6 +230,7 @@ #define E2_AUTO_FAN_PIN -1 #define E3_AUTO_FAN_PIN -1 #define E4_AUTO_FAN_PIN -1 +#define CHAMBER_AUTO_FAN_PIN -1 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50 #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed @@ -554,6 +555,16 @@ // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART + /** + * Continue after Power-Loss (Creality3D) + * + * Store the current state to the SD Card at the start of each layer + * during SD printing. If the recovery file is found at boot time, present + * an option on the LCD screen to continue the print from the last-known + * point in the file. + */ + //#define POWER_LOSS_RECOVERY + /** * Sort SD file listings in alphabetical order. * @@ -899,38 +910,44 @@ */ //#define ADVANCED_PAUSE_FEATURE #if ENABLED(ADVANCED_PAUSE_FEATURE) - #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_LENGTH 100 // (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_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast. - #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (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_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate. - #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (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. - - // Filament Unload does a Retract, Delay, and Purge first: - #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. - #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. - - //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. - //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) + #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_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. + // 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. + // 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_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. + // 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. + // 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. + + // Filament Unload does a Retract, Delay, and Purge first: + #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. + #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. + + //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) #endif // @section tmc diff --git a/Marlin/example_configurations/Sanguinololu/Configuration.h b/Marlin/example_configurations/Sanguinololu/Configuration.h index 3764dc489e..5a3a1a6010 100644 --- a/Marlin/example_configurations/Sanguinololu/Configuration.h +++ b/Marlin/example_configurations/Sanguinololu/Configuration.h @@ -307,6 +307,7 @@ #define TEMP_SENSOR_3 0 #define TEMP_SENSOR_4 0 #define TEMP_SENSOR_BED 1 +#define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -389,23 +390,30 @@ //=========================================================================== //============================= PID > Bed Temperature Control =============== //=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ //#define PIDTEMPBED //#define BED_LIMIT_SWITCHING -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #if ENABLED(PIDTEMPBED) @@ -676,7 +684,7 @@ /** * Z Servo Probe, such as an endstop switch on a rotating arm. */ -//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles /** @@ -695,6 +703,9 @@ * readings with inductive probes and piezo sensors. */ //#define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif //#define PROBING_FANS_OFF // Turn fans off when probing //#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors @@ -767,6 +778,8 @@ #define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points //#define Z_AFTER_PROBING 5 // Z position after probing is done +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + // For M851 give a range for adjusting the Z probe offset #define Z_PROBE_OFFSET_RANGE_MIN -20 #define Z_PROBE_OFFSET_RANGE_MAX 20 @@ -867,6 +880,10 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + /** * Filament Runout Sensors * Mechanical or opto endstops are used to check for the presence of filament. @@ -1057,6 +1074,11 @@ // Add a menu item to move between bed corners for manual bed adjustment //#define LEVEL_BED_CORNERS +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + /** * Commands to execute at the end of G29 probing. * Useful to retract or move the Z probe out of the way. diff --git a/Marlin/example_configurations/Sanguinololu/Configuration_adv.h b/Marlin/example_configurations/Sanguinololu/Configuration_adv.h index 8f16748742..e3d4ccbc5a 100644 --- a/Marlin/example_configurations/Sanguinololu/Configuration_adv.h +++ b/Marlin/example_configurations/Sanguinololu/Configuration_adv.h @@ -230,6 +230,7 @@ #define E2_AUTO_FAN_PIN -1 #define E3_AUTO_FAN_PIN -1 #define E4_AUTO_FAN_PIN -1 +#define CHAMBER_AUTO_FAN_PIN -1 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50 #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed @@ -554,6 +555,16 @@ // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART + /** + * Continue after Power-Loss (Creality3D) + * + * Store the current state to the SD Card at the start of each layer + * during SD printing. If the recovery file is found at boot time, present + * an option on the LCD screen to continue the print from the last-known + * point in the file. + */ + //#define POWER_LOSS_RECOVERY + /** * Sort SD file listings in alphabetical order. * @@ -899,38 +910,44 @@ */ //#define ADVANCED_PAUSE_FEATURE #if ENABLED(ADVANCED_PAUSE_FEATURE) - #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_LENGTH 100 // (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_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast. - #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (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_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate. - #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (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. - - // Filament Unload does a Retract, Delay, and Purge first: - #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. - #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. - - //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. - //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) + #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_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. + // 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. + // 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_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. + // 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. + // 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. + + // Filament Unload does a Retract, Delay, and Purge first: + #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. + #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. + + //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) #endif // @section tmc diff --git a/Marlin/example_configurations/TinyBoy2/Configuration.h b/Marlin/example_configurations/TinyBoy2/Configuration.h index 4ef284c05e..0302db9012 100644 --- a/Marlin/example_configurations/TinyBoy2/Configuration.h +++ b/Marlin/example_configurations/TinyBoy2/Configuration.h @@ -334,6 +334,7 @@ #else #define TEMP_SENSOR_BED 0 #endif +#define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -426,23 +427,30 @@ //=========================================================================== //============================= PID > Bed Temperature Control =============== //=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ #define PIDTEMPBED //#define BED_LIMIT_SWITCHING -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #if ENABLED(PIDTEMPBED) @@ -696,7 +704,7 @@ /** * Z Servo Probe, such as an endstop switch on a rotating arm. */ -//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles /** @@ -715,6 +723,9 @@ * readings with inductive probes and piezo sensors. */ //#define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif //#define PROBING_FANS_OFF // Turn fans off when probing //#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors @@ -787,6 +798,8 @@ #define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points //#define Z_AFTER_PROBING 5 // Z position after probing is done +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + // For M851 give a range for adjusting the Z probe offset #define Z_PROBE_OFFSET_RANGE_MIN -20 #define Z_PROBE_OFFSET_RANGE_MAX 20 @@ -892,6 +905,10 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + /** * Filament Runout Sensors * Mechanical or opto endstops are used to check for the presence of filament. @@ -1082,6 +1099,11 @@ // Add a menu item to move between bed corners for manual bed adjustment //#define LEVEL_BED_CORNERS +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + /** * Commands to execute at the end of G29 probing. * Useful to retract or move the Z probe out of the way. diff --git a/Marlin/example_configurations/TinyBoy2/Configuration_adv.h b/Marlin/example_configurations/TinyBoy2/Configuration_adv.h index b28488f3e4..62adf41fa1 100644 --- a/Marlin/example_configurations/TinyBoy2/Configuration_adv.h +++ b/Marlin/example_configurations/TinyBoy2/Configuration_adv.h @@ -230,6 +230,7 @@ #define E2_AUTO_FAN_PIN -1 #define E3_AUTO_FAN_PIN -1 #define E4_AUTO_FAN_PIN -1 +#define CHAMBER_AUTO_FAN_PIN -1 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50 #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed @@ -554,6 +555,16 @@ // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART + /** + * Continue after Power-Loss (Creality3D) + * + * Store the current state to the SD Card at the start of each layer + * during SD printing. If the recovery file is found at boot time, present + * an option on the LCD screen to continue the print from the last-known + * point in the file. + */ + //#define POWER_LOSS_RECOVERY + /** * Sort SD file listings in alphabetical order. * @@ -899,38 +910,44 @@ */ //#define ADVANCED_PAUSE_FEATURE #if ENABLED(ADVANCED_PAUSE_FEATURE) - #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_LENGTH 100 // (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_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast. - #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (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_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate. - #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (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. - - // Filament Unload does a Retract, Delay, and Purge first: - #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. - #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. - - //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. - //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) + #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_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. + // 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. + // 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_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. + // 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. + // 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. + + // Filament Unload does a Retract, Delay, and Purge first: + #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. + #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. + + //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) #endif // @section tmc diff --git a/Marlin/example_configurations/Tronxy/X1/Configuration.h b/Marlin/example_configurations/Tronxy/X1/Configuration.h index 8a6f77acb9..befd0e2b68 100644 --- a/Marlin/example_configurations/Tronxy/X1/Configuration.h +++ b/Marlin/example_configurations/Tronxy/X1/Configuration.h @@ -307,6 +307,7 @@ #define TEMP_SENSOR_3 0 #define TEMP_SENSOR_4 0 #define TEMP_SENSOR_BED 0 +#define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -389,23 +390,30 @@ //=========================================================================== //============================= PID > Bed Temperature Control =============== //=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ //#define PIDTEMPBED //#define BED_LIMIT_SWITCHING -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #if ENABLED(PIDTEMPBED) @@ -645,7 +653,7 @@ /** * Z Servo Probe, such as an endstop switch on a rotating arm. */ -//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles /** @@ -664,6 +672,9 @@ * readings with inductive probes and piezo sensors. */ //#define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif //#define PROBING_FANS_OFF // Turn fans off when probing //#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors @@ -736,6 +747,8 @@ #define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points //#define Z_AFTER_PROBING 5 // Z position after probing is done +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + // For M851 give a range for adjusting the Z probe offset #define Z_PROBE_OFFSET_RANGE_MIN -20 #define Z_PROBE_OFFSET_RANGE_MAX 20 @@ -836,6 +849,10 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + /** * Filament Runout Sensors * Mechanical or opto endstops are used to check for the presence of filament. @@ -1026,6 +1043,11 @@ // Add a menu item to move between bed corners for manual bed adjustment #define LEVEL_BED_CORNERS +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + /** * Commands to execute at the end of G29 probing. * Useful to retract or move the Z probe out of the way. diff --git a/Marlin/example_configurations/Tronxy/X5S/Configuration.h b/Marlin/example_configurations/Tronxy/X5S/Configuration.h index e0bed9102f..0f7777ca5b 100644 --- a/Marlin/example_configurations/Tronxy/X5S/Configuration.h +++ b/Marlin/example_configurations/Tronxy/X5S/Configuration.h @@ -307,6 +307,7 @@ #define TEMP_SENSOR_3 0 #define TEMP_SENSOR_4 0 #define TEMP_SENSOR_BED 1 +#define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -389,23 +390,30 @@ //=========================================================================== //============================= PID > Bed Temperature Control =============== //=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ //#define PIDTEMPBED //#define BED_LIMIT_SWITCHING -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #if ENABLED(PIDTEMPBED) @@ -645,7 +653,7 @@ /** * Z Servo Probe, such as an endstop switch on a rotating arm. */ -//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles /** @@ -664,6 +672,9 @@ * readings with inductive probes and piezo sensors. */ //#define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif //#define PROBING_FANS_OFF // Turn fans off when probing //#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors @@ -736,6 +747,8 @@ #define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points //#define Z_AFTER_PROBING 5 // Z position after probing is done +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + // For M851 give a range for adjusting the Z probe offset #define Z_PROBE_OFFSET_RANGE_MIN -20 #define Z_PROBE_OFFSET_RANGE_MAX 20 @@ -836,6 +849,10 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + /** * Filament Runout Sensors * Mechanical or opto endstops are used to check for the presence of filament. @@ -1026,6 +1043,11 @@ // Add a menu item to move between bed corners for manual bed adjustment #define LEVEL_BED_CORNERS +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + /** * Commands to execute at the end of G29 probing. * Useful to retract or move the Z probe out of the way. diff --git a/Marlin/example_configurations/Tronxy/XY100/Configuration.h b/Marlin/example_configurations/Tronxy/XY100/Configuration.h index 0ee5d0f00f..fa7c86d3b0 100644 --- a/Marlin/example_configurations/Tronxy/XY100/Configuration.h +++ b/Marlin/example_configurations/Tronxy/XY100/Configuration.h @@ -307,6 +307,7 @@ #define TEMP_SENSOR_3 0 #define TEMP_SENSOR_4 0 #define TEMP_SENSOR_BED 0 +#define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -400,23 +401,30 @@ //=========================================================================== //============================= PID > Bed Temperature Control =============== //=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ //#define PIDTEMPBED //#define BED_LIMIT_SWITCHING -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #if ENABLED(PIDTEMPBED) @@ -656,7 +664,7 @@ /** * Z Servo Probe, such as an endstop switch on a rotating arm. */ -//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles /** @@ -675,6 +683,9 @@ * readings with inductive probes and piezo sensors. */ //#define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif //#define PROBING_FANS_OFF // Turn fans off when probing //#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors @@ -747,6 +758,8 @@ #define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points //#define Z_AFTER_PROBING 5 // Z position after probing is done +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + // For M851 give a range for adjusting the Z probe offset #define Z_PROBE_OFFSET_RANGE_MIN -20 #define Z_PROBE_OFFSET_RANGE_MAX 20 @@ -847,6 +860,10 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + /** * Filament Runout Sensors * Mechanical or opto endstops are used to check for the presence of filament. @@ -1037,6 +1054,11 @@ // Add a menu item to move between bed corners for manual bed adjustment //#define LEVEL_BED_CORNERS +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + /** * Commands to execute at the end of G29 probing. * Useful to retract or move the Z probe out of the way. diff --git a/Marlin/example_configurations/Velleman/K8200/Configuration.h b/Marlin/example_configurations/Velleman/K8200/Configuration.h index 39b209b522..0ad48766e7 100644 --- a/Marlin/example_configurations/Velleman/K8200/Configuration.h +++ b/Marlin/example_configurations/Velleman/K8200/Configuration.h @@ -327,6 +327,7 @@ #define TEMP_SENSOR_3 0 #define TEMP_SENSOR_4 0 #define TEMP_SENSOR_BED 5 +#define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -413,23 +414,30 @@ //=========================================================================== //============================= PID > Bed Temperature Control =============== //=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ #define PIDTEMPBED //#define BED_LIMIT_SWITCHING -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #if ENABLED(PIDTEMPBED) @@ -674,7 +682,7 @@ /** * Z Servo Probe, such as an endstop switch on a rotating arm. */ -//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles /** @@ -693,6 +701,9 @@ * readings with inductive probes and piezo sensors. */ //#define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif //#define PROBING_FANS_OFF // Turn fans off when probing //#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors @@ -765,6 +776,8 @@ #define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points //#define Z_AFTER_PROBING 5 // Z position after probing is done +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + // For M851 give a range for adjusting the Z probe offset #define Z_PROBE_OFFSET_RANGE_MIN -20 #define Z_PROBE_OFFSET_RANGE_MAX 20 @@ -866,6 +879,10 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + /** * Filament Runout Sensors * Mechanical or opto endstops are used to check for the presence of filament. @@ -1056,6 +1073,11 @@ // Add a menu item to move between bed corners for manual bed adjustment //#define LEVEL_BED_CORNERS +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + /** * Commands to execute at the end of G29 probing. * Useful to retract or move the Z probe out of the way. diff --git a/Marlin/example_configurations/Velleman/K8200/Configuration_adv.h b/Marlin/example_configurations/Velleman/K8200/Configuration_adv.h index 592635dcc2..2cad50b816 100644 --- a/Marlin/example_configurations/Velleman/K8200/Configuration_adv.h +++ b/Marlin/example_configurations/Velleman/K8200/Configuration_adv.h @@ -243,6 +243,7 @@ #define E2_AUTO_FAN_PIN -1 #define E3_AUTO_FAN_PIN -1 #define E4_AUTO_FAN_PIN -1 +#define CHAMBER_AUTO_FAN_PIN -1 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50 #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed @@ -567,6 +568,16 @@ // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART + /** + * Continue after Power-Loss (Creality3D) + * + * Store the current state to the SD Card at the start of each layer + * during SD printing. If the recovery file is found at boot time, present + * an option on the LCD screen to continue the print from the last-known + * point in the file. + */ + //#define POWER_LOSS_RECOVERY + /** * Sort SD file listings in alphabetical order. * @@ -912,38 +923,44 @@ */ //#define ADVANCED_PAUSE_FEATURE #if ENABLED(ADVANCED_PAUSE_FEATURE) - #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_LENGTH 100 // (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_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast. - #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (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_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate. - #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (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. - - // Filament Unload does a Retract, Delay, and Purge first: - #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. - #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. - - //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. - //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) + #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_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. + // 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. + // 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_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. + // 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. + // 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. + + // Filament Unload does a Retract, Delay, and Purge first: + #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. + #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. + + //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) #endif // @section tmc diff --git a/Marlin/example_configurations/Velleman/K8400/Configuration.h b/Marlin/example_configurations/Velleman/K8400/Configuration.h index c083398729..35bdceb7ba 100644 --- a/Marlin/example_configurations/Velleman/K8400/Configuration.h +++ b/Marlin/example_configurations/Velleman/K8400/Configuration.h @@ -307,6 +307,7 @@ #define TEMP_SENSOR_3 0 #define TEMP_SENSOR_4 0 #define TEMP_SENSOR_BED 0 +#define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -389,23 +390,30 @@ //=========================================================================== //============================= PID > Bed Temperature Control =============== //=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ //#define PIDTEMPBED //#define BED_LIMIT_SWITCHING -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #if ENABLED(PIDTEMPBED) @@ -645,7 +653,7 @@ /** * Z Servo Probe, such as an endstop switch on a rotating arm. */ -//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles /** @@ -664,6 +672,9 @@ * readings with inductive probes and piezo sensors. */ //#define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif //#define PROBING_FANS_OFF // Turn fans off when probing //#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors @@ -736,6 +747,8 @@ #define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points //#define Z_AFTER_PROBING 5 // Z position after probing is done +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + // For M851 give a range for adjusting the Z probe offset #define Z_PROBE_OFFSET_RANGE_MIN -20 #define Z_PROBE_OFFSET_RANGE_MAX 20 @@ -836,6 +849,10 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + /** * Filament Runout Sensors * Mechanical or opto endstops are used to check for the presence of filament. @@ -1026,6 +1043,11 @@ // Add a menu item to move between bed corners for manual bed adjustment //#define LEVEL_BED_CORNERS +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + /** * Commands to execute at the end of G29 probing. * Useful to retract or move the Z probe out of the way. diff --git a/Marlin/example_configurations/Velleman/K8400/Configuration_adv.h b/Marlin/example_configurations/Velleman/K8400/Configuration_adv.h index 5376626ce8..da991c7748 100644 --- a/Marlin/example_configurations/Velleman/K8400/Configuration_adv.h +++ b/Marlin/example_configurations/Velleman/K8400/Configuration_adv.h @@ -230,6 +230,7 @@ #define E2_AUTO_FAN_PIN -1 #define E3_AUTO_FAN_PIN -1 #define E4_AUTO_FAN_PIN -1 +#define CHAMBER_AUTO_FAN_PIN -1 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50 #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed @@ -554,6 +555,16 @@ // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART + /** + * Continue after Power-Loss (Creality3D) + * + * Store the current state to the SD Card at the start of each layer + * during SD printing. If the recovery file is found at boot time, present + * an option on the LCD screen to continue the print from the last-known + * point in the file. + */ + //#define POWER_LOSS_RECOVERY + /** * Sort SD file listings in alphabetical order. * @@ -899,38 +910,44 @@ */ //#define ADVANCED_PAUSE_FEATURE #if ENABLED(ADVANCED_PAUSE_FEATURE) - #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate. - #define PAUSE_PARK_RETRACT_LENGTH 5 // (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_LENGTH 600 // (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_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast. - #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (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_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate. - #define ADVANCED_PAUSE_EXTRUDE_LENGTH 100 // (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. - - // Filament Unload does a Retract, Delay, and Purge first: - #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. - #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. - - //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. - //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) + #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate. + #define PAUSE_PARK_RETRACT_LENGTH 5 // (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_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate. + #define FILAMENT_CHANGE_UNLOAD_LENGTH 600 // (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. + // 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_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. + // 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 100 // (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. + + // Filament Unload does a Retract, Delay, and Purge first: + #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. + #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. + + //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) #endif // @section tmc diff --git a/Marlin/example_configurations/Velleman/K8400/Dual-head/Configuration.h b/Marlin/example_configurations/Velleman/K8400/Dual-head/Configuration.h index d1715fbfc8..f05fdc2ffd 100644 --- a/Marlin/example_configurations/Velleman/K8400/Dual-head/Configuration.h +++ b/Marlin/example_configurations/Velleman/K8400/Dual-head/Configuration.h @@ -307,6 +307,7 @@ #define TEMP_SENSOR_3 0 #define TEMP_SENSOR_4 0 #define TEMP_SENSOR_BED 0 +#define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -389,23 +390,30 @@ //=========================================================================== //============================= PID > Bed Temperature Control =============== //=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ //#define PIDTEMPBED //#define BED_LIMIT_SWITCHING -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #if ENABLED(PIDTEMPBED) @@ -645,7 +653,7 @@ /** * Z Servo Probe, such as an endstop switch on a rotating arm. */ -//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles /** @@ -664,6 +672,9 @@ * readings with inductive probes and piezo sensors. */ //#define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif //#define PROBING_FANS_OFF // Turn fans off when probing //#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors @@ -736,6 +747,8 @@ #define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points //#define Z_AFTER_PROBING 5 // Z position after probing is done +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + // For M851 give a range for adjusting the Z probe offset #define Z_PROBE_OFFSET_RANGE_MIN -20 #define Z_PROBE_OFFSET_RANGE_MAX 20 @@ -836,6 +849,10 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + /** * Filament Runout Sensors * Mechanical or opto endstops are used to check for the presence of filament. @@ -1026,6 +1043,11 @@ // Add a menu item to move between bed corners for manual bed adjustment //#define LEVEL_BED_CORNERS +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + /** * Commands to execute at the end of G29 probing. * Useful to retract or move the Z probe out of the way. diff --git a/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration.h b/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration.h index ca85ed6a3e..996ec6b202 100644 --- a/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration.h +++ b/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration.h @@ -307,6 +307,7 @@ #define TEMP_SENSOR_3 0 #define TEMP_SENSOR_4 0 #define TEMP_SENSOR_BED 1 +#define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -394,23 +395,30 @@ //=========================================================================== //============================= PID > Bed Temperature Control =============== //=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ #define PIDTEMPBED //#define BED_LIMIT_SWITCHING -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #if ENABLED(PIDTEMPBED) @@ -655,7 +663,7 @@ /** * Z Servo Probe, such as an endstop switch on a rotating arm. */ -//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles /** @@ -674,6 +682,9 @@ * readings with inductive probes and piezo sensors. */ //#define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif //#define PROBING_FANS_OFF // Turn fans off when probing //#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors @@ -746,6 +757,8 @@ #define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points //#define Z_AFTER_PROBING 5 // Z position after probing is done +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + // For M851 give a range for adjusting the Z probe offset #define Z_PROBE_OFFSET_RANGE_MIN -20 #define Z_PROBE_OFFSET_RANGE_MAX 20 @@ -846,6 +859,10 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + /** * Filament Runout Sensors * Mechanical or opto endstops are used to check for the presence of filament. @@ -1033,6 +1050,11 @@ // Add a menu item to move between bed corners for manual bed adjustment //#define LEVEL_BED_CORNERS +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + /** * Commands to execute at the end of G29 probing. * Useful to retract or move the Z probe out of the way. diff --git a/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration_adv.h b/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration_adv.h index 679f47b1a8..02dc090188 100644 --- a/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration_adv.h +++ b/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration_adv.h @@ -230,6 +230,7 @@ #define E2_AUTO_FAN_PIN -1 #define E3_AUTO_FAN_PIN -1 #define E4_AUTO_FAN_PIN -1 +#define CHAMBER_AUTO_FAN_PIN -1 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50 #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed @@ -556,6 +557,16 @@ // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART + /** + * Continue after Power-Loss (Creality3D) + * + * Store the current state to the SD Card at the start of each layer + * during SD printing. If the recovery file is found at boot time, present + * an option on the LCD screen to continue the print from the last-known + * point in the file. + */ + //#define POWER_LOSS_RECOVERY + /** * Sort SD file listings in alphabetical order. * @@ -901,38 +912,44 @@ */ #define ADVANCED_PAUSE_FEATURE #if ENABLED(ADVANCED_PAUSE_FEATURE) - #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_LENGTH 100 // (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_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast. - #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (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_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate. - #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (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. - - // Filament Unload does a Retract, Delay, and Purge first: - #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. - #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. - - //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. - //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) + #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_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. + // 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. + // 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_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. + // 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. + // 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. + + // Filament Unload does a Retract, Delay, and Purge first: + #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. + #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. + + //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) #endif // @section tmc diff --git a/Marlin/example_configurations/adafruit/ST7565/Configuration.h b/Marlin/example_configurations/adafruit/ST7565/Configuration.h index 171cb7ccce..517df712b4 100644 --- a/Marlin/example_configurations/adafruit/ST7565/Configuration.h +++ b/Marlin/example_configurations/adafruit/ST7565/Configuration.h @@ -307,6 +307,7 @@ #define TEMP_SENSOR_3 0 #define TEMP_SENSOR_4 0 #define TEMP_SENSOR_BED 0 +#define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -389,23 +390,30 @@ //=========================================================================== //============================= PID > Bed Temperature Control =============== //=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ //#define PIDTEMPBED //#define BED_LIMIT_SWITCHING -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #if ENABLED(PIDTEMPBED) @@ -645,7 +653,7 @@ /** * Z Servo Probe, such as an endstop switch on a rotating arm. */ -//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles /** @@ -664,6 +672,9 @@ * readings with inductive probes and piezo sensors. */ //#define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif //#define PROBING_FANS_OFF // Turn fans off when probing //#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors @@ -736,6 +747,8 @@ #define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points //#define Z_AFTER_PROBING 5 // Z position after probing is done +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + // For M851 give a range for adjusting the Z probe offset #define Z_PROBE_OFFSET_RANGE_MIN -20 #define Z_PROBE_OFFSET_RANGE_MAX 20 @@ -836,6 +849,10 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + /** * Filament Runout Sensors * Mechanical or opto endstops are used to check for the presence of filament. @@ -1026,6 +1043,11 @@ // Add a menu item to move between bed corners for manual bed adjustment //#define LEVEL_BED_CORNERS +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + /** * Commands to execute at the end of G29 probing. * Useful to retract or move the Z probe out of the way. diff --git a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h index 29ca9a3680..af833e68b4 100644 --- a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h +++ b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h @@ -307,6 +307,7 @@ #define TEMP_SENSOR_3 0 #define TEMP_SENSOR_4 0 #define TEMP_SENSOR_BED 5 +#define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -394,23 +395,30 @@ //=========================================================================== //============================= PID > Bed Temperature Control =============== //=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ //#define PIDTEMPBED //#define BED_LIMIT_SWITCHING -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #if ENABLED(PIDTEMPBED) @@ -515,19 +523,13 @@ #if ENABLED(DELTA_AUTO_CALIBRATION) // set the default number of probe points : n*n (1 -> 7) #define DELTA_CALIBRATION_DEFAULT_POINTS 4 - - // Enable and set these values based on results of 'G33 A' - //#define H_FACTOR 1.01 - //#define R_FACTOR 2.61 - //#define A_FACTOR 0.87 - #endif #if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU) - // Set the radius for the calibration probe points - max 0.9 * DELTA_PRINTABLE_RADIUS for non-eccentric probes + // Set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS for non-eccentric probes #define DELTA_CALIBRATION_RADIUS 73.5 // mm // Set the steprate for papertest probing - #define PROBE_MANUALLY_STEP 0.025 + #define PROBE_MANUALLY_STEP 0.05 // mm #endif // Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers). @@ -623,7 +625,15 @@ * Override with M92 * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ -#define DEFAULT_AXIS_STEPS_PER_UNIT { 100, 100, 100, 100 } // default steps per unit for Kossel (GT2, 20 tooth) +// variables to calculate steps +#define XYZ_FULL_STEPS_PER_ROTATION 200 +#define XYZ_MICROSTEPS 16 +#define XYZ_BELT_PITCH 2 +#define XYZ_PULLEY_TEETH 16 + +// delta speeds must be the same on xyz +#define DEFAULT_XYZ_STEPS_PER_UNIT ((XYZ_FULL_STEPS_PER_ROTATION) * (XYZ_MICROSTEPS) / double(XYZ_BELT_PITCH) / double(XYZ_PULLEY_TEETH)) +#define DEFAULT_AXIS_STEPS_PER_UNIT { DEFAULT_XYZ_STEPS_PER_UNIT, DEFAULT_XYZ_STEPS_PER_UNIT, DEFAULT_XYZ_STEPS_PER_UNIT, 100 } // default steps per unit for Kossel (GT2, 20 tooth) /** * Default Max Feed Rate (mm/s) @@ -725,7 +735,7 @@ /** * Z Servo Probe, such as an endstop switch on a rotating arm. */ -//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles /** @@ -744,6 +754,9 @@ * readings with inductive probes and piezo sensors. */ //#define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif //#define PROBING_FANS_OFF // Turn fans off when probing //#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors @@ -866,6 +879,8 @@ #define Z_CLEARANCE_BETWEEN_PROBES 2 // Z Clearance between probe points //#define Z_AFTER_PROBING 2 // Z position after probing is done +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + // For M851 give a range for adjusting the Z probe offset #define Z_PROBE_OFFSET_RANGE_MIN -20 #define Z_PROBE_OFFSET_RANGE_MAX 20 @@ -966,6 +981,10 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + /** * Filament Runout Sensors * Mechanical or opto endstops are used to check for the presence of filament. @@ -1175,6 +1194,11 @@ // Add a menu item to move between bed corners for manual bed adjustment //#define LEVEL_BED_CORNERS +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + /** * Commands to execute at the end of G29 probing. * Useful to retract or move the Z probe out of the way. diff --git a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h index 58af840299..2d2f2fe87f 100644 --- a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h +++ b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h @@ -230,6 +230,7 @@ #define E2_AUTO_FAN_PIN -1 #define E3_AUTO_FAN_PIN -1 #define E4_AUTO_FAN_PIN -1 +#define CHAMBER_AUTO_FAN_PIN -1 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50 #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed @@ -556,6 +557,16 @@ // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART + /** + * Continue after Power-Loss (Creality3D) + * + * Store the current state to the SD Card at the start of each layer + * during SD printing. If the recovery file is found at boot time, present + * an option on the LCD screen to continue the print from the last-known + * point in the file. + */ + //#define POWER_LOSS_RECOVERY + /** * Sort SD file listings in alphabetical order. * @@ -901,38 +912,44 @@ */ //#define ADVANCED_PAUSE_FEATURE #if ENABLED(ADVANCED_PAUSE_FEATURE) - #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_LENGTH 100 // (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_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast. - #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (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_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate. - #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (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. - - // Filament Unload does a Retract, Delay, and Purge first: - #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. - #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. - - //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. - //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) + #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_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. + // 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. + // 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_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. + // 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. + // 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. + + // Filament Unload does a Retract, Delay, and Purge first: + #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. + #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. + + //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) #endif // @section tmc diff --git a/Marlin/example_configurations/delta/FLSUN/kossel/Configuration.h b/Marlin/example_configurations/delta/FLSUN/kossel/Configuration.h index 8cfa071932..7775ccbfbd 100644 --- a/Marlin/example_configurations/delta/FLSUN/kossel/Configuration.h +++ b/Marlin/example_configurations/delta/FLSUN/kossel/Configuration.h @@ -307,6 +307,7 @@ #define TEMP_SENSOR_3 0 #define TEMP_SENSOR_4 0 #define TEMP_SENSOR_BED 5 +#define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -394,23 +395,30 @@ //=========================================================================== //============================= PID > Bed Temperature Control =============== //=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ //#define PIDTEMPBED //#define BED_LIMIT_SWITCHING -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #if ENABLED(PIDTEMPBED) @@ -515,19 +523,13 @@ #if ENABLED(DELTA_AUTO_CALIBRATION) // set the default number of probe points : n*n (1 -> 7) #define DELTA_CALIBRATION_DEFAULT_POINTS 7 - - // Enable and set these values based on results of 'G33 A' - //#define H_FACTOR 1.01 - //#define R_FACTOR 2.61 - //#define A_FACTOR 0.87 - #endif #if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU) - // Set the radius for the calibration probe points - max 0.9 * DELTA_PRINTABLE_RADIUS for non-eccentric probes + // Set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS for non-eccentric probes #define DELTA_CALIBRATION_RADIUS 63 // mm // Set the steprate for papertest probing - #define PROBE_MANUALLY_STEP 0.025 + #define PROBE_MANUALLY_STEP 0.05 // mm #endif // Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers). @@ -623,7 +625,15 @@ * Override with M92 * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ -#define DEFAULT_AXIS_STEPS_PER_UNIT { 100, 100, 100, 100 } // default steps per unit for Kossel (GT2, 20 tooth) +// variables to calculate steps +#define XYZ_FULL_STEPS_PER_ROTATION 200 +#define XYZ_MICROSTEPS 16 +#define XYZ_BELT_PITCH 2 +#define XYZ_PULLEY_TEETH 16 + +// delta speeds must be the same on xyz +#define DEFAULT_XYZ_STEPS_PER_UNIT ((XYZ_FULL_STEPS_PER_ROTATION) * (XYZ_MICROSTEPS) / double(XYZ_BELT_PITCH) / double(XYZ_PULLEY_TEETH)) +#define DEFAULT_AXIS_STEPS_PER_UNIT { DEFAULT_XYZ_STEPS_PER_UNIT, DEFAULT_XYZ_STEPS_PER_UNIT, DEFAULT_XYZ_STEPS_PER_UNIT, 100 } // default steps per unit for Kossel (GT2, 20 tooth) /** * Default Max Feed Rate (mm/s) @@ -725,7 +735,7 @@ /** * Z Servo Probe, such as an endstop switch on a rotating arm. */ -//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles /** @@ -744,6 +754,9 @@ * readings with inductive probes and piezo sensors. */ //#define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif //#define PROBING_FANS_OFF // Turn fans off when probing //#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors @@ -866,6 +879,8 @@ #define Z_CLEARANCE_BETWEEN_PROBES 2 // Z Clearance between probe points //#define Z_AFTER_PROBING 2 // Z position after probing is done +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + // For M851 give a range for adjusting the Z probe offset #define Z_PROBE_OFFSET_RANGE_MIN -20 #define Z_PROBE_OFFSET_RANGE_MAX 20 @@ -966,6 +981,10 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + /** * Filament Runout Sensors * Mechanical or opto endstops are used to check for the presence of filament. @@ -1157,6 +1176,11 @@ // Add a menu item to move between bed corners for manual bed adjustment //#define LEVEL_BED_CORNERS +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + /** * Commands to execute at the end of G29 probing. * Useful to retract or move the Z probe out of the way. diff --git a/Marlin/example_configurations/delta/FLSUN/kossel/Configuration_adv.h b/Marlin/example_configurations/delta/FLSUN/kossel/Configuration_adv.h index 45cace428f..0371e86d49 100644 --- a/Marlin/example_configurations/delta/FLSUN/kossel/Configuration_adv.h +++ b/Marlin/example_configurations/delta/FLSUN/kossel/Configuration_adv.h @@ -230,6 +230,7 @@ #define E2_AUTO_FAN_PIN -1 #define E3_AUTO_FAN_PIN -1 #define E4_AUTO_FAN_PIN -1 +#define CHAMBER_AUTO_FAN_PIN -1 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50 #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed @@ -556,6 +557,16 @@ // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART + /** + * Continue after Power-Loss (Creality3D) + * + * Store the current state to the SD Card at the start of each layer + * during SD printing. If the recovery file is found at boot time, present + * an option on the LCD screen to continue the print from the last-known + * point in the file. + */ + //#define POWER_LOSS_RECOVERY + /** * Sort SD file listings in alphabetical order. * @@ -901,38 +912,44 @@ */ //#define ADVANCED_PAUSE_FEATURE #if ENABLED(ADVANCED_PAUSE_FEATURE) - #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_LENGTH 100 // (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_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast. - #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (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_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate. - #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (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. - - // Filament Unload does a Retract, Delay, and Purge first: - #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. - #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. - - //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. - //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) + #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_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. + // 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. + // 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_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. + // 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. + // 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. + + // Filament Unload does a Retract, Delay, and Purge first: + #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. + #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. + + //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) #endif // @section tmc diff --git a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h index 13f93cc75a..2c8161af83 100644 --- a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h @@ -307,6 +307,7 @@ #define TEMP_SENSOR_3 0 #define TEMP_SENSOR_4 0 #define TEMP_SENSOR_BED 1 +#define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -394,23 +395,30 @@ //=========================================================================== //============================= PID > Bed Temperature Control =============== //=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ //#define PIDTEMPBED //#define BED_LIMIT_SWITCHING -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #if ENABLED(PIDTEMPBED) @@ -515,19 +523,13 @@ #if ENABLED(DELTA_AUTO_CALIBRATION) // set the default number of probe points : n*n (1 -> 7) #define DELTA_CALIBRATION_DEFAULT_POINTS 4 - - // Enable and set these values based on results of 'G33 A' - //#define H_FACTOR 1.01 - //#define R_FACTOR 2.61 - //#define A_FACTOR 0.87 - #endif #if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU) - // Set the radius for the calibration probe points - max 0.9 * DELTA_PRINTABLE_RADIUS for non-eccentric probes + // Set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS for non-eccentric probes #define DELTA_CALIBRATION_RADIUS 73.5 // mm // Set the steprate for papertest probing - #define PROBE_MANUALLY_STEP 0.025 + #define PROBE_MANUALLY_STEP 0.05 // mm #endif // Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers). @@ -623,7 +625,15 @@ * Override with M92 * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ -#define DEFAULT_AXIS_STEPS_PER_UNIT { 100, 100, 100, 90 } // default steps per unit for Kossel (GT2, 20 tooth) +// variables to calculate steps +#define XYZ_FULL_STEPS_PER_ROTATION 200 +#define XYZ_MICROSTEPS 16 +#define XYZ_BELT_PITCH 2 +#define XYZ_PULLEY_TEETH 16 + +// delta speeds must be the same on xyz +#define DEFAULT_XYZ_STEPS_PER_UNIT ((XYZ_FULL_STEPS_PER_ROTATION) * (XYZ_MICROSTEPS) / double(XYZ_BELT_PITCH) / double(XYZ_PULLEY_TEETH)) +#define DEFAULT_AXIS_STEPS_PER_UNIT { DEFAULT_XYZ_STEPS_PER_UNIT, DEFAULT_XYZ_STEPS_PER_UNIT, DEFAULT_XYZ_STEPS_PER_UNIT, 90 } // default steps per unit for Kossel (GT2, 20 tooth) /** * Default Max Feed Rate (mm/s) @@ -725,7 +735,7 @@ /** * Z Servo Probe, such as an endstop switch on a rotating arm. */ -//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles /** @@ -744,6 +754,9 @@ * readings with inductive probes and piezo sensors. */ //#define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif //#define PROBING_FANS_OFF // Turn fans off when probing //#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors @@ -866,6 +879,8 @@ #define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points //#define Z_AFTER_PROBING 5 // Z position after probing is done +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + // For M851 give a range for adjusting the Z probe offset #define Z_PROBE_OFFSET_RANGE_MIN -20 #define Z_PROBE_OFFSET_RANGE_MAX 20 @@ -966,6 +981,10 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + /** * Filament Runout Sensors * Mechanical or opto endstops are used to check for the presence of filament. @@ -1156,6 +1175,11 @@ // Add a menu item to move between bed corners for manual bed adjustment //#define LEVEL_BED_CORNERS +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + /** * Commands to execute at the end of G29 probing. * Useful to retract or move the Z probe out of the way. diff --git a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h index cade398fb1..58867486dc 100644 --- a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h +++ b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h @@ -230,6 +230,7 @@ #define E2_AUTO_FAN_PIN -1 #define E3_AUTO_FAN_PIN -1 #define E4_AUTO_FAN_PIN -1 +#define CHAMBER_AUTO_FAN_PIN -1 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50 #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed @@ -556,6 +557,16 @@ // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART + /** + * Continue after Power-Loss (Creality3D) + * + * Store the current state to the SD Card at the start of each layer + * during SD printing. If the recovery file is found at boot time, present + * an option on the LCD screen to continue the print from the last-known + * point in the file. + */ + //#define POWER_LOSS_RECOVERY + /** * Sort SD file listings in alphabetical order. * @@ -901,38 +912,44 @@ */ //#define ADVANCED_PAUSE_FEATURE #if ENABLED(ADVANCED_PAUSE_FEATURE) - #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_LENGTH 100 // (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_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast. - #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (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_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate. - #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (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. - - // Filament Unload does a Retract, Delay, and Purge first: - #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. - #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. - - //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. - //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) + #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_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. + // 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. + // 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_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. + // 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. + // 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. + + // Filament Unload does a Retract, Delay, and Purge first: + #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. + #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. + + //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) #endif // @section tmc diff --git a/Marlin/example_configurations/delta/Hatchbox_Alpha/Configuration.h b/Marlin/example_configurations/delta/Hatchbox_Alpha/Configuration.h index cc25411622..17d2551298 100644 --- a/Marlin/example_configurations/delta/Hatchbox_Alpha/Configuration.h +++ b/Marlin/example_configurations/delta/Hatchbox_Alpha/Configuration.h @@ -129,7 +129,7 @@ // The following define selects which electronics board you have. // Please choose the name from boards.h that matches your setup #ifndef MOTHERBOARD - #define MOTHERBOARD BOARD_MKS_13 + #define MOTHERBOARD BOARD_MKS_GEN_13 #endif // Optional custom name for your RepStrap or other custom machine @@ -312,6 +312,7 @@ #define TEMP_SENSOR_3 0 #define TEMP_SENSOR_4 0 #define TEMP_SENSOR_BED 1 +#define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -399,23 +400,30 @@ //=========================================================================== //============================= PID > Bed Temperature Control =============== //=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ //#define PIDTEMPBED //#define BED_LIMIT_SWITCHING -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #if ENABLED(PIDTEMPBED) @@ -520,19 +528,13 @@ #if ENABLED(DELTA_AUTO_CALIBRATION) // set the default number of probe points : n*n (1 -> 7) #define DELTA_CALIBRATION_DEFAULT_POINTS 4 - - // Enable and set these values based on results of 'G33 A' - //#define H_FACTOR 1.01 - //#define R_FACTOR 2.61 - //#define A_FACTOR 0.87 - #endif #if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU) - // Set the radius for the calibration probe points - max 0.9 * DELTA_PRINTABLE_RADIUS for non-eccentric probes + // Set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS for non-eccentric probes #define DELTA_CALIBRATION_RADIUS 121.5 // mm // Set the steprate for papertest probing - #define PROBE_MANUALLY_STEP 0.025 + #define PROBE_MANUALLY_STEP 0.05 // mm #endif // Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers). @@ -628,7 +630,15 @@ * Override with M92 * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ -#define DEFAULT_AXIS_STEPS_PER_UNIT { 100, 100, 100, 95 } // default steps per unit for Kossel (GT2, 20 tooth) +// variables to calculate steps +#define XYZ_FULL_STEPS_PER_ROTATION 200 +#define XYZ_MICROSTEPS 16 +#define XYZ_BELT_PITCH 2 +#define XYZ_PULLEY_TEETH 16 + +// delta speeds must be the same on xyz +#define DEFAULT_XYZ_STEPS_PER_UNIT ((XYZ_FULL_STEPS_PER_ROTATION) * (XYZ_MICROSTEPS) / double(XYZ_BELT_PITCH) / double(XYZ_PULLEY_TEETH)) +#define DEFAULT_AXIS_STEPS_PER_UNIT { DEFAULT_XYZ_STEPS_PER_UNIT, DEFAULT_XYZ_STEPS_PER_UNIT, DEFAULT_XYZ_STEPS_PER_UNIT, 95 } // default steps per unit for Kossel (GT2, 20 tooth) /** * Default Max Feed Rate (mm/s) @@ -730,7 +740,7 @@ /** * Z Servo Probe, such as an endstop switch on a rotating arm. */ -//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles /** @@ -749,6 +759,9 @@ * readings with inductive probes and piezo sensors. */ #define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif #define PROBING_FANS_OFF // Turn fans off when probing //#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors @@ -868,6 +881,8 @@ #define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points //#define Z_AFTER_PROBING 5 // Z position after probing is done +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + // For M851 give a range for adjusting the Z probe offset #define Z_PROBE_OFFSET_RANGE_MIN -20 #define Z_PROBE_OFFSET_RANGE_MAX 20 @@ -968,6 +983,10 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + /** * Filament Runout Sensors * Mechanical or opto endstops are used to check for the presence of filament. @@ -1170,6 +1189,11 @@ // Add a menu item to move between bed corners for manual bed adjustment //#define LEVEL_BED_CORNERS +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + /** * Commands to execute at the end of G29 probing. * Useful to retract or move the Z probe out of the way. diff --git a/Marlin/example_configurations/delta/generic/Configuration.h b/Marlin/example_configurations/delta/generic/Configuration.h index a018c96b4d..b4d8bc79b8 100644 --- a/Marlin/example_configurations/delta/generic/Configuration.h +++ b/Marlin/example_configurations/delta/generic/Configuration.h @@ -307,6 +307,7 @@ #define TEMP_SENSOR_3 0 #define TEMP_SENSOR_4 0 #define TEMP_SENSOR_BED 0 +#define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -389,23 +390,30 @@ //=========================================================================== //============================= PID > Bed Temperature Control =============== //=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ //#define PIDTEMPBED //#define BED_LIMIT_SWITCHING -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #if ENABLED(PIDTEMPBED) @@ -505,19 +513,13 @@ #if ENABLED(DELTA_AUTO_CALIBRATION) // set the default number of probe points : n*n (1 -> 7) #define DELTA_CALIBRATION_DEFAULT_POINTS 4 - - // Enable and set these values based on results of 'G33 A' - //#define H_FACTOR 1.01 - //#define R_FACTOR 2.61 - //#define A_FACTOR 0.87 - #endif #if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU) - // Set the radius for the calibration probe points - max 0.9 * DELTA_PRINTABLE_RADIUS for non-eccentric probes + // Set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS for non-eccentric probes #define DELTA_CALIBRATION_RADIUS 121.5 // mm // Set the steprate for papertest probing - #define PROBE_MANUALLY_STEP 0.025 + #define PROBE_MANUALLY_STEP 0.05 // mm #endif // Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers). @@ -613,7 +615,15 @@ * Override with M92 * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ -#define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 80, 760*1.1 } // default steps per unit for Kossel (GT2, 20 tooth) +// variables to calculate steps +#define XYZ_FULL_STEPS_PER_ROTATION 200 +#define XYZ_MICROSTEPS 16 +#define XYZ_BELT_PITCH 2 +#define XYZ_PULLEY_TEETH 20 + +// delta speeds must be the same on xyz +#define DEFAULT_XYZ_STEPS_PER_UNIT ((XYZ_FULL_STEPS_PER_ROTATION) * (XYZ_MICROSTEPS) / double(XYZ_BELT_PITCH) / double(XYZ_PULLEY_TEETH)) +#define DEFAULT_AXIS_STEPS_PER_UNIT { DEFAULT_XYZ_STEPS_PER_UNIT, DEFAULT_XYZ_STEPS_PER_UNIT, DEFAULT_XYZ_STEPS_PER_UNIT, 760*1.1 } // default steps per unit for Kossel (GT2, 20 tooth) /** * Default Max Feed Rate (mm/s) @@ -715,7 +725,7 @@ /** * Z Servo Probe, such as an endstop switch on a rotating arm. */ -//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles /** @@ -734,6 +744,9 @@ * readings with inductive probes and piezo sensors. */ //#define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif //#define PROBING_FANS_OFF // Turn fans off when probing //#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors @@ -853,6 +866,8 @@ #define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points //#define Z_AFTER_PROBING 5 // Z position after probing is done +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + // For M851 give a range for adjusting the Z probe offset #define Z_PROBE_OFFSET_RANGE_MIN -20 #define Z_PROBE_OFFSET_RANGE_MAX 20 @@ -953,6 +968,10 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + /** * Filament Runout Sensors * Mechanical or opto endstops are used to check for the presence of filament. @@ -1144,6 +1163,11 @@ // Add a menu item to move between bed corners for manual bed adjustment //#define LEVEL_BED_CORNERS +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + /** * Commands to execute at the end of G29 probing. * Useful to retract or move the Z probe out of the way. diff --git a/Marlin/example_configurations/delta/generic/Configuration_adv.h b/Marlin/example_configurations/delta/generic/Configuration_adv.h index cade398fb1..58867486dc 100644 --- a/Marlin/example_configurations/delta/generic/Configuration_adv.h +++ b/Marlin/example_configurations/delta/generic/Configuration_adv.h @@ -230,6 +230,7 @@ #define E2_AUTO_FAN_PIN -1 #define E3_AUTO_FAN_PIN -1 #define E4_AUTO_FAN_PIN -1 +#define CHAMBER_AUTO_FAN_PIN -1 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50 #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed @@ -556,6 +557,16 @@ // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART + /** + * Continue after Power-Loss (Creality3D) + * + * Store the current state to the SD Card at the start of each layer + * during SD printing. If the recovery file is found at boot time, present + * an option on the LCD screen to continue the print from the last-known + * point in the file. + */ + //#define POWER_LOSS_RECOVERY + /** * Sort SD file listings in alphabetical order. * @@ -901,38 +912,44 @@ */ //#define ADVANCED_PAUSE_FEATURE #if ENABLED(ADVANCED_PAUSE_FEATURE) - #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_LENGTH 100 // (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_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast. - #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (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_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate. - #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (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. - - // Filament Unload does a Retract, Delay, and Purge first: - #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. - #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. - - //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. - //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) + #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_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. + // 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. + // 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_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. + // 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. + // 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. + + // Filament Unload does a Retract, Delay, and Purge first: + #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. + #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. + + //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) #endif // @section tmc diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/kossel_mini/Configuration.h index dcd540643d..f8274283ed 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration.h @@ -307,6 +307,7 @@ #define TEMP_SENSOR_3 0 #define TEMP_SENSOR_4 0 #define TEMP_SENSOR_BED 11 +#define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -389,23 +390,30 @@ //=========================================================================== //============================= PID > Bed Temperature Control =============== //=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ //#define PIDTEMPBED //#define BED_LIMIT_SWITCHING -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #if ENABLED(PIDTEMPBED) @@ -505,19 +513,13 @@ #if ENABLED(DELTA_AUTO_CALIBRATION) // set the default number of probe points : n*n (1 -> 7) #define DELTA_CALIBRATION_DEFAULT_POINTS 4 - - // Enable and set these values based on results of 'G33 A' - //#define H_FACTOR 1.01 - //#define R_FACTOR 2.61 - //#define A_FACTOR 0.87 - #endif #if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU) - // Set the radius for the calibration probe points - max 0.9 * DELTA_PRINTABLE_RADIUS for non-eccentric probes + // Set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS for non-eccentric probes #define DELTA_CALIBRATION_RADIUS 78.0 // mm // Set the steprate for papertest probing - #define PROBE_MANUALLY_STEP 0.025 + #define PROBE_MANUALLY_STEP 0.05 // mm #endif // Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers). @@ -613,7 +615,15 @@ * Override with M92 * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ -#define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 80, 760*1.1 } // default steps per unit for Kossel (GT2, 20 tooth) +// variables to calculate steps +#define XYZ_FULL_STEPS_PER_ROTATION 200 +#define XYZ_MICROSTEPS 16 +#define XYZ_BELT_PITCH 2 +#define XYZ_PULLEY_TEETH 20 + +// delta speeds must be the same on xyz +#define DEFAULT_XYZ_STEPS_PER_UNIT ((XYZ_FULL_STEPS_PER_ROTATION) * (XYZ_MICROSTEPS) / double(XYZ_BELT_PITCH) / double(XYZ_PULLEY_TEETH)) +#define DEFAULT_AXIS_STEPS_PER_UNIT { DEFAULT_XYZ_STEPS_PER_UNIT, DEFAULT_XYZ_STEPS_PER_UNIT, DEFAULT_XYZ_STEPS_PER_UNIT, 760*1.1 } // default steps per unit for Kossel (GT2, 20 tooth) /** * Default Max Feed Rate (mm/s) @@ -715,7 +725,7 @@ /** * Z Servo Probe, such as an endstop switch on a rotating arm. */ -//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles /** @@ -734,6 +744,9 @@ * readings with inductive probes and piezo sensors. */ //#define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif //#define PROBING_FANS_OFF // Turn fans off when probing //#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors @@ -856,6 +869,8 @@ #define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points //#define Z_AFTER_PROBING 5 // Z position after probing is done +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + // For M851 give a range for adjusting the Z probe offset #define Z_PROBE_OFFSET_RANGE_MIN -20 #define Z_PROBE_OFFSET_RANGE_MAX 20 @@ -956,6 +971,10 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + /** * Filament Runout Sensors * Mechanical or opto endstops are used to check for the presence of filament. @@ -1147,6 +1166,11 @@ // Add a menu item to move between bed corners for manual bed adjustment //#define LEVEL_BED_CORNERS +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + /** * Commands to execute at the end of G29 probing. * Useful to retract or move the Z probe out of the way. diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h index cade398fb1..58867486dc 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h @@ -230,6 +230,7 @@ #define E2_AUTO_FAN_PIN -1 #define E3_AUTO_FAN_PIN -1 #define E4_AUTO_FAN_PIN -1 +#define CHAMBER_AUTO_FAN_PIN -1 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50 #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed @@ -556,6 +557,16 @@ // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART + /** + * Continue after Power-Loss (Creality3D) + * + * Store the current state to the SD Card at the start of each layer + * during SD printing. If the recovery file is found at boot time, present + * an option on the LCD screen to continue the print from the last-known + * point in the file. + */ + //#define POWER_LOSS_RECOVERY + /** * Sort SD file listings in alphabetical order. * @@ -901,38 +912,44 @@ */ //#define ADVANCED_PAUSE_FEATURE #if ENABLED(ADVANCED_PAUSE_FEATURE) - #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_LENGTH 100 // (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_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast. - #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (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_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate. - #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (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. - - // Filament Unload does a Retract, Delay, and Purge first: - #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. - #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. - - //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. - //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) + #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_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. + // 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. + // 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_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. + // 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. + // 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. + + // Filament Unload does a Retract, Delay, and Purge first: + #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. + #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. + + //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) #endif // @section tmc diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration.h b/Marlin/example_configurations/delta/kossel_pro/Configuration.h index 13f0abe2e6..bfa1eb558a 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration.h @@ -311,6 +311,7 @@ #define TEMP_SENSOR_3 0 #define TEMP_SENSOR_4 0 #define TEMP_SENSOR_BED 5 +#define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -381,23 +382,30 @@ //=========================================================================== //============================= PID > Bed Temperature Control =============== //=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ #define PIDTEMPBED //#define BED_LIMIT_SWITCHING -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #if ENABLED(PIDTEMPBED) @@ -491,19 +499,13 @@ #if ENABLED(DELTA_AUTO_CALIBRATION) // set the default number of probe points : n*n (1 -> 7) #define DELTA_CALIBRATION_DEFAULT_POINTS 4 - - // Enable and set these values based on results of 'G33 A' - //#define H_FACTOR 1.01 - //#define R_FACTOR 2.61 - //#define A_FACTOR 0.87 - #endif #if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU) - // Set the radius for the calibration probe points - max 0.9 * DELTA_PRINTABLE_RADIUS for non-eccentric probes + // Set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS for non-eccentric probes #define DELTA_CALIBRATION_RADIUS 110.0 // mm // Set the steprate for papertest probing - #define PROBE_MANUALLY_STEP 0.025 + #define PROBE_MANUALLY_STEP 0.05 // mm #endif // Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers). @@ -578,14 +580,6 @@ //============================================================================= // @section motion -#define XYZ_FULL_STEPS_PER_ROTATION 200 -#define XYZ_MICROSTEPS 32 -#define XYZ_BELT_PITCH 2 -#define XYZ_PULLEY_TEETH 20 - -// delta speeds must be the same on xyz -#define XYZ_STEPS ((XYZ_FULL_STEPS_PER_ROTATION) * (XYZ_MICROSTEPS) / double(XYZ_BELT_PITCH) / double(XYZ_PULLEY_TEETH)) - /** * Default Settings * @@ -606,7 +600,15 @@ * Override with M92 * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ -#define DEFAULT_AXIS_STEPS_PER_UNIT { XYZ_STEPS, XYZ_STEPS, XYZ_STEPS, 184.8 } +// variables to calculate steps +#define XYZ_FULL_STEPS_PER_ROTATION 200 +#define XYZ_MICROSTEPS 32 +#define XYZ_BELT_PITCH 2 +#define XYZ_PULLEY_TEETH 20 + +// delta speeds must be the same on xyz +#define DEFAULT_XYZ_STEPS_PER_UNIT ((XYZ_FULL_STEPS_PER_ROTATION) * (XYZ_MICROSTEPS) / double(XYZ_BELT_PITCH) / double(XYZ_PULLEY_TEETH)) +#define DEFAULT_AXIS_STEPS_PER_UNIT { DEFAULT_XYZ_STEPS_PER_UNIT, DEFAULT_XYZ_STEPS_PER_UNIT, DEFAULT_XYZ_STEPS_PER_UNIT, 184.8 } // default steps per unit for Kossel (GT2, 20 tooth) /** * Default Max Feed Rate (mm/s) @@ -708,7 +710,7 @@ /** * Z Servo Probe, such as an endstop switch on a rotating arm. */ -//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles /** @@ -727,6 +729,9 @@ * readings with inductive probes and piezo sensors. */ //#define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif //#define PROBING_FANS_OFF // Turn fans off when probing //#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors @@ -855,8 +860,9 @@ #define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points //#define Z_AFTER_PROBING 5 // Z position after probing is done -// For M851 give a range for adjusting the Z probe offset +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping +// For M851 give a range for adjusting the Z probe offset #define Z_PROBE_OFFSET_RANGE_MIN -15 #define Z_PROBE_OFFSET_RANGE_MAX 5 @@ -956,6 +962,10 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + /** * Filament Runout Sensors * Mechanical or opto endstops are used to check for the presence of filament. @@ -1147,6 +1157,11 @@ // Add a menu item to move between bed corners for manual bed adjustment //#define LEVEL_BED_CORNERS +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + /** * Commands to execute at the end of G29 probing. * Useful to retract or move the Z probe out of the way. diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h index 23b1b0552d..a3bc22677f 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h @@ -235,6 +235,7 @@ #define E2_AUTO_FAN_PIN -1 #define E3_AUTO_FAN_PIN -1 #define E4_AUTO_FAN_PIN -1 +#define CHAMBER_AUTO_FAN_PIN -1 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50 #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed @@ -561,6 +562,16 @@ // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART + /** + * Continue after Power-Loss (Creality3D) + * + * Store the current state to the SD Card at the start of each layer + * during SD printing. If the recovery file is found at boot time, present + * an option on the LCD screen to continue the print from the last-known + * point in the file. + */ + //#define POWER_LOSS_RECOVERY + /** * Sort SD file listings in alphabetical order. * @@ -906,38 +917,44 @@ */ //#define ADVANCED_PAUSE_FEATURE #if ENABLED(ADVANCED_PAUSE_FEATURE) - #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_LENGTH 100 // (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_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast. - #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (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_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate. - #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (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. - - // Filament Unload does a Retract, Delay, and Purge first: - #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. - #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. - - //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. - //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) + #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_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. + // 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. + // 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_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. + // 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. + // 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. + + // Filament Unload does a Retract, Delay, and Purge first: + #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. + #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. + + //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) #endif // @section tmc diff --git a/Marlin/example_configurations/delta/kossel_xl/Configuration.h b/Marlin/example_configurations/delta/kossel_xl/Configuration.h index edc3afb9e1..d37868e373 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration.h @@ -307,6 +307,7 @@ #define TEMP_SENSOR_3 0 #define TEMP_SENSOR_4 0 #define TEMP_SENSOR_BED 5 +#define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -393,23 +394,30 @@ //=========================================================================== //============================= PID > Bed Temperature Control =============== //=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ //#define PIDTEMPBED //#define BED_LIMIT_SWITCHING -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #if ENABLED(PIDTEMPBED) @@ -509,19 +517,13 @@ #if ENABLED(DELTA_AUTO_CALIBRATION) // set the default number of probe points : n*n (1 -> 7) #define DELTA_CALIBRATION_DEFAULT_POINTS 4 - - // Enable and set these values based on results of 'G33 A' - //#define H_FACTOR 1.01 - //#define R_FACTOR 2.61 - //#define A_FACTOR 0.87 - #endif #if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU) - // Set the radius for the calibration probe points - max 0.9 * DELTA_PRINTABLE_RADIUS for non-eccentric probes + // Set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS for non-eccentric probes #define DELTA_CALIBRATION_RADIUS 121.5 // mm // Set the steprate for papertest probing - #define PROBE_MANUALLY_STEP 0.025 + #define PROBE_MANUALLY_STEP 0.05 // mm #endif // Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers). @@ -596,15 +598,6 @@ //============================================================================= // @section motion -// variables to calculate steps -#define XYZ_FULL_STEPS_PER_ROTATION 200 -#define XYZ_MICROSTEPS 16 -#define XYZ_BELT_PITCH 2 -#define XYZ_PULLEY_TEETH 16 - -// delta speeds must be the same on xyz -#define XYZ_STEPS (XYZ_FULL_STEPS_PER_ROTATION * XYZ_MICROSTEPS / double(XYZ_BELT_PITCH) / double(XYZ_PULLEY_TEETH)) - /** * Default Settings * @@ -625,7 +618,15 @@ * Override with M92 * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ -#define DEFAULT_AXIS_STEPS_PER_UNIT { XYZ_STEPS, XYZ_STEPS, XYZ_STEPS, 158 } // default steps per unit for PowerWasp +// variables to calculate steps +#define XYZ_FULL_STEPS_PER_ROTATION 200 +#define XYZ_MICROSTEPS 16 +#define XYZ_BELT_PITCH 2 +#define XYZ_PULLEY_TEETH 16 + +// delta speeds must be the same on xyz +#define DEFAULT_XYZ_STEPS_PER_UNIT ((XYZ_FULL_STEPS_PER_ROTATION) * (XYZ_MICROSTEPS) / double(XYZ_BELT_PITCH) / double(XYZ_PULLEY_TEETH)) +#define DEFAULT_AXIS_STEPS_PER_UNIT { DEFAULT_XYZ_STEPS_PER_UNIT, DEFAULT_XYZ_STEPS_PER_UNIT, DEFAULT_XYZ_STEPS_PER_UNIT, 158 } // default steps per unit for PowerWasp /** * Default Max Feed Rate (mm/s) @@ -727,7 +728,7 @@ /** * Z Servo Probe, such as an endstop switch on a rotating arm. */ -//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles /** @@ -746,6 +747,9 @@ * readings with inductive probes and piezo sensors. */ //#define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif //#define PROBING_FANS_OFF // Turn fans off when probing //#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors @@ -865,6 +869,8 @@ #define Z_CLEARANCE_BETWEEN_PROBES 10 // Z Clearance between probe points //#define Z_AFTER_PROBING 10 // Z position after probing is done +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + // For M851 give a range for adjusting the Z probe offset #define Z_PROBE_OFFSET_RANGE_MIN -20 #define Z_PROBE_OFFSET_RANGE_MAX 20 @@ -965,6 +971,10 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + /** * Filament Runout Sensors * Mechanical or opto endstops are used to check for the presence of filament. @@ -1156,6 +1166,11 @@ // Add a menu item to move between bed corners for manual bed adjustment //#define LEVEL_BED_CORNERS +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + /** * Commands to execute at the end of G29 probing. * Useful to retract or move the Z probe out of the way. diff --git a/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h index 74a6b50f92..01fd89753d 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h @@ -230,6 +230,7 @@ #define E2_AUTO_FAN_PIN -1 #define E3_AUTO_FAN_PIN -1 #define E4_AUTO_FAN_PIN -1 +#define CHAMBER_AUTO_FAN_PIN -1 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50 #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed @@ -556,6 +557,16 @@ // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART + /** + * Continue after Power-Loss (Creality3D) + * + * Store the current state to the SD Card at the start of each layer + * during SD printing. If the recovery file is found at boot time, present + * an option on the LCD screen to continue the print from the last-known + * point in the file. + */ + //#define POWER_LOSS_RECOVERY + /** * Sort SD file listings in alphabetical order. * @@ -901,38 +912,44 @@ */ //#define ADVANCED_PAUSE_FEATURE #if ENABLED(ADVANCED_PAUSE_FEATURE) - #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_LENGTH 100 // (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_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast. - #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (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_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate. - #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (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. - - // Filament Unload does a Retract, Delay, and Purge first: - #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. - #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. - - //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. - //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) + #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_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. + // 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. + // 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_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. + // 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. + // 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. + + // Filament Unload does a Retract, Delay, and Purge first: + #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. + #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. + + //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) #endif // @section tmc diff --git a/Marlin/example_configurations/gCreate/gMax1.5+/Configuration.h b/Marlin/example_configurations/gCreate/gMax1.5+/Configuration.h index 9ec1ae7823..0b9542cb2a 100644 --- a/Marlin/example_configurations/gCreate/gMax1.5+/Configuration.h +++ b/Marlin/example_configurations/gCreate/gMax1.5+/Configuration.h @@ -315,6 +315,7 @@ // to print on glass. And I'm using a 400mm x 400mm silicon heat pad powered through // a Fortek SSR to do it. If you are using an unaltered gCreate machine, this needs // to be set to 0 +#define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -402,23 +403,30 @@ //=========================================================================== //============================= PID > Bed Temperature Control =============== //=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ #define PIDTEMPBED //#define BED_LIMIT_SWITCHING -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #if ENABLED(PIDTEMPBED) @@ -658,7 +666,7 @@ /** * Z Servo Probe, such as an endstop switch on a rotating arm. */ -//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles /** @@ -677,6 +685,9 @@ * readings with inductive probes and piezo sensors. */ //#define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif //#define PROBING_FANS_OFF // Turn fans off when probing //#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors @@ -749,6 +760,8 @@ #define Z_CLEARANCE_BETWEEN_PROBES 6 // Z Clearance between probe points //#define Z_AFTER_PROBING 6 // Z position after probing is done +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + // For M851 give a range for adjusting the Z probe offset #define Z_PROBE_OFFSET_RANGE_MIN -20 #define Z_PROBE_OFFSET_RANGE_MAX 20 @@ -850,6 +863,10 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + /** * Filament Runout Sensors * Mechanical or opto endstops are used to check for the presence of filament. @@ -1047,6 +1064,11 @@ // Add a menu item to move between bed corners for manual bed adjustment //#define LEVEL_BED_CORNERS +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + /** * Commands to execute at the end of G29 probing. * Useful to retract or move the Z probe out of the way. diff --git a/Marlin/example_configurations/gCreate/gMax1.5+/Configuration_adv.h b/Marlin/example_configurations/gCreate/gMax1.5+/Configuration_adv.h index 0148871fa7..03f40bb293 100644 --- a/Marlin/example_configurations/gCreate/gMax1.5+/Configuration_adv.h +++ b/Marlin/example_configurations/gCreate/gMax1.5+/Configuration_adv.h @@ -230,6 +230,7 @@ #define E2_AUTO_FAN_PIN -1 #define E3_AUTO_FAN_PIN -1 #define E4_AUTO_FAN_PIN -1 +#define CHAMBER_AUTO_FAN_PIN -1 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50 #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed @@ -554,6 +555,16 @@ // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART + /** + * Continue after Power-Loss (Creality3D) + * + * Store the current state to the SD Card at the start of each layer + * during SD printing. If the recovery file is found at boot time, present + * an option on the LCD screen to continue the print from the last-known + * point in the file. + */ + //#define POWER_LOSS_RECOVERY + /** * Sort SD file listings in alphabetical order. * @@ -899,38 +910,44 @@ */ #define ADVANCED_PAUSE_FEATURE #if ENABLED(ADVANCED_PAUSE_FEATURE) - #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_LENGTH 100 // (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_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast. - #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (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_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate. - #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (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. - - // Filament Unload does a Retract, Delay, and Purge first: - #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. - #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. - - #define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. - //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) + #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_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. + // 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. + // 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_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. + // 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. + // 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. + + // Filament Unload does a Retract, Delay, and Purge first: + #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. + #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. + + #define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) #endif // @section tmc diff --git a/Marlin/example_configurations/makibox/Configuration.h b/Marlin/example_configurations/makibox/Configuration.h index fd9f2553f1..5ce9ad5746 100644 --- a/Marlin/example_configurations/makibox/Configuration.h +++ b/Marlin/example_configurations/makibox/Configuration.h @@ -307,6 +307,7 @@ #define TEMP_SENSOR_3 0 #define TEMP_SENSOR_4 0 #define TEMP_SENSOR_BED 12 +#define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -389,23 +390,30 @@ //=========================================================================== //============================= PID > Bed Temperature Control =============== //=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ //#define PIDTEMPBED //#define BED_LIMIT_SWITCHING -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ #define MAX_BED_POWER 175 // limits duty cycle to bed; 255=full current // This limit is set to 175 by default in the Makibox configuration and it can be adjusted // to increase the heatup rate. However, if changed, be aware of the safety concerns of @@ -648,7 +656,7 @@ /** * Z Servo Probe, such as an endstop switch on a rotating arm. */ -//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles /** @@ -667,6 +675,9 @@ * readings with inductive probes and piezo sensors. */ //#define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif //#define PROBING_FANS_OFF // Turn fans off when probing //#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors @@ -739,6 +750,8 @@ #define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points //#define Z_AFTER_PROBING 5 // Z position after probing is done +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + // For M851 give a range for adjusting the Z probe offset #define Z_PROBE_OFFSET_RANGE_MIN -20 #define Z_PROBE_OFFSET_RANGE_MAX 20 @@ -839,6 +852,10 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + /** * Filament Runout Sensors * Mechanical or opto endstops are used to check for the presence of filament. @@ -1029,6 +1046,11 @@ // Add a menu item to move between bed corners for manual bed adjustment //#define LEVEL_BED_CORNERS +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + /** * Commands to execute at the end of G29 probing. * Useful to retract or move the Z probe out of the way. diff --git a/Marlin/example_configurations/makibox/Configuration_adv.h b/Marlin/example_configurations/makibox/Configuration_adv.h index 7a67a696a2..04de024b5e 100644 --- a/Marlin/example_configurations/makibox/Configuration_adv.h +++ b/Marlin/example_configurations/makibox/Configuration_adv.h @@ -230,6 +230,7 @@ #define E2_AUTO_FAN_PIN -1 #define E3_AUTO_FAN_PIN -1 #define E4_AUTO_FAN_PIN -1 +#define CHAMBER_AUTO_FAN_PIN -1 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50 #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed @@ -554,6 +555,16 @@ // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART + /** + * Continue after Power-Loss (Creality3D) + * + * Store the current state to the SD Card at the start of each layer + * during SD printing. If the recovery file is found at boot time, present + * an option on the LCD screen to continue the print from the last-known + * point in the file. + */ + //#define POWER_LOSS_RECOVERY + /** * Sort SD file listings in alphabetical order. * @@ -899,38 +910,44 @@ */ //#define ADVANCED_PAUSE_FEATURE #if ENABLED(ADVANCED_PAUSE_FEATURE) - #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_LENGTH 100 // (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_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast. - #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (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_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate. - #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (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. - - // Filament Unload does a Retract, Delay, and Purge first: - #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. - #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. - - //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. - //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) + #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_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. + // 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. + // 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_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. + // 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. + // 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. + + // Filament Unload does a Retract, Delay, and Purge first: + #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. + #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. + + //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) #endif // @section tmc diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration.h b/Marlin/example_configurations/tvrrug/Round2/Configuration.h index 9de2a8d4c6..74f3ab7c8f 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration.h @@ -307,6 +307,7 @@ #define TEMP_SENSOR_3 0 #define TEMP_SENSOR_4 0 #define TEMP_SENSOR_BED 5 +#define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -378,23 +379,30 @@ //=========================================================================== //============================= PID > Bed Temperature Control =============== //=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ //#define PIDTEMPBED //#define BED_LIMIT_SWITCHING -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #if ENABLED(PIDTEMPBED) @@ -640,7 +648,7 @@ /** * Z Servo Probe, such as an endstop switch on a rotating arm. */ -//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles /** @@ -659,6 +667,9 @@ * readings with inductive probes and piezo sensors. */ //#define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif //#define PROBING_FANS_OFF // Turn fans off when probing //#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors @@ -731,6 +742,8 @@ #define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points //#define Z_AFTER_PROBING 5 // Z position after probing is done +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + // For M851 give a range for adjusting the Z probe offset #define Z_PROBE_OFFSET_RANGE_MIN -20 #define Z_PROBE_OFFSET_RANGE_MAX 20 @@ -831,6 +844,10 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + /** * Filament Runout Sensors * Mechanical or opto endstops are used to check for the presence of filament. @@ -1021,6 +1038,11 @@ // Add a menu item to move between bed corners for manual bed adjustment //#define LEVEL_BED_CORNERS +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + /** * Commands to execute at the end of G29 probing. * Useful to retract or move the Z probe out of the way. diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h index 1e0b27db25..28baaaa1e2 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h @@ -230,6 +230,7 @@ #define E2_AUTO_FAN_PIN -1 #define E3_AUTO_FAN_PIN -1 #define E4_AUTO_FAN_PIN -1 +#define CHAMBER_AUTO_FAN_PIN -1 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50 #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed @@ -554,6 +555,16 @@ // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART + /** + * Continue after Power-Loss (Creality3D) + * + * Store the current state to the SD Card at the start of each layer + * during SD printing. If the recovery file is found at boot time, present + * an option on the LCD screen to continue the print from the last-known + * point in the file. + */ + //#define POWER_LOSS_RECOVERY + /** * Sort SD file listings in alphabetical order. * @@ -899,38 +910,44 @@ */ //#define ADVANCED_PAUSE_FEATURE #if ENABLED(ADVANCED_PAUSE_FEATURE) - #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_LENGTH 100 // (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_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast. - #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (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_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate. - #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (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. - - // Filament Unload does a Retract, Delay, and Purge first: - #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. - #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. - - //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. - //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) + #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_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. + // 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. + // 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_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. + // 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. + // 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. + + // Filament Unload does a Retract, Delay, and Purge first: + #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. + #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. + + //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) #endif // @section tmc diff --git a/Marlin/example_configurations/wt150/Configuration.h b/Marlin/example_configurations/wt150/Configuration.h index a2cf25432f..9fd1916e7e 100644 --- a/Marlin/example_configurations/wt150/Configuration.h +++ b/Marlin/example_configurations/wt150/Configuration.h @@ -307,6 +307,7 @@ #define TEMP_SENSOR_3 0 #define TEMP_SENSOR_4 0 #define TEMP_SENSOR_BED 0 +#define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -394,23 +395,30 @@ //=========================================================================== //============================= PID > Bed Temperature Control =============== //=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ //#define PIDTEMPBED //#define BED_LIMIT_SWITCHING -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current #if ENABLED(PIDTEMPBED) @@ -650,7 +658,7 @@ /** * Z Servo Probe, such as an endstop switch on a rotating arm. */ -//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles /** @@ -669,6 +677,9 @@ * readings with inductive probes and piezo sensors. */ //#define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif //#define PROBING_FANS_OFF // Turn fans off when probing //#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors @@ -741,6 +752,8 @@ #define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points //#define Z_AFTER_PROBING 5 // Z position after probing is done +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + // For M851 give a range for adjusting the Z probe offset #define Z_PROBE_OFFSET_RANGE_MIN -20 #define Z_PROBE_OFFSET_RANGE_MAX 20 @@ -841,6 +854,10 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + /** * Filament Runout Sensors * Mechanical or opto endstops are used to check for the presence of filament. @@ -1031,6 +1048,11 @@ // Add a menu item to move between bed corners for manual bed adjustment //#define LEVEL_BED_CORNERS +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + /** * Commands to execute at the end of G29 probing. * Useful to retract or move the Z probe out of the way. diff --git a/Marlin/example_configurations/wt150/Configuration_adv.h b/Marlin/example_configurations/wt150/Configuration_adv.h index 5c2bbc764d..5acc34536c 100644 --- a/Marlin/example_configurations/wt150/Configuration_adv.h +++ b/Marlin/example_configurations/wt150/Configuration_adv.h @@ -230,6 +230,7 @@ #define E2_AUTO_FAN_PIN -1 #define E3_AUTO_FAN_PIN -1 #define E4_AUTO_FAN_PIN -1 +#define CHAMBER_AUTO_FAN_PIN -1 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50 #define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed @@ -555,6 +556,16 @@ // Add an option in the menu to run all auto#.g files //#define MENU_ADDAUTOSTART + /** + * Continue after Power-Loss (Creality3D) + * + * Store the current state to the SD Card at the start of each layer + * during SD printing. If the recovery file is found at boot time, present + * an option on the LCD screen to continue the print from the last-known + * point in the file. + */ + //#define POWER_LOSS_RECOVERY + /** * Sort SD file listings in alphabetical order. * @@ -900,38 +911,44 @@ */ //#define ADVANCED_PAUSE_FEATURE #if ENABLED(ADVANCED_PAUSE_FEATURE) - #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_LENGTH 100 // (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_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast. - #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (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_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate. - #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (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. - - // Filament Unload does a Retract, Delay, and Purge first: - #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. - #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. - - //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. - //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) + #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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_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. + // 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. + // 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_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. + // 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. + // 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. + + // Filament Unload does a Retract, Delay, and Purge first: + #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. + #define FILAMENT_UNLOAD_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 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_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. + + //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) #endif // @section tmc diff --git a/Marlin/fastio.h b/Marlin/fastio.h index 50a37ffb82..9de676ad7f 100644 --- a/Marlin/fastio.h +++ b/Marlin/fastio.h @@ -21,17 +21,17 @@ */ /** - * Fast I/O Routines + * Fast I/O Routines for AVR * Use direct port manipulation to save scads of processor time. - * Contributed by Triffid_Hunter. Modified by Kliment and the Marlin team. + * Contributed by Triffid_Hunter and modified by Kliment, thinkyhead, Bob-the-Kuhn, et.al. */ -#ifndef _FASTIO_ARDUINO_H -#define _FASTIO_ARDUINO_H #include typedef int8_t pin_t; +#ifndef _FASTIO_ARDUINO_H_ +#define _FASTIO_ARDUINO_H_ #include @@ -169,6 +169,7 @@ enum ClockSource2 : char { }; // Get interrupt bits in an orderly way +// Ex: cs = GET_CS(0); coma1 = GET_COM(A,1); #define GET_WGM(T) (((TCCR##T##A >> WGM##T##0) & 0x3) | ((TCCR##T##B >> WGM##T##2 << 2) & 0xC)) #define GET_CS(T) ((TCCR##T##B >> CS##T##0) & 0x7) #define GET_COM(T,Q) ((TCCR##T##Q >> COM##T##Q##0) & 0x3) @@ -183,6 +184,7 @@ enum ClockSource2 : char { #define GET_FOCC(T) GET_FOC(T,C) // Set Wave Generation Mode bits +// Ex: SET_WGM(5,CTC_ICRn); #define _SET_WGM(T,V) do{ \ TCCR##T##A = (TCCR##T##A & ~(0x3 << WGM##T##0)) | (( int(V) & 0x3) << WGM##T##0); \ TCCR##T##B = (TCCR##T##B & ~(0x3 << WGM##T##2)) | (((int(V) >> 2) & 0x3) << WGM##T##2); \ @@ -190,6 +192,7 @@ enum ClockSource2 : char { #define SET_WGM(T,V) _SET_WGM(T,WGM_##V) // Set Clock Select bits +// Ex: SET_CS3(PRESCALER_64); #define _SET_CS(T,V) (TCCR##T##B = (TCCR##T##B & ~(0x7 << CS##T##0)) | ((int(V) & 0x7) << CS##T##0)) #define _SET_CS0(V) _SET_CS(0,V) #define _SET_CS1(V) _SET_CS(1,V) @@ -214,6 +217,7 @@ enum ClockSource2 : char { #define SET_CS(T,V) SET_CS##T(V) // Set Compare Mode bits +// Ex: SET_COMS(4,CLEAR_SET,CLEAR_SET,CLEAR_SET); #define _SET_COM(T,Q,V) (TCCR##T##Q = (TCCR##T##Q & ~(0x3 << COM##T##Q##0)) | (int(V) << COM##T##Q##0)) #define SET_COM(T,Q,V) _SET_COM(T,Q,COM_##V) #define SET_COMA(T,V) SET_COM(T,A,V) @@ -222,12 +226,15 @@ enum ClockSource2 : char { #define SET_COMS(T,V1,V2,V3) do{ SET_COMA(T,V1); SET_COMB(T,V2); SET_COMC(T,V3); }while(0) // Set Noise Canceler bit +// Ex: SET_ICNC(2,1) #define SET_ICNC(T,V) (TCCR##T##B = (V) ? TCCR##T##B | _BV(ICNC##T) : TCCR##T##B & ~_BV(ICNC##T)) // Set Input Capture Edge Select bit +// Ex: SET_ICES(5,0) #define SET_ICES(T,V) (TCCR##T##B = (V) ? TCCR##T##B | _BV(ICES##T) : TCCR##T##B & ~_BV(ICES##T)) // Set Force Output Compare bit +// Ex: SET_FOC(3,A,1) #define SET_FOC(T,Q,V) (TCCR##T##C = (V) ? TCCR##T##C | _BV(FOC##T##Q) : TCCR##T##C & ~_BV(FOC##T##Q)) #define SET_FOCA(T,V) SET_FOC(T,A,V) #define SET_FOCB(T,V) SET_FOC(T,B,V) @@ -238,11 +245,11 @@ enum ClockSource2 : char { * PWM availability macros */ -//find out which harware PWMs are already in use +// Determine which harware PWMs are already in use #if PIN_EXISTS(CONTROLLER_FAN) - #define PWM_CHK_FAN_B(p) (p == CONTROLLER_FAN_PIN || p == E0_AUTO_FAN_PIN || p == E1_AUTO_FAN_PIN || p == E2_AUTO_FAN_PIN || p == E3_AUTO_FAN_PIN || p == E4_AUTO_FAN_PIN) + #define PWM_CHK_FAN_B(p) (p == CONTROLLER_FAN_PIN || p == E0_AUTO_FAN_PIN || p == E1_AUTO_FAN_PIN || p == E2_AUTO_FAN_PIN || p == E3_AUTO_FAN_PIN || p == E4_AUTO_FAN_PIN || p == CHAMBER_AUTO_FAN_PIN) #else - #define PWM_CHK_FAN_B(p) (p == E0_AUTO_FAN_PIN || p == E1_AUTO_FAN_PIN || p == E2_AUTO_FAN_PIN || p == E3_AUTO_FAN_PIN || p == E4_AUTO_FAN_PIN) + #define PWM_CHK_FAN_B(p) (p == E0_AUTO_FAN_PIN || p == E1_AUTO_FAN_PIN || p == E2_AUTO_FAN_PIN || p == E3_AUTO_FAN_PIN || p == E4_AUTO_FAN_PIN || p == CHAMBER_AUTO_FAN_PIN) #endif #if PIN_EXISTS(FAN) || PIN_EXISTS(FAN1) || PIN_EXISTS(FAN2) @@ -251,7 +258,7 @@ enum ClockSource2 : char { #elif PIN_EXISTS(FAN1) #define PWM_CHK_FAN_A(p) (p == FAN_PIN || p == FAN1_PIN) #else - #define PWM_CHK_FAN_A(p) p == FAN_PIN + #define PWM_CHK_FAN_A(p) (p == FAN_PIN) #endif #else #define PWM_CHK_FAN_A(p) false @@ -269,15 +276,15 @@ enum ClockSource2 : char { #define PWM_CHK_MOTOR_CURRENT(p) false #endif -#if defined(NUM_SERVOS) +#ifdef NUM_SERVOS #if AVR_ATmega2560_FAMILY - #define PWM_CHK_SERVO(p) ( p == 5 || NUM_SERVOS > 12 && p == 6 || NUM_SERVOS > 24 && p == 46) //PWMS 3A, 4A & 5A + #define PWM_CHK_SERVO(p) (p == 5 || (NUM_SERVOS > 12 && p == 6) || (NUM_SERVOS > 24 && p == 46)) // PWMS 3A, 4A & 5A #elif AVR_ATmega2561_FAMILY - #define PWM_CHK_SERVO(p) p == 5 //PWM3A + #define PWM_CHK_SERVO(p) (p == 5) // PWM3A #elif AVR_ATmega1284_FAMILY #define PWM_CHK_SERVO(p) false #elif AVR_AT90USB1286_FAMILY - #define PWM_CHK_SERVO(p) p == 16 //PWM3A + #define PWM_CHK_SERVO(p) (p == 16) // PWM3A #elif AVR_ATmega328_FAMILY #define PWM_CHK_SERVO(p) false #endif @@ -301,15 +308,15 @@ enum ClockSource2 : char { // define which hardware PWMs are available for the current CPU // all timer 1 PWMS deleted from this list because they are never available #if AVR_ATmega2560_FAMILY - #define PWM_PINS(p) ((p >= 2 && p <= 10 ) || p == 13 || p == 44 || p == 45 || p == 46 ) + #define PWM_PINS(p) ((p >= 2 && p <= 10) || p == 13 || p == 44 || p == 45 || p == 46) #elif AVR_ATmega2561_FAMILY - #define PWM_PINS(p) ((p >= 2 && p <= 6 ) || p == 9) + #define PWM_PINS(p) ((p >= 2 && p <= 6) || p == 9) #elif AVR_ATmega1284_FAMILY - #define PWM_PINS(p) (p == 3 || p == 4 || p == 14 || p == 15) + #define PWM_PINS(p) (p == 3 || p == 4 || p == 14 || p == 15) #elif AVR_AT90USB1286_FAMILY - #define PWM_PINS(p) (p == 0 || p == 1 || p == 14 || p == 15 || p == 16 || p == 24) + #define PWM_PINS(p) (p == 0 || p == 1 || p == 14 || p == 15 || p == 16 || p == 24) #elif AVR_ATmega328_FAMILY - #define PWM_PINS(p) (p == 3 || p == 5 || p == 6 || p == 11) + #define PWM_PINS(p) (p == 3 || p == 5 || p == 6 || p == 11) #else #error "unknown CPU" #endif @@ -317,4 +324,4 @@ enum ClockSource2 : char { // finally - the macro that tells us if a pin is an available hardware PWM #define USEABLE_HARDWARE_PWM(p) (PWM_PINS(p) && !PWM_CHK(p)) -#endif // _FASTIO_ARDUINO_H +#endif // _FASTIO_ARDUINO_H_ diff --git a/Marlin/fwretract.cpp b/Marlin/fwretract.cpp index 8a26a4e16d..a913c364c3 100644 --- a/Marlin/fwretract.cpp +++ b/Marlin/fwretract.cpp @@ -117,14 +117,16 @@ void FWRetract::retract(const bool retracting for (uint8_t i = 0; i < EXTRUDERS; ++i) { SERIAL_ECHOPAIR("retracted[", i); SERIAL_ECHOLNPAIR("] ", retracted[i]); - SERIAL_ECHOPAIR("retracted_swap[", i); - SERIAL_ECHOLNPAIR("] ", retracted_swap[i]); + #if EXTRUDERS > 1 + SERIAL_ECHOPAIR("retracted_swap[", i); + SERIAL_ECHOLNPAIR("] ", retracted_swap[i]); + #endif } SERIAL_ECHOLNPAIR("current_position[z] ", current_position[Z_AXIS]); + SERIAL_ECHOLNPAIR("current_position[e] ", current_position[E_AXIS]); SERIAL_ECHOLNPAIR("hop_amount ", hop_amount); //*/ - const bool has_zhop = retract_zlift > 0.01; // Is there a hop set? const float old_feedrate_mm_s = feedrate_mm_s; // The current position will be the destination for E and Z moves @@ -138,36 +140,38 @@ void FWRetract::retract(const bool retracting feedrate_mm_s = retract_feedrate_mm_s; current_position[E_AXIS] += (swapping ? swap_retract_length : retract_length) * renormalize; sync_plan_position_e(); - prepare_move_to_destination(); + prepare_move_to_destination(); // set_current_to_destination // Is a Z hop set, and has the hop not yet been done? // No double zlifting // Feedrate to the max - if (has_zhop && !hop_amount) { - hop_amount += retract_zlift; // Carriage is raised for retraction hop - feedrate_mm_s = planner.max_feedrate_mm_s[Z_AXIS]; // Z feedrate to max - current_position[Z_AXIS] -= retract_zlift; // Pretend current pos is lower. Next move raises Z. - SYNC_PLAN_POSITION_KINEMATIC(); // Set the planner to the new position - prepare_move_to_destination(); // Raise up to the old current pos + if (retract_zlift > 0.01 && !hop_amount) { // Apply hop only once + const float old_z = current_position[Z_AXIS]; + hop_amount += retract_zlift; // Add to the hop total (again, only once) + destination[Z_AXIS] += retract_zlift; // Raise Z by the zlift (M207 Z) amount + feedrate_mm_s = planner.max_feedrate_mm_s[Z_AXIS]; // Maximum Z feedrate + prepare_move_to_destination(); // Raise up, set_current_to_destination + current_position[Z_AXIS] = old_z; // Spoof the Z position in the planner + SYNC_PLAN_POSITION_KINEMATIC(); } } else { // If a hop was done and Z hasn't changed, undo the Z hop if (hop_amount) { - current_position[Z_AXIS] += retract_zlift; // Pretend current pos is higher. Next move lowers Z. - SYNC_PLAN_POSITION_KINEMATIC(); // Set the planner to the new position + current_position[Z_AXIS] += hop_amount; // Set actual Z (due to the prior hop) + SYNC_PLAN_POSITION_KINEMATIC(); // Spoof the Z position in the planner feedrate_mm_s = planner.max_feedrate_mm_s[Z_AXIS]; // Z feedrate to max - prepare_move_to_destination(); // Lower down to the old current pos - hop_amount = 0.0; // Clear hop + prepare_move_to_destination(); // Lower Z, set_current_to_destination + hop_amount = 0.0; // Clear the hop amount } // A retract multiplier has been added here to get faster swap recovery feedrate_mm_s = swapping ? swap_retract_recover_feedrate_mm_s : retract_recover_feedrate_mm_s; - const float move_e = swapping ? swap_retract_length + swap_retract_recover_length : retract_length + retract_recover_length; - current_position[E_AXIS] -= move_e * renormalize; + current_position[E_AXIS] -= (swapping ? swap_retract_length + swap_retract_recover_length + : retract_length + retract_recover_length) * renormalize; sync_plan_position_e(); - prepare_move_to_destination(); // Recover E + prepare_move_to_destination(); // Recover E, set_current_to_destination } feedrate_mm_s = old_feedrate_mm_s; // Restore original feedrate @@ -186,10 +190,13 @@ void FWRetract::retract(const bool retracting for (uint8_t i = 0; i < EXTRUDERS; ++i) { SERIAL_ECHOPAIR("retracted[", i); SERIAL_ECHOLNPAIR("] ", retracted[i]); - SERIAL_ECHOPAIR("retracted_swap[", i); - SERIAL_ECHOLNPAIR("] ", retracted_swap[i]); + #if EXTRUDERS > 1 + SERIAL_ECHOPAIR("retracted_swap[", i); + SERIAL_ECHOLNPAIR("] ", retracted_swap[i]); + #endif } SERIAL_ECHOLNPAIR("current_position[z] ", current_position[Z_AXIS]); + SERIAL_ECHOLNPAIR("current_position[e] ", current_position[E_AXIS]); SERIAL_ECHOLNPAIR("hop_amount ", hop_amount); //*/ diff --git a/Marlin/language_an.h b/Marlin/language_an.h index 121efdfc49..fe766d1211 100644 --- a/Marlin/language_an.h +++ b/Marlin/language_an.h @@ -149,7 +149,6 @@ #define MSG_NO_CARD _UxGT("No i hai tarcheta") #define MSG_DWELL _UxGT("Reposo...") #define MSG_USERWAIT _UxGT("Aguardand ordines") -#define MSG_RESUMING _UxGT("Contin. impresion") #define MSG_PRINT_ABORTED _UxGT("Impres. cancelada") #define MSG_NO_MOVE _UxGT("Sin movimiento") #define MSG_KILLED _UxGT("Aturada d'emerch.") @@ -182,16 +181,14 @@ #define MSG_ERR_MINTEMP _UxGT("Error: Temp Menima") #define MSG_ERR_MAXTEMP_BED _UxGT("Error: Temp Max base") #define MSG_ERR_MINTEMP_BED _UxGT("Error: Temp Min base") -#define MSG_ERR_Z_HOMING _UxGT("G28 Z vedau") +#define MSG_ERR_Z_HOMING MSG_HOME _UxGT(" ") MSG_X MSG_Y _UxGT(" ") MSG_FIRST #define MSG_HALTED _UxGT("IMPRESORA ATURADA") #define MSG_PLEASE_RESET _UxGT("Per favor reinic.") #define MSG_SHORT_DAY _UxGT("d") #define MSG_SHORT_HOUR _UxGT("h") #define MSG_SHORT_MINUTE _UxGT("m") #define MSG_HEATING _UxGT("Calentando...") -#define MSG_HEATING_COMPLETE _UxGT("Calentamiento listo") #define MSG_BED_HEATING _UxGT("Calentando base...") -#define MSG_BED_DONE _UxGT("Base calient") #define MSG_DELTA_CALIBRATE _UxGT("Calibracion Delta") #define MSG_DELTA_CALIBRATE_X _UxGT("Calibrar X") #define MSG_DELTA_CALIBRATE_Y _UxGT("Calibrar Y") diff --git a/Marlin/language_bg.h b/Marlin/language_bg.h index 5c25f3ea03..8edeed405f 100644 --- a/Marlin/language_bg.h +++ b/Marlin/language_bg.h @@ -119,7 +119,6 @@ #define MSG_NO_CARD _UxGT("Няма карта") #define MSG_DWELL _UxGT("Почивка...") #define MSG_USERWAIT _UxGT("Изчакване") -#define MSG_RESUMING _UxGT("Продълж. печата") #define MSG_PRINT_ABORTED _UxGT("Печатът е прекъснат") #define MSG_NO_MOVE _UxGT("Няма движение") #define MSG_KILLED _UxGT("УБИТО.") diff --git a/Marlin/language_ca.h b/Marlin/language_ca.h index ed3ea45045..7aa5f00298 100644 --- a/Marlin/language_ca.h +++ b/Marlin/language_ca.h @@ -153,7 +153,6 @@ #define MSG_NO_CARD _UxGT("No hi ha targeta") #define MSG_DWELL _UxGT("En repos...") #define MSG_USERWAIT _UxGT("Esperant usuari..") -#define MSG_RESUMING _UxGT("Reprenent imp.") #define MSG_PRINT_ABORTED _UxGT("Imp. cancelada") #define MSG_NO_MOVE _UxGT("Sense moviment.") #define MSG_KILLED _UxGT("MATAT.") @@ -185,16 +184,14 @@ #define MSG_ERR_MINTEMP _UxGT("Err: TEMP MINIMA") #define MSG_ERR_MAXTEMP_BED _UxGT("Err: TEMPMAX LLIT") #define MSG_ERR_MINTEMP_BED _UxGT("Err: TEMPMIN LLIT") -#define MSG_ERR_Z_HOMING _UxGT("G28 Z No permes") +#define MSG_ERR_Z_HOMING MSG_HOME _UxGT(" ") MSG_X MSG_Y _UxGT(" ") MSG_FIRST #define MSG_HALTED _UxGT("IMPRESSORA PARADA") #define MSG_PLEASE_RESET _UxGT("Reinicieu") #define MSG_SHORT_DAY _UxGT("d") // One character only #define MSG_SHORT_HOUR _UxGT("h") // One character only #define MSG_SHORT_MINUTE _UxGT("m") // One character only #define MSG_HEATING _UxGT("Escalfant...") -#define MSG_HEATING_COMPLETE _UxGT("Escalfament fet.") -#define MSG_BED_HEATING _UxGT("Escalfant llit") -#define MSG_BED_DONE _UxGT("Llit fet.") +#define MSG_BED_HEATING _UxGT("Escalfant llit...") #define MSG_DELTA_CALIBRATE _UxGT("Calibratge Delta") #define MSG_DELTA_CALIBRATE_X _UxGT("Calibra X") #define MSG_DELTA_CALIBRATE_Y _UxGT("Calibra Y") diff --git a/Marlin/language_cn.h b/Marlin/language_cn.h index 40c330d1a5..96c6f666d5 100644 --- a/Marlin/language_cn.h +++ b/Marlin/language_cn.h @@ -132,7 +132,6 @@ #define MSG_NO_CARD "\xf9\xa8" #define MSG_DWELL "Sleep..." #define MSG_USERWAIT "Wait for user..." -#define MSG_RESUMING "Resuming print" #define MSG_PRINT_ABORTED "Print aborted" #define MSG_NO_MOVE "No move." #define MSG_KILLED "KILLED. " diff --git a/Marlin/language_cz.h b/Marlin/language_cz.h index 72b68b9a47..95f3cdfba0 100644 --- a/Marlin/language_cz.h +++ b/Marlin/language_cz.h @@ -255,7 +255,6 @@ #define MSG_DWELL _UxGT("Uspano...") #define MSG_USERWAIT _UxGT("Cekani na uziv...") #define MSG_PRINT_PAUSED _UxGT("Tisk pozastaven") -#define MSG_RESUMING _UxGT("Obnovovani tisku") #define MSG_PRINT_ABORTED _UxGT("Tisk zrusen") #define MSG_NO_MOVE _UxGT("Zadny pohyb.") #define MSG_KILLED _UxGT("PRERUSENO. ") @@ -297,16 +296,14 @@ #define MSG_ERR_MINTEMP _UxGT("NIZKA TEPLOTA") #define MSG_ERR_MAXTEMP_BED _UxGT("VYS. TEPL. PODL.") #define MSG_ERR_MINTEMP_BED _UxGT("NIZ. TEPL. PODL.") -#define MSG_ERR_Z_HOMING _UxGT("G28 Z ZAKAZANO") +#define MSG_ERR_Z_HOMING MSG_HOME _UxGT(" ") MSG_X MSG_Y _UxGT(" ") MSG_FIRST #define MSG_HALTED _UxGT("TISK. ZASTAVENA") #define MSG_PLEASE_RESET _UxGT("Provedte reset") #define MSG_SHORT_DAY _UxGT("d") #define MSG_SHORT_HOUR _UxGT("h") #define MSG_SHORT_MINUTE _UxGT("m") #define MSG_HEATING _UxGT("Zahrivani...") -#define MSG_HEATING_COMPLETE _UxGT("Zahrati hotovo.") -#define MSG_BED_HEATING _UxGT("Zahrivani podl.") -#define MSG_BED_DONE _UxGT("Podlozka hotova.") +#define MSG_BED_HEATING _UxGT("Zahrivani podl...") #define MSG_DELTA_CALIBRATE _UxGT("Delta Kalibrace") #define MSG_DELTA_CALIBRATE_X _UxGT("Kalibrovat X") #define MSG_DELTA_CALIBRATE_Y _UxGT("Kalibrovat Y") diff --git a/Marlin/language_cz_utf8.h b/Marlin/language_cz_utf8.h index 0d223f3bf3..49ea9bd17e 100644 --- a/Marlin/language_cz_utf8.h +++ b/Marlin/language_cz_utf8.h @@ -258,7 +258,6 @@ #define MSG_DWELL _UxGT("Uspáno...") #define MSG_USERWAIT _UxGT("Čekání na uživ...") #define MSG_PRINT_PAUSED _UxGT("Tisk pozastaven") -#define MSG_RESUMING _UxGT("Obnovování tisku") #define MSG_PRINT_ABORTED _UxGT("Tisk zrušen") #define MSG_NO_MOVE _UxGT("Žádný pohyb.") #define MSG_KILLED _UxGT("PŘERUSENO. ") @@ -300,16 +299,14 @@ #define MSG_ERR_MINTEMP _UxGT("NÍZKA TEPLOTA") #define MSG_ERR_MAXTEMP_BED _UxGT("VYS. TEPL. PODL.") #define MSG_ERR_MINTEMP_BED _UxGT("NÍZ. TEPL. PODL.") -#define MSG_ERR_Z_HOMING _UxGT("G28 Z ZAKÁZÁNO") +#define MSG_ERR_Z_HOMING MSG_HOME _UxGT(" ") MSG_X MSG_Y _UxGT(" ") MSG_FIRST #define MSG_HALTED _UxGT("TISK. ZASTAVENA") #define MSG_PLEASE_RESET _UxGT("Proveďte reset") #define MSG_SHORT_DAY _UxGT("d") #define MSG_SHORT_HOUR _UxGT("h") #define MSG_SHORT_MINUTE _UxGT("m") #define MSG_HEATING _UxGT("Zahřívání...") -#define MSG_HEATING_COMPLETE _UxGT("Zahřáti hotovo.") -#define MSG_BED_HEATING _UxGT("Zahřívání podl.") -#define MSG_BED_DONE _UxGT("Podložka hotova.") +#define MSG_BED_HEATING _UxGT("Zahřívání podl...") #define MSG_DELTA_CALIBRATE _UxGT("Delta Kalibrace") #define MSG_DELTA_CALIBRATE_X _UxGT("Kalibrovat X") #define MSG_DELTA_CALIBRATE_Y _UxGT("Kalibrovat Y") diff --git a/Marlin/language_da.h b/Marlin/language_da.h index 60c9d2ae14..1bd2b02df6 100644 --- a/Marlin/language_da.h +++ b/Marlin/language_da.h @@ -150,7 +150,6 @@ #define MSG_NO_CARD _UxGT("Intet SD kort") #define MSG_DWELL _UxGT("Dvale...") #define MSG_USERWAIT _UxGT("Venter på bruger...") -#define MSG_RESUMING _UxGT("Forsætter printet") #define MSG_PRINT_ABORTED _UxGT("Print annulleret") #define MSG_NO_MOVE _UxGT("Ingen bevægelse.") #define MSG_KILLED _UxGT("DRÆBT. ") @@ -183,16 +182,14 @@ #define MSG_ERR_MINTEMP _UxGT("Fejl: Min temp") #define MSG_ERR_MAXTEMP_BED _UxGT("Fejl: Maks Plade temp") #define MSG_ERR_MINTEMP_BED _UxGT("Fejl: Min Plade temp") -#define MSG_ERR_Z_HOMING _UxGT("G28 Z Forbudt") +#define MSG_ERR_Z_HOMING MSG_HOME _UxGT(" ") MSG_X MSG_Y _UxGT(" ") MSG_FIRST #define MSG_HALTED _UxGT("PRINTER STOPPET") #define MSG_PLEASE_RESET _UxGT("Reset Venligst") #define MSG_SHORT_DAY _UxGT("d") // Kun et bogstav #define MSG_SHORT_HOUR _UxGT("h") // Kun et bogstav #define MSG_SHORT_MINUTE _UxGT("m") // Kun et bogstav #define MSG_HEATING _UxGT("Opvarmer...") -#define MSG_HEATING_COMPLETE _UxGT("Opvarmet") -#define MSG_BED_HEATING _UxGT("Opvarmer plade") -#define MSG_BED_DONE _UxGT("Plade opvarmet") +#define MSG_BED_HEATING _UxGT("Opvarmer plade...") #define MSG_DELTA_CALIBRATE _UxGT("Delta Kalibrering") #define MSG_DELTA_CALIBRATE_X _UxGT("Kalibrer X") #define MSG_DELTA_CALIBRATE_Y _UxGT("Kalibrer Y") diff --git a/Marlin/language_de.h b/Marlin/language_de.h index 4605eef90a..e2d11f6fc9 100644 --- a/Marlin/language_de.h +++ b/Marlin/language_de.h @@ -171,7 +171,6 @@ #define MSG_DWELL _UxGT("Warten...") #define MSG_USERWAIT _UxGT("Warte auf Nutzer") #define MSG_PRINT_PAUSED _UxGT("Druck pausiert") -#define MSG_RESUMING _UxGT("Druckfortsetzung") #define MSG_PRINT_ABORTED _UxGT("Druck abgebrochen") #define MSG_NO_MOVE _UxGT("Motoren eingeschaltet") #define MSG_KILLED _UxGT("ABGEBROCHEN") @@ -213,16 +212,14 @@ #define MSG_ERR_MINTEMP LCD_STR_THERMOMETER _UxGT(" UNTERSCHRITTEN") #define MSG_ERR_MAXTEMP_BED _UxGT("BETT ") LCD_STR_THERMOMETER _UxGT(" ÜBERSCHRITTEN") #define MSG_ERR_MINTEMP_BED _UxGT("BETT ") LCD_STR_THERMOMETER _UxGT(" UNTERSCHRITTEN") -#define MSG_ERR_Z_HOMING _UxGT("G28 Z verboten") +#define MSG_ERR_Z_HOMING MSG_HOME _UxGT(" ") MSG_X MSG_Y _UxGT(" ") MSG_FIRST #define MSG_HALTED _UxGT("DRUCKER STOPP") #define MSG_PLEASE_RESET _UxGT("Bitte Resetten") #define MSG_SHORT_DAY _UxGT("t") // One character only #define MSG_SHORT_HOUR _UxGT("h") // One character only #define MSG_SHORT_MINUTE _UxGT("m") // One character only #define MSG_HEATING _UxGT("Extr. heizt...") -#define MSG_HEATING_COMPLETE _UxGT("Extr. aufgeheizt") #define MSG_BED_HEATING _UxGT("Bett heizt...") -#define MSG_BED_DONE _UxGT("Bett aufgeheizt") #define MSG_DELTA_CALIBRATE _UxGT("Delta kalibrieren") #define MSG_DELTA_CALIBRATE_X _UxGT("Kalibriere X") #define MSG_DELTA_CALIBRATE_Y _UxGT("Kalibriere Y") diff --git a/Marlin/language_el-gr.h b/Marlin/language_el-gr.h index ad2895cfdb..89ac76eb03 100644 --- a/Marlin/language_el-gr.h +++ b/Marlin/language_el-gr.h @@ -147,9 +147,8 @@ #define MSG_STOP_PRINT _UxGT("Διακοπή εκτύπωσης") #define MSG_CARD_MENU _UxGT("Εκτύπωση από SD") #define MSG_NO_CARD _UxGT("Δεν βρέθηκε SD") -#define MSG_DWELL _UxGT("Αναστολή λειτουργίας...") +#define MSG_DWELL _UxGT("Αναστολή λειτουργίας…") #define MSG_USERWAIT _UxGT("Αναμονή για χρήστη…") -#define MSG_RESUMING _UxGT("Συνεχίζεται η εκτύπωση") #define MSG_PRINT_ABORTED _UxGT("Διακόπτεται η εκτύπωση") #define MSG_NO_MOVE _UxGT("Καμία κίνηση.") #define MSG_KILLED _UxGT("ΤΕΡΜΑΤΙΣΜΟΣ. ") @@ -181,9 +180,7 @@ #define MSG_ERR_MAXTEMP_BED _UxGT("Λάθος: ΜΕΓΙΣΤΗ ΘΕΡΜΟΤΗΤΑ ΚΛΙΝΗΣ") #define MSG_ERR_MINTEMP_BED _UxGT("Λάθος: ΕΛΑΧΙΣΤΗ ΘΕΡΜΟΤΗΤΑ ΚΛΙΝΗΣ") #define MSG_HEATING _UxGT("Θερμαίνεται…") -#define MSG_HEATING_COMPLETE _UxGT("Η θέρμανση ολοκληρώθηκε.") -#define MSG_BED_HEATING _UxGT("Θέρμανση κλίνης.") -#define MSG_BED_DONE _UxGT("Η κλίνη ολοκληρώθηκε.") +#define MSG_BED_HEATING _UxGT("Θέρμανση κλίνης…") #define MSG_DELTA_CALIBRATE _UxGT("Βαθμονόμηση Delta") #define MSG_DELTA_CALIBRATE_X _UxGT("Βαθμονόμηση X") #define MSG_DELTA_CALIBRATE_Y _UxGT("Βαθμονόμηση Y") diff --git a/Marlin/language_el.h b/Marlin/language_el.h index 5211fbe576..8cfda5a171 100644 --- a/Marlin/language_el.h +++ b/Marlin/language_el.h @@ -149,7 +149,6 @@ #define MSG_NO_CARD _UxGT("Δεν βρέθηκε SD") #define MSG_DWELL _UxGT("Αναστολή λειτουργίας") #define MSG_USERWAIT _UxGT("Αναμονή για χρήστη") -#define MSG_RESUMING _UxGT("Συνεχίζεται η εκτύπωση") //SHORTEN #define MSG_PRINT_ABORTED _UxGT("Διακόπτεται η εκτύπωση") //SHORTEN #define MSG_NO_MOVE _UxGT("Καμία κίνηση.") #define MSG_KILLED _UxGT("ΤΕΡΜΑΤΙΣΜΟΣ. ") @@ -182,9 +181,7 @@ #define MSG_ERR_MINTEMP_BED _UxGT("ΕΛΑΧΙΣΤΗ ΘΕΡΜΟΚΡΑΣΙΑΣ ΕΠ. ΕΚΤΥΠΩΣΗΣ") //SHORTEN #define MSG_HALTED _UxGT("H εκτύπωση διακόπηκε") #define MSG_HEATING _UxGT("Θερμαίνεται…") -#define MSG_HEATING_COMPLETE _UxGT("Η θέρμανση ολοκληρώθηκε.") //SHORTEN #define MSG_BED_HEATING _UxGT("Θέρμανση ΕΠ. Εκτύπωσης") //SHORTEN -#define MSG_BED_DONE _UxGT("Η Επ. Εκτύπωσης ολοκληρώθηκε") //SHORTEN #define MSG_DELTA_CALIBRATE _UxGT("Βαθμονόμηση Delta") #define MSG_DELTA_CALIBRATE_X _UxGT("Βαθμονόμηση X") #define MSG_DELTA_CALIBRATE_Y _UxGT("Βαθμονόμηση Y") diff --git a/Marlin/language_en.h b/Marlin/language_en.h index 1dd12a4325..3654e704fc 100644 --- a/Marlin/language_en.h +++ b/Marlin/language_en.h @@ -55,6 +55,9 @@ #ifndef MSG_LCD_ENDSTOPS #define MSG_LCD_ENDSTOPS _UxGT("Endstops") // Max length 8 characters #endif +#ifndef MSG_LCD_SOFT_ENDSTOPS + #define MSG_LCD_SOFT_ENDSTOPS _UxGT("Soft Endstops") +#endif #ifndef MSG_MAIN #define MSG_MAIN _UxGT("Main") #endif @@ -678,8 +681,8 @@ #ifndef MSG_PRINT_PAUSED #define MSG_PRINT_PAUSED _UxGT("Print paused") #endif -#ifndef MSG_RESUMING - #define MSG_RESUMING _UxGT("Resuming print") +#ifndef MSG_PRINTING + #define MSG_PRINTING _UxGT("Printing...") #endif #ifndef MSG_PRINT_ABORTED #define MSG_PRINT_ABORTED _UxGT("Print aborted") @@ -783,6 +786,9 @@ #ifndef MSG_HEATING_FAILED_LCD #define MSG_HEATING_FAILED_LCD _UxGT("Heating failed") #endif +#ifndef MSG_HEATING_FAILED_LCD_BED + #define MSG_HEATING_FAILED_LCD_BED _UxGT("Bed heating failed") +#endif #ifndef MSG_ERR_REDUNDANT_TEMP #define MSG_ERR_REDUNDANT_TEMP _UxGT("Err: REDUNDANT TEMP") #endif @@ -805,7 +811,7 @@ #define MSG_ERR_MINTEMP_BED _UxGT("Err: MINTEMP BED") #endif #ifndef MSG_ERR_Z_HOMING - #define MSG_ERR_Z_HOMING _UxGT("G28 Z Forbidden") + #define MSG_ERR_Z_HOMING MSG_HOME _UxGT(" ") MSG_X MSG_Y _UxGT(" ") MSG_FIRST #endif #ifndef MSG_HALTED #define MSG_HALTED _UxGT("PRINTER HALTED") @@ -825,14 +831,14 @@ #ifndef MSG_HEATING #define MSG_HEATING _UxGT("Heating...") #endif -#ifndef MSG_HEATING_COMPLETE - #define MSG_HEATING_COMPLETE _UxGT("Heating done.") +#ifndef MSG_COOLING + #define MSG_COOLING _UxGT("Cooling...") #endif #ifndef MSG_BED_HEATING - #define MSG_BED_HEATING _UxGT("Bed Heating.") + #define MSG_BED_HEATING _UxGT("Bed heating...") #endif -#ifndef MSG_BED_DONE - #define MSG_BED_DONE _UxGT("Bed done.") +#ifndef MSG_BED_COOLING + #define MSG_BED_COOLING _UxGT("Bed cooling...") #endif #ifndef MSG_DELTA_CALIBRATE #define MSG_DELTA_CALIBRATE _UxGT("Delta Calibration") @@ -858,6 +864,9 @@ #ifndef MSG_DELTA_HEIGHT_CALIBRATE #define MSG_DELTA_HEIGHT_CALIBRATE _UxGT("Set Delta Height") #endif +#ifndef MSG_DELTA_Z_OFFSET_CALIBRATE + #define MSG_DELTA_Z_OFFSET_CALIBRATE _UxGT("Probe Z-offset") +#endif #ifndef MSG_DELTA_DIAG_ROD #define MSG_DELTA_DIAG_ROD _UxGT("Diag Rod") #endif diff --git a/Marlin/language_es.h b/Marlin/language_es.h index fb7d6a275b..cbff5ee08e 100644 --- a/Marlin/language_es.h +++ b/Marlin/language_es.h @@ -104,7 +104,11 @@ #define MSG_SELECT _UxGT("Seleccionar") #define MSG_ACC _UxGT("Aceleracion") #define MSG_JERK _UxGT("Jerk") -#if IS_KINEMATIC +#if IS_SCARA + #define MSG_VA_JERK _UxGT("Va-jerk") + #define MSG_VB_JERK _UxGT("Vb-jerk") + #define MSG_VC_JERK _UxGT("Vz-jerk") +#elif IS_DELTA #define MSG_VA_JERK _UxGT("Va-jerk") #define MSG_VB_JERK _UxGT("Vb-jerk") #define MSG_VC_JERK _UxGT("Vc-jerk") @@ -122,7 +126,11 @@ #define MSG_A_RETRACT _UxGT("Acel. retrac.") #define MSG_A_TRAVEL _UxGT("Acel. Viaje") #define MSG_STEPS_PER_MM _UxGT("Pasos/mm") -#if IS_KINEMATIC +#if IS_SCARA + #define MSG_ASTEPS _UxGT("A pasos/deg") + #define MSG_BSTEPS _UxGT("B pasos/deg") + #define MSG_CSTEPS _UxGT("C pasos/mm") +#elif IS_DELTA #define MSG_ASTEPS _UxGT("A pasos/mm") #define MSG_BSTEPS _UxGT("B pasos/mm") #define MSG_CSTEPS _UxGT("C pasos/mm") @@ -158,7 +166,6 @@ #define MSG_NO_CARD _UxGT("No hay tarjeta SD") #define MSG_DWELL _UxGT("Reposo...") #define MSG_USERWAIT _UxGT("Esperando ordenes") -#define MSG_RESUMING _UxGT("Resumiendo impre.") #define MSG_PRINT_ABORTED _UxGT("Impresion cancelada") #define MSG_NO_MOVE _UxGT("Sin movimiento") #define MSG_KILLED _UxGT("Parada de emergencia") @@ -191,16 +198,14 @@ #define MSG_ERR_MINTEMP _UxGT("Error: Temp Minima") #define MSG_ERR_MAXTEMP_BED _UxGT("Error: Temp Max Plat") #define MSG_ERR_MINTEMP_BED _UxGT("Error: Temp Min Plat") -#define MSG_ERR_Z_HOMING _UxGT("G28 Z Prohibido") +#define MSG_ERR_Z_HOMING MSG_HOME _UxGT(" ") MSG_X MSG_Y _UxGT(" ") MSG_FIRST #define MSG_HALTED _UxGT("IMPRESORA PARADA") #define MSG_PLEASE_RESET _UxGT("Por favor, reinicie") #define MSG_SHORT_DAY _UxGT("d") // One character only #define MSG_SHORT_HOUR _UxGT("h") // One character only #define MSG_SHORT_MINUTE _UxGT("m") // One character only #define MSG_HEATING _UxGT("Calentando...") -#define MSG_HEATING_COMPLETE _UxGT("Calentamiento listo") #define MSG_BED_HEATING _UxGT("Calentando Plat...") -#define MSG_BED_DONE _UxGT("Plataforma Caliente") #define MSG_DELTA_CALIBRATE _UxGT("Calibracion Delta") #define MSG_DELTA_CALIBRATE_X _UxGT("Calibrar X") #define MSG_DELTA_CALIBRATE_Y _UxGT("Calibrar Y") diff --git a/Marlin/language_es_utf8.h b/Marlin/language_es_utf8.h index 8ec9cbadab..57ac43b82f 100644 --- a/Marlin/language_es_utf8.h +++ b/Marlin/language_es_utf8.h @@ -116,9 +116,19 @@ #define MSG_A_RETRACT _UxGT("Acel. retrac.") #define MSG_A_TRAVEL _UxGT("Acel. Viaje") #define MSG_STEPS_PER_MM _UxGT("Pasos/mm") -#define MSG_XSTEPS _UxGT("X pasos/mm") -#define MSG_YSTEPS _UxGT("Y pasos/mm") -#define MSG_ZSTEPS _UxGT("Z pasos/mm") +#if IS_SCARA + #define MSG_ASTEPS _UxGT("A pasos/mm") + #define MSG_BSTEPS _UxGT("B pasos/mm") + #define MSG_CSTEPS _UxGT("Z pasos/mm") +#elif IS_DELTA + #define MSG_ASTEPS _UxGT("A pasos/mm") + #define MSG_BSTEPS _UxGT("B pasos/mm") + #define MSG_CSTEPS _UxGT("C pasos/mm") +#else + #define MSG_ASTEPS _UxGT("X pasos/mm") + #define MSG_BSTEPS _UxGT("Y pasos/mm") + #define MSG_CSTEPS _UxGT("Z pasos/mm") +#endif #define MSG_ESTEPS _UxGT("E pasos/mm") #define MSG_E1STEPS _UxGT("E1 pasos/mm") #define MSG_E2STEPS _UxGT("E2 pasos/mm") @@ -146,7 +156,6 @@ #define MSG_NO_CARD _UxGT("No hay tarjeta SD") #define MSG_DWELL _UxGT("Reposo...") #define MSG_USERWAIT _UxGT("Esperando órdenes") -#define MSG_RESUMING _UxGT("Resumiendo impresión") #define MSG_PRINT_ABORTED _UxGT("Impresión cancelada") #define MSG_NO_MOVE _UxGT("Sin movimiento") #define MSG_KILLED _UxGT("Parada de emergencia") @@ -179,16 +188,14 @@ #define MSG_ERR_MINTEMP _UxGT("Error: Temp Mínima") #define MSG_ERR_MAXTEMP_BED _UxGT("Error: Temp Max Cama") #define MSG_ERR_MINTEMP_BED _UxGT("Error: Temp Min Cama") -#define MSG_ERR_Z_HOMING _UxGT("G28 Z Prohibido") +#define MSG_ERR_Z_HOMING MSG_HOME _UxGT(" ") MSG_X MSG_Y _UxGT(" ") MSG_FIRST #define MSG_HALTED _UxGT("IMPRESORA PARADA") #define MSG_PLEASE_RESET _UxGT("Por favor, reinicie") #define MSG_SHORT_DAY _UxGT("d") // One character only #define MSG_SHORT_HOUR _UxGT("h") // One character only #define MSG_SHORT_MINUTE _UxGT("m") // One character only #define MSG_HEATING _UxGT("Calentando...") -#define MSG_HEATING_COMPLETE _UxGT("Calentamiento listo") #define MSG_BED_HEATING _UxGT("Calentando Cama...") -#define MSG_BED_DONE _UxGT("Cama Caliente") #define MSG_DELTA_CALIBRATE _UxGT("Calibración Delta") #define MSG_DELTA_CALIBRATE_X _UxGT("Calibrar X") #define MSG_DELTA_CALIBRATE_Y _UxGT("Calibrar Y") diff --git a/Marlin/language_eu.h b/Marlin/language_eu.h index 03a54df753..d6e51bc250 100644 --- a/Marlin/language_eu.h +++ b/Marlin/language_eu.h @@ -249,7 +249,6 @@ #define MSG_DWELL _UxGT("Lo egin...") #define MSG_USERWAIT _UxGT("Aginduak zain...") #define MSG_PRINT_PAUSED _UxGT("Inprim. geldi.") -#define MSG_RESUMING _UxGT("Inprim. jarraitu.") #define MSG_PRINT_ABORTED _UxGT("Inprim. deusezta.") #define MSG_NO_MOVE _UxGT("Mugimendu gabe.") #define MSG_KILLED _UxGT("AKABATUTA. ") @@ -290,16 +289,14 @@ #define MSG_ERR_MINTEMP _UxGT("Err: Tenp Minimoa") #define MSG_ERR_MAXTEMP_BED _UxGT("Err: Ohe Tenp Max") #define MSG_ERR_MINTEMP_BED _UxGT("Err: Ohe Tenp Min") -#define MSG_ERR_Z_HOMING _UxGT("G28 Z Debekatua") +#define MSG_ERR_Z_HOMING MSG_HOME _UxGT(" ") MSG_X MSG_Y _UxGT(" ") MSG_FIRST #define MSG_HALTED _UxGT("INPRIMA. GELDIRIK") #define MSG_PLEASE_RESET _UxGT("Berrabia. Mesedez") #define MSG_SHORT_DAY _UxGT("d") // One character only #define MSG_SHORT_HOUR _UxGT("h") // One character only #define MSG_SHORT_MINUTE _UxGT("m") // One character only #define MSG_HEATING _UxGT("Berotzen...") -#define MSG_HEATING_COMPLETE _UxGT("Berotzea prest.") -#define MSG_BED_HEATING _UxGT("Ohea Berotzen.") -#define MSG_BED_DONE _UxGT("Ohea Berotuta.") +#define MSG_BED_HEATING _UxGT("Ohea Berotzen...") #define MSG_DELTA_CALIBRATE _UxGT("Delta Kalibraketa") #define MSG_DELTA_CALIBRATE_X _UxGT("Kalibratu X") #define MSG_DELTA_CALIBRATE_Y _UxGT("Kalibratu Y") diff --git a/Marlin/language_fi.h b/Marlin/language_fi.h index aa5013f949..70ef4cf90a 100644 --- a/Marlin/language_fi.h +++ b/Marlin/language_fi.h @@ -140,7 +140,6 @@ #define MSG_NO_CARD _UxGT("Ei korttia") #define MSG_DWELL _UxGT("Nukkumassa...") #define MSG_USERWAIT _UxGT("Odotet. valintaa") -#define MSG_RESUMING _UxGT("Jatke. tulostusta") #define MSG_PRINT_ABORTED _UxGT("Print aborted") #define MSG_NO_MOVE _UxGT("Ei liiketta.") #define MSG_KILLED _UxGT("KILLED. ") diff --git a/Marlin/language_fr.h b/Marlin/language_fr.h index 447a67a76e..5da9084169 100644 --- a/Marlin/language_fr.h +++ b/Marlin/language_fr.h @@ -253,7 +253,6 @@ #define MSG_DWELL _UxGT("Repos...") #define MSG_USERWAIT _UxGT("Atten. de l'util.") #define MSG_PRINT_PAUSED _UxGT("Impr. en pause") -#define MSG_RESUMING _UxGT("Repri. de l'impr.") #define MSG_PRINT_ABORTED _UxGT("Impr. Annulee") #define MSG_NO_MOVE _UxGT("Moteurs bloques.") #define MSG_KILLED _UxGT("MORT.") @@ -294,8 +293,7 @@ #define MSG_ERR_MINTEMP _UxGT("Err: TEMP. MIN") #define MSG_ERR_MAXTEMP_BED _UxGT("Err: TEMP. MAX LIT") #define MSG_ERR_MINTEMP_BED _UxGT("Err: TEMP. MIN LIT") -#define MSG_ERR_Z_HOMING _UxGT("G28 Z interdit") - +#define MSG_ERR_Z_HOMING MSG_HOME _UxGT(" ") MSG_X MSG_Y _UxGT(" ") MSG_FIRST #define MSG_HALTED _UxGT("IMPR. STOPPEE") #define MSG_PLEASE_RESET _UxGT("RaZ. SVP") #define MSG_SHORT_DAY _UxGT("j") // One character only @@ -303,9 +301,7 @@ #define MSG_SHORT_MINUTE _UxGT("m") // One character only #define MSG_HEATING _UxGT("En chauffe...") -#define MSG_HEATING_COMPLETE _UxGT("Chauffe terminee") -#define MSG_BED_HEATING _UxGT("Lit en chauffe..") -#define MSG_BED_DONE _UxGT("Chauffe lit terminee") +#define MSG_BED_HEATING _UxGT("Lit en chauffe...") #define MSG_DELTA_CALIBRATE _UxGT("Calibration Delta") #define MSG_DELTA_CALIBRATE_X _UxGT("Calibrer X") #define MSG_DELTA_CALIBRATE_Y _UxGT("Calibrer Y") diff --git a/Marlin/language_fr_utf8.h b/Marlin/language_fr_utf8.h index faeafd8371..a54fb76c23 100644 --- a/Marlin/language_fr_utf8.h +++ b/Marlin/language_fr_utf8.h @@ -254,7 +254,6 @@ #define MSG_DWELL _UxGT("Repos...") #define MSG_USERWAIT _UxGT("Atten. de l'util.") #define MSG_PRINT_PAUSED _UxGT("Impr. en pause") -#define MSG_RESUMING _UxGT("Repri. de l'impr.") #define MSG_PRINT_ABORTED _UxGT("Impr. Annulée") #define MSG_NO_MOVE _UxGT("Moteurs bloqués.") #define MSG_KILLED _UxGT("MORT.") @@ -295,8 +294,7 @@ #define MSG_ERR_MINTEMP _UxGT("Err: TEMP. MIN") #define MSG_ERR_MAXTEMP_BED _UxGT("Err: TEMP. MAX LIT") #define MSG_ERR_MINTEMP_BED _UxGT("Err: TEMP. MIN LIT") -#define MSG_ERR_Z_HOMING _UxGT("G28 Z interdit") - +#define MSG_ERR_Z_HOMING MSG_HOME _UxGT(" ") MSG_X MSG_Y _UxGT(" ") MSG_FIRST #define MSG_HALTED _UxGT("IMPR. STOPPÉE") #define MSG_PLEASE_RESET _UxGT("RàZ. SVP") #define MSG_SHORT_DAY _UxGT("j") // One character only @@ -304,9 +302,7 @@ #define MSG_SHORT_MINUTE _UxGT("m") // One character only #define MSG_HEATING _UxGT("En chauffe...") -#define MSG_HEATING_COMPLETE _UxGT("Chauffe terminée") #define MSG_BED_HEATING _UxGT("Lit en chauffe...") -#define MSG_BED_DONE _UxGT("Chauffe lit terminée") #define MSG_DELTA_CALIBRATE _UxGT("Calibration Delta") #define MSG_DELTA_CALIBRATE_X _UxGT("Calibrer X") #define MSG_DELTA_CALIBRATE_Y _UxGT("Calibrer Y") diff --git a/Marlin/language_gl.h b/Marlin/language_gl.h index 754e95bf13..b97a414417 100644 --- a/Marlin/language_gl.h +++ b/Marlin/language_gl.h @@ -149,7 +149,6 @@ #define MSG_NO_CARD _UxGT("Sen tarxeta SD") #define MSG_DWELL _UxGT("En repouso...") #define MSG_USERWAIT _UxGT("A espera...") -#define MSG_RESUMING _UxGT("Imprimindo...") #define MSG_PRINT_ABORTED _UxGT("Impre. cancelada") #define MSG_NO_MOVE _UxGT("Sen movemento.") #define MSG_KILLED _UxGT("PROGRAMA MORTO") @@ -182,16 +181,14 @@ #define MSG_ERR_MINTEMP _UxGT("Err: temp. min.") #define MSG_ERR_MAXTEMP_BED _UxGT("Err: MAXTEMP BED") #define MSG_ERR_MINTEMP_BED _UxGT("Err: MINTEMP BED") -#define MSG_ERR_Z_HOMING _UxGT("G28 Z impedido") +#define MSG_ERR_Z_HOMING MSG_HOME _UxGT(" ") MSG_X MSG_Y _UxGT(" ") MSG_FIRST #define MSG_HALTED _UxGT("SISTEMA MORTO") #define MSG_PLEASE_RESET _UxGT("Debe reiniciar!") #define MSG_SHORT_DAY _UxGT("d") // One character only #define MSG_SHORT_HOUR _UxGT("h") // One character only #define MSG_SHORT_MINUTE _UxGT("m") // One character only #define MSG_HEATING _UxGT("Quentando...") -#define MSG_HEATING_COMPLETE _UxGT("Xa esta quente") -#define MSG_BED_HEATING _UxGT("Quentando cama") -#define MSG_BED_DONE _UxGT("Cama esta quente") +#define MSG_BED_HEATING _UxGT("Quentando cama...") #define MSG_DELTA_CALIBRATE _UxGT("Calibracion Delta") #define MSG_DELTA_CALIBRATE_X _UxGT("Calibrar X") #define MSG_DELTA_CALIBRATE_Y _UxGT("Calibrar Y") diff --git a/Marlin/language_hr.h b/Marlin/language_hr.h index 0cd9b89bd8..3b8fdd7433 100644 --- a/Marlin/language_hr.h +++ b/Marlin/language_hr.h @@ -148,7 +148,6 @@ #define MSG_NO_CARD _UxGT("Nema SD kartice") #define MSG_DWELL _UxGT("Sleep...") #define MSG_USERWAIT _UxGT("Čekaj korisnika...") -#define MSG_RESUMING _UxGT("Nastavljam print") #define MSG_PRINT_ABORTED _UxGT("Print otkazan") #define MSG_NO_MOVE _UxGT("No move.") #define MSG_KILLED _UxGT("KILLED. ") @@ -181,16 +180,14 @@ #define MSG_ERR_MINTEMP _UxGT("Err: MINTEMP") #define MSG_ERR_MAXTEMP_BED _UxGT("Err: MAXTEMP BED") #define MSG_ERR_MINTEMP_BED _UxGT("Err: MINTEMP BED") -#define MSG_ERR_Z_HOMING _UxGT("G28 Z Forbidden") +#define MSG_ERR_Z_HOMING MSG_HOME _UxGT(" ") MSG_X MSG_Y _UxGT(" ") MSG_FIRST #define MSG_HALTED _UxGT("PRINTER HALTED") #define MSG_PLEASE_RESET _UxGT("Please reset") #define MSG_SHORT_DAY _UxGT("d") // One character only #define MSG_SHORT_HOUR _UxGT("h") // One character only #define MSG_SHORT_MINUTE _UxGT("m") // One character only #define MSG_HEATING _UxGT("Grijanje...") -#define MSG_HEATING_COMPLETE _UxGT("Grijanje gotovo.") -#define MSG_BED_HEATING _UxGT("Grijanje Bed-a.") -#define MSG_BED_DONE _UxGT("Bed gotov.") +#define MSG_BED_HEATING _UxGT("Grijanje Bed-a...") #define MSG_DELTA_CALIBRATE _UxGT("Delta Kalibracija") #define MSG_DELTA_CALIBRATE_X _UxGT("Kalibriraj X") #define MSG_DELTA_CALIBRATE_Y _UxGT("Kalibriraj Y") diff --git a/Marlin/language_it.h b/Marlin/language_it.h index 80d64132ea..1439d3e5c6 100644 --- a/Marlin/language_it.h +++ b/Marlin/language_it.h @@ -252,7 +252,6 @@ #define MSG_DWELL _UxGT("Sospensione...") #define MSG_USERWAIT _UxGT("Premi tasto..") #define MSG_PRINT_PAUSED _UxGT("Stampa sospesa") -#define MSG_RESUMING _UxGT("Riprendi Stampa") #define MSG_PRINT_ABORTED _UxGT("Stampa annullata") #define MSG_NO_MOVE _UxGT("Nessun Movimento") #define MSG_KILLED _UxGT("UCCISO. ") @@ -287,22 +286,23 @@ #define MSG_BABYSTEP_Z _UxGT("Babystep Z") #define MSG_ENDSTOP_ABORT _UxGT("Finecorsa abort") #define MSG_HEATING_FAILED_LCD _UxGT("Riscald. Fallito") +#define MSG_HEATING_FAILED_LCD_BED _UxGT("Risc. piatto fallito") #define MSG_ERR_REDUNDANT_TEMP _UxGT("Err: TEMP RIDONDANTI") #define MSG_THERMAL_RUNAWAY _UxGT("TEMP FUORI CONTROLLO") #define MSG_ERR_MAXTEMP _UxGT("Err: TEMP MASSIMA") #define MSG_ERR_MINTEMP _UxGT("Err: TEMP MINIMA") #define MSG_ERR_MAXTEMP_BED _UxGT("Err: TEMP MASSIMA PIATTO") #define MSG_ERR_MINTEMP_BED _UxGT("Err: TEMP MINIMA PIATTO") -#define MSG_ERR_Z_HOMING _UxGT("G28 Z Vietato") +#define MSG_ERR_Z_HOMING MSG_HOME _UxGT(" ") MSG_X MSG_Y _UxGT(" ") MSG_FIRST #define MSG_HALTED _UxGT("STAMPANTE FERMATA") #define MSG_PLEASE_RESET _UxGT("Riavviare prego") #define MSG_SHORT_DAY _UxGT("g") // One character only #define MSG_SHORT_HOUR _UxGT("h") // One character only #define MSG_SHORT_MINUTE _UxGT("m") // One character only -#define MSG_HEATING _UxGT("Riscaldamento..") -#define MSG_HEATING_COMPLETE _UxGT("Risc. completato") -#define MSG_BED_HEATING _UxGT("Risc. Piatto..") -#define MSG_BED_DONE _UxGT("Piatto Pronto") +#define MSG_HEATING _UxGT("Riscaldamento...") +#define MSG_COOLING _UxGT("Raffreddamento..") +#define MSG_BED_HEATING _UxGT("Risc. piatto...") +#define MSG_BED_COOLING _UxGT("Raffr. piatto...") #define MSG_DELTA_CALIBRATE _UxGT("Calibraz. Delta") #define MSG_DELTA_CALIBRATE_X _UxGT("Calibra X") #define MSG_DELTA_CALIBRATE_Y _UxGT("Calibra Y") diff --git a/Marlin/language_kana.h b/Marlin/language_kana.h index 76a88be533..4989ebf1bc 100644 --- a/Marlin/language_kana.h +++ b/Marlin/language_kana.h @@ -201,7 +201,6 @@ #define MSG_NO_CARD "SD\xb6\xb0\xc4\xde\xb6\xde\xb1\xd8\xcf\xbe\xdd" // "SDカードガアリマセン" ("No SD card") #define MSG_DWELL "\xb7\xad\xb3\xbc" // "キュウシ" ("Sleep...") #define MSG_USERWAIT "\xbc\xca\xde\xd7\xb8\xb5\xcf\xc1\xb8\xc0\xde\xbb\xb2" // "シバラクオマチクダサイ" ("Wait for user...") -#define MSG_RESUMING "\xcc\xdf\xd8\xdd\xc4\xbb\xb2\xb6\xb2" // "プリントサイカイ" ("Resuming print") #define MSG_PRINT_ABORTED "\xcc\xdf\xd8\xdd\xc4\xb6\xde\xc1\xad\xb3\xbc\xbb\xda\xcf\xbc\xc0" // "プリントガチュウシサレマシタ" ("Print aborted") #define MSG_NO_MOVE "\xb3\xba\xde\xb7\xcf\xbe\xdd" // "ウゴキマセン" ("No move.") #define MSG_KILLED "\xcb\xbc\xde\xae\xb3\xc3\xb2\xbc" // "ヒジョウテイシ" ("KILLED. ") @@ -272,9 +271,7 @@ #define MSG_SHORT_HOUR "h" // One character only #define MSG_SHORT_MINUTE "m" // One character only #define MSG_HEATING "\xb6\xc8\xc2\xc1\xad\xb3" // "カネツチュウ" ("Heating...") -#define MSG_HEATING_COMPLETE "\xb6\xc8\xc2\xb6\xdd\xd8\xae\xb3" // "カネツカンリョウ" ("Heating done.") -#define MSG_BED_HEATING "\xcd\xde\xaf\xc4\xde\x20\xb6\xc8\xc2\xc1\xad\xb3" // "ベッド カネツチュウ" ("Bed Heating.") -#define MSG_BED_DONE "\xcd\xde\xaf\xc4\xde\x20\xb6\xc8\xc2\xb6\xdd\xd8\xae\xb3" // "ベッド カネツカンリョウ" ("Bed done.") +#define MSG_BED_HEATING "\xcd\xde\xaf\xc4\xde\x20\xb6\xc8\xc2\xc1\xad\xb3" // "ベッド カネツチュウ" ("Bed Heating...") #define MSG_DELTA_CALIBRATE "\xc3\xde\xd9\xc0\x20\xba\xb3\xbe\xb2" // "デルタ コウセイ" ("Delta Calibration") #define MSG_DELTA_CALIBRATE_X "X\xbc\xde\xb8\x20\xba\xb3\xbe\xb2" // "Xジク コウセイ" ("Calibrate X") #define MSG_DELTA_CALIBRATE_Y "Y\xbc\xde\xb8\x20\xba\xb3\xbe\xb2" // "Yジク コウセイ" ("Calibrate Y") diff --git a/Marlin/language_kana_utf8.h b/Marlin/language_kana_utf8.h index eaa970a289..f33432532f 100644 --- a/Marlin/language_kana_utf8.h +++ b/Marlin/language_kana_utf8.h @@ -78,7 +78,7 @@ #define MSG_MOVE_AXIS _UxGT("ジクイドウ") // "Move axis" #define MSG_BED_LEVELING _UxGT("ベッドレベリング") // "Bed leveling" #define MSG_LEVEL_BED _UxGT("ベッドレベリング") // "Level bed" -#define MSG_MOVING _UxGT("イドウチュウ") // "Moving..." +#define MSG_MOVING _UxGT("イドウチュウ...") // "Moving..." #define MSG_FREE_XY _UxGT("XYジク カイホウ") // "Free XY" #define MSG_MOVE_X _UxGT("Xジク イドウ") // "Move X" #define MSG_MOVE_Y _UxGT("Yジク イドウ") // "Move Y" @@ -142,9 +142,8 @@ #define MSG_STOP_PRINT _UxGT("プリントテイシ") // "Stop print" #define MSG_CARD_MENU _UxGT("SDカードカラプリント") // "Print from SD" #define MSG_NO_CARD _UxGT("SDカードガアリマセン") // "No SD card" -#define MSG_DWELL _UxGT("キュウシ") // "Sleep..." -#define MSG_USERWAIT _UxGT("シバラクオマチクダサイ") // "Wait for user..." -#define MSG_RESUMING _UxGT("プリントサイカイ") // "Resuming print" +#define MSG_DWELL _UxGT("キュウシ...") // "Sleep..." +#define MSG_USERWAIT _UxGT("シバラクオマチクダサイ...") // "Wait for user..." #define MSG_PRINT_ABORTED _UxGT("プリントガチュウシサレマシタ") // "Print aborted" #define MSG_NO_MOVE _UxGT("ウゴキマセン") // "No move." #define MSG_KILLED _UxGT("ヒジョウテイシ") // "KILLED. " @@ -183,10 +182,8 @@ #define MSG_SHORT_DAY _UxGT("d") // One character only #define MSG_SHORT_HOUR _UxGT("h") // One character only #define MSG_SHORT_MINUTE _UxGT("m") // One character only -#define MSG_HEATING _UxGT("カネツチュウ") // "Heating..." -#define MSG_HEATING_COMPLETE _UxGT("カネツカンリョウ") // "Heating done." -#define MSG_BED_HEATING _UxGT("ベッド カネツチュウ") // "Bed Heating." -#define MSG_BED_DONE _UxGT("ベッド カネツカンリョウ") // "Bed done." +#define MSG_HEATING _UxGT("カネツチュウ...") // "Heating..." +#define MSG_BED_HEATING _UxGT("ベッド カネツチュウ...") // "Bed Heating..." #define MSG_DELTA_CALIBRATE _UxGT("デルタ コウセイ") // "Delta Calibration" #define MSG_DELTA_CALIBRATE_X _UxGT("Xジク コウセイ") // "Calibrate X" #define MSG_DELTA_CALIBRATE_Y _UxGT("Yジク コウセイ") // "Calibrate Y" diff --git a/Marlin/language_nl.h b/Marlin/language_nl.h index 4221156905..0a2726294d 100644 --- a/Marlin/language_nl.h +++ b/Marlin/language_nl.h @@ -156,7 +156,6 @@ #define MSG_NO_CARD _UxGT("Geen SD kaart") #define MSG_DWELL _UxGT("Slapen...") #define MSG_USERWAIT _UxGT("Wachten...") -#define MSG_RESUMING _UxGT("Print hervatten") #define MSG_PRINT_ABORTED _UxGT("Print afgebroken") #define MSG_NO_MOVE _UxGT("Geen beweging.") #define MSG_KILLED _UxGT("Afgebroken. ") @@ -189,16 +188,14 @@ #define MSG_ERR_MINTEMP _UxGT("Err: Min. temp") #define MSG_ERR_MAXTEMP_BED _UxGT("Err: Max.tmp bed") #define MSG_ERR_MINTEMP_BED _UxGT("Err: Min.tmp bed") -#define MSG_ERR_Z_HOMING _UxGT("Fout Z homing") +#define MSG_ERR_Z_HOMING MSG_HOME _UxGT(" ") MSG_X MSG_Y _UxGT(" ") MSG_FIRST #define MSG_HALTED _UxGT("PRINTER GESTOPT") #define MSG_PLEASE_RESET _UxGT("Reset A.U.B.") #define MSG_SHORT_DAY _UxGT("d") // One character only. Keep English standard #define MSG_SHORT_HOUR _UxGT("h") // One character only #define MSG_SHORT_MINUTE _UxGT("m") // One character only #define MSG_HEATING _UxGT("Voorwarmen...") -#define MSG_HEATING_COMPLETE _UxGT("Voorverw. kompl.") -#define MSG_BED_HEATING _UxGT("Bed voorverw.") -#define MSG_BED_DONE _UxGT("Bed is voorverw.") +#define MSG_BED_HEATING _UxGT("Bed voorverw...") #define MSG_DELTA_CALIBRATE _UxGT("Delta Calibratie") #define MSG_DELTA_CALIBRATE_X _UxGT("Kalibreer X") #define MSG_DELTA_CALIBRATE_Y _UxGT("Kalibreer Y") diff --git a/Marlin/language_pl-DOGM.h b/Marlin/language_pl-DOGM.h index a7d3d268c5..8210fe51f2 100644 --- a/Marlin/language_pl-DOGM.h +++ b/Marlin/language_pl-DOGM.h @@ -145,7 +145,6 @@ #define MSG_NO_CARD _UxGT("Brak karty") #define MSG_DWELL _UxGT("Uśpij...") #define MSG_USERWAIT _UxGT("Oczekiwanie...") -#define MSG_RESUMING _UxGT("Wznawianie druku") #define MSG_PRINT_ABORTED _UxGT("Druk przerwany") #define MSG_NO_MOVE _UxGT("Brak ruchu") #define MSG_KILLED _UxGT("Ubity. ") @@ -178,16 +177,14 @@ #define MSG_ERR_MINTEMP _UxGT("Err min temp") #define MSG_ERR_MAXTEMP_BED _UxGT("Err max temp stołu") #define MSG_ERR_MINTEMP_BED _UxGT("Err min temp stołu") -#define MSG_ERR_Z_HOMING _UxGT("G28 Z Forbidden") +#define MSG_ERR_Z_HOMING MSG_HOME _UxGT(" ") MSG_X MSG_Y _UxGT(" ") MSG_FIRST #define MSG_HALTED _UxGT("Drukarka zatrzym.") #define MSG_PLEASE_RESET _UxGT("Proszę zresetować") #define MSG_SHORT_DAY _UxGT("d") // One character only #define MSG_SHORT_HOUR _UxGT("g") // One character only #define MSG_SHORT_MINUTE _UxGT("m") // One character only #define MSG_HEATING _UxGT("Rozgrzewanie...") -#define MSG_HEATING_COMPLETE _UxGT("Rozgrzano") #define MSG_BED_HEATING _UxGT("Rozgrzewanie stołu...") -#define MSG_BED_DONE _UxGT("Rozgrzano stół") #define MSG_DELTA_CALIBRATE _UxGT("Kalibrowanie Delty") #define MSG_DELTA_CALIBRATE_X _UxGT("Kalibruj X") #define MSG_DELTA_CALIBRATE_Y _UxGT("Kalibruj Y") diff --git a/Marlin/language_pl-HD44780.h b/Marlin/language_pl-HD44780.h index f884789a5d..6968fc8a37 100644 --- a/Marlin/language_pl-HD44780.h +++ b/Marlin/language_pl-HD44780.h @@ -146,7 +146,6 @@ #define MSG_NO_CARD _UxGT("Brak karty") #define MSG_DWELL _UxGT("Uspij...") #define MSG_USERWAIT _UxGT("Oczekiwanie...") -#define MSG_RESUMING _UxGT("Wznawianie druku") #define MSG_PRINT_ABORTED _UxGT("Druk przerwany") #define MSG_NO_MOVE _UxGT("Brak ruchu") #define MSG_KILLED _UxGT("Ubity. ") @@ -179,16 +178,14 @@ #define MSG_ERR_MINTEMP _UxGT("Err min temp") #define MSG_ERR_MAXTEMP_BED _UxGT("Err max temp stolu") #define MSG_ERR_MINTEMP_BED _UxGT("Err min temp stolu") -#define MSG_ERR_Z_HOMING _UxGT("G28 Z Forbidden") +#define MSG_ERR_Z_HOMING MSG_HOME _UxGT(" ") MSG_X MSG_Y _UxGT(" ") MSG_FIRST #define MSG_HALTED _UxGT("Drukarka zatrzym.") #define MSG_PLEASE_RESET _UxGT("Prosze zresetowac") #define MSG_SHORT_DAY _UxGT("d") // One character only #define MSG_SHORT_HOUR _UxGT("g") // One character only #define MSG_SHORT_MINUTE _UxGT("m") // One character only #define MSG_HEATING _UxGT("Rozgrzewanie...") -#define MSG_HEATING_COMPLETE _UxGT("Rozgrzano") #define MSG_BED_HEATING _UxGT("Rozgrzewanie stolu...") -#define MSG_BED_DONE _UxGT("Rozgrzano stol") #define MSG_DELTA_CALIBRATE _UxGT("Kalibrowanie Delty") #define MSG_DELTA_CALIBRATE_X _UxGT("Kalibruj X") #define MSG_DELTA_CALIBRATE_Y _UxGT("Kalibruj Y") diff --git a/Marlin/language_pt-br.h b/Marlin/language_pt-br.h index 86ea01e4d9..8793202517 100644 --- a/Marlin/language_pt-br.h +++ b/Marlin/language_pt-br.h @@ -33,152 +33,350 @@ #define DISPLAY_CHARSET_ISO10646_1 #define NOT_EXTENDED_ISO10646_1_5X7 -#define WELCOME_MSG MACHINE_NAME " pronto." -#define MSG_SD_INSERTED "Cartao inserido" -#define MSG_SD_REMOVED "Cartao removido" -#define MSG_MAIN "Menu principal" -#define MSG_AUTOSTART "Autostart" -#define MSG_DISABLE_STEPPERS "Desabi. motores" -#define MSG_AUTO_HOME "Ir para origen" -#define MSG_LEVEL_BED_HOMING "Homing XYZ" -#define MSG_LEVEL_BED_WAITING "Click to Begin" -#define MSG_LEVEL_BED_DONE "Leveling Done!" -#define MSG_SET_HOME_OFFSETS "Ajustar Jogo" -#define MSG_HOME_OFFSETS_APPLIED "Offsets applied" -#define MSG_SET_ORIGIN "Ajustar orig." -#define MSG_PREHEAT_1 "Pre-aquecer PLA" -#define MSG_PREHEAT_1_N "Pre-aquecer PLA" -#define MSG_PREHEAT_1_ALL "Pre-aq.Todo PLA" -#define MSG_PREHEAT_1_BEDONLY "Pre-aq. PLA " LCD_STR_THERMOMETER "Base" -#define MSG_PREHEAT_1_SETTINGS "Ajustar PLA" -#define MSG_PREHEAT_2 "Pre-aquecer ABS" -#define MSG_PREHEAT_2_N "Pre-aquecer ABS" -#define MSG_PREHEAT_2_ALL "Pre-aq.Todo ABS" -#define MSG_PREHEAT_2_BEDONLY "Pre-aq. ABS " LCD_STR_THERMOMETER "Base" -#define MSG_PREHEAT_2_SETTINGS "Ajustar ABS" -#define MSG_COOLDOWN "Esfriar" -#define MSG_SWITCH_PS_ON "Ligar" -#define MSG_SWITCH_PS_OFF "Desligar" -#define MSG_EXTRUDE "Extrudar" -#define MSG_RETRACT "Retrair" -#define MSG_MOVE_AXIS "Mover eixo" -#define MSG_MOVE_X "Mover X" -#define MSG_MOVE_Y "Mover Y" -#define MSG_MOVE_Z "Mover Z" -#define MSG_MOVE_E "Mover Extrusor" -#define MSG_MOVE_01MM "Mover 0.1mm" -#define MSG_MOVE_1MM "Mover 1mm" -#define MSG_MOVE_10MM "Mover 10mm" -#define MSG_SPEED "Velocidade" -#define MSG_BED_Z "Base Z" -#define MSG_NOZZLE LCD_STR_THERMOMETER " Bocal" -#define MSG_BED LCD_STR_THERMOMETER " Base" -#define MSG_FAN_SPEED "Vel. Ventoinha" -#define MSG_FLOW "Fluxo" -#define MSG_CONTROL "Controle" -#define MSG_MIN LCD_STR_THERMOMETER " Min" -#define MSG_MAX LCD_STR_THERMOMETER " Max" -#define MSG_FACTOR LCD_STR_THERMOMETER " Fact" -#define MSG_AUTOTEMP "Temp. Automatica" -#define MSG_ON "Ligado " -#define MSG_OFF "Desligado" -#define MSG_PID_P "PID-P" -#define MSG_PID_I "PID-I" -#define MSG_PID_D "PID-D" -#define MSG_PID_C "PID-C" -#define MSG_ACC "Acc" -#define MSG_JERK "Jogo" -#if IS_KINEMATIC - #define MSG_VA_JERK "jogo VA" - #define MSG_VB_JERK "jogo VB" - #define MSG_VC_JERK "jogo VC" +#define WELCOME_MSG MACHINE_NAME _UxGT(" pronto.") + +#define MSG_BACK _UxGT("Voltar") +#define MSG_SD_INSERTED _UxGT("Cartao inserido") +#define MSG_SD_REMOVED _UxGT("Cartao removido") +#define MSG_LCD_ENDSTOPS _UxGT("Finais") +#define MSG_MAIN _UxGT("Menu principal") +#define MSG_AUTOSTART _UxGT("Autostart") +#define MSG_DISABLE_STEPPERS _UxGT("Desabi. motores") +#define MSG_DEBUG_MENU _UxGT("Menu Debug") +#define MSG_PROGRESS_BAR_TEST _UxGT("Testar Barra de Prog")//resso +#define MSG_AUTO_HOME_X _UxGT("Ir na origem X") +#define MSG_AUTO_HOME_Y _UxGT("Ir na origem Y") +#define MSG_AUTO_HOME_Z _UxGT("Ir na origem Z") +#define MSG_AUTO_HOME _UxGT("Ir na origem XYZ") +#define MSG_LEVEL_BED_HOMING _UxGT("Indo para origem") +#define MSG_LEVEL_BED_WAITING _UxGT("Clique para Iniciar") +#define MSG_LEVEL_BED_NEXT_POINT _UxGT("Proximo Ponto") +#define MSG_LEVEL_BED_DONE _UxGT("Fim da nivelacao!") +#define MSG_Z_FADE_HEIGHT _UxGT("Suavizar altura") +#define MSG_SET_HOME_OFFSETS _UxGT("Compensar origem") +#define MSG_HOME_OFFSETS_APPLIED _UxGT("Alteracao feita") +#define MSG_SET_ORIGIN _UxGT("Ajustar Origem") +#define MSG_PREHEAT_1 _UxGT("Pre-aquecer PLA") +#define MSG_PREHEAT_1_N MSG_PREHEAT_1 _UxGT(" ") +#define MSG_PREHEAT_1_ALL _UxGT("Pre-aq.Todo PLA") +#define MSG_PREHEAT_1_END _UxGT("Pre-aq.Extrusora") +#define MSG_PREHEAT_1_BEDONLY _UxGT("Pre-aq.Mesa PLA") +#define MSG_PREHEAT_1_SETTINGS _UxGT("Ajustar PLA") +#define MSG_PREHEAT_2 _UxGT("Pre-aquecer ABS") +#define MSG_PREHEAT_2_N _UxGT("Pre-aquecer ABS") +#define MSG_PREHEAT_2_ALL _UxGT("Pre-aq.Todo ABS") +#define MSG_PREHEAT_2_BEDONLY _UxGT("Pre-aq.Mesa ABS") +#define MSG_PREHEAT_2_END _UxGT("Pre-aq.Extrusora") +#define MSG_PREHEAT_2_SETTINGS _UxGT("Ajustar ABS") +#define MSG_COOLDOWN _UxGT("Esfriar") +#define MSG_SWITCH_PS_ON _UxGT("Ligar") +#define MSG_SWITCH_PS_OFF _UxGT("Desligar") +#define MSG_EXTRUDE _UxGT("Extrusar") +#define MSG_RETRACT _UxGT("Retrair") +#define MSG_MOVE_AXIS _UxGT("Mover eixo") +#define MSG_BED_LEVELING _UxGT("Nivelacao Mesa") +#define MSG_LEVEL_BED _UxGT("Nivelar Mesa") +#define MSG_LEVEL_CORNERS _UxGT("Nivelar Cantos") +#define MSG_NEXT_CORNER _UxGT("Proximo Canto") +#define MSG_EDITING_STOPPED _UxGT("Fim da Edicao") + +#define MSG_USER_MENU _UxGT("Comando customizado") +#define MSG_UBL_DOING_G29 _UxGT("Executando G29") +#define MSG_UBL_UNHOMED _UxGT("Fora da Origam") +#define MSG_UBL_TOOLS _UxGT("Ferramentas UBL") +#define MSG_UBL_LEVEL_BED _UxGT("Unified Bed Leveling") +#define MSG_UBL_MANUAL_MESH _UxGT("Fazer malha manual") +#define MSG_UBL_BC_INSERT _UxGT("Calcar e calibrar") +#define MSG_UBL_BC_INSERT2 _UxGT("Medir") +#define MSG_UBL_BC_REMOVE _UxGT("Remover e calibrar") + +#define MSG_UBL_MOVING_TO_NEXT _UxGT("Indo para o Proximo") +#define MSG_UBL_ACTIVATE_MESH _UxGT("Ativar UBL") +#define MSG_UBL_DEACTIVATE_MESH _UxGT("Desativar UBL") +#define MSG_UBL_SET_BED_TEMP _UxGT("Temp. Mesa") +#define MSG_UBL_CUSTOM_BED_TEMP MSG_UBL_SET_BED_TEMP +#define MSG_UBL_SET_HOTEND_TEMP _UxGT("Temp. Extrusora") +#define MSG_UBL_CUSTOM_HOTEND_TEMP MSG_UBL_SET_HOTEND_TEMP +#define MSG_UBL_MESH_EDIT _UxGT("Editar Malha") +#define MSG_UBL_EDIT_CUSTOM_MESH _UxGT("Editar Malha Custom") +#define MSG_UBL_FINE_TUNE_MESH _UxGT("Ajuste Fino da Malha") +#define MSG_UBL_DONE_EDITING_MESH _UxGT("Fim da Edicao") +#define MSG_UBL_BUILD_CUSTOM_MESH _UxGT("Montar Customi") +#define MSG_UBL_BUILD_MESH_MENU _UxGT("Montar ") +#define MSG_UBL_BUILD_PLA_MESH _UxGT("Montar PLA") +#define MSG_UBL_BUILD_ABS_MESH _UxGT("Montar ABS") +#define MSG_UBL_BUILD_COLD_MESH _UxGT("Montar fria") +#define MSG_UBL_MESH_HEIGHT_ADJUST _UxGT("Ajustar Altura") +#define MSG_UBL_MESH_HEIGHT_AMOUNT _UxGT("Tamanho da Elevacao") +#define MSG_UBL_VALIDATE_MESH_MENU _UxGT("Validar Malha") +#define MSG_UBL_VALIDATE_PLA_MESH _UxGT("Checar PLA") +#define MSG_UBL_VALIDATE_ABS_MESH _UxGT("Checar ABS") +#define MSG_UBL_VALIDATE_CUSTOM_MESH _UxGT("Validar Malha Custom") +#define MSG_UBL_CONTINUE_MESH _UxGT("Continuar Malha") +#define MSG_UBL_MESH_LEVELING _UxGT("Nivelacao da Malha") +#define MSG_UBL_3POINT_MESH_LEVELING _UxGT("Nivelacao 3 pontos") +#define MSG_UBL_GRID_MESH_LEVELING _UxGT("Nivelacao Grid") +#define MSG_UBL_MESH_LEVEL _UxGT("Nivelar Malha") +#define MSG_UBL_SIDE_POINTS _UxGT("Cantos") +#define MSG_UBL_MAP_TYPE _UxGT("Tipo de Mapa") +#define MSG_UBL_OUTPUT_MAP _UxGT("Salvar Mapa da Malha") +#define MSG_UBL_OUTPUT_MAP_HOST _UxGT("Enviar Para Host") +#define MSG_UBL_OUTPUT_MAP_CSV _UxGT("Salvar Malha CSV") +#define MSG_UBL_OUTPUT_MAP_BACKUP _UxGT("Salvar Backup") +#define MSG_UBL_INFO_UBL _UxGT("Informacao do UBL") +#define MSG_UBL_EDIT_MESH_MENU _UxGT("Editar Malha") +#define MSG_UBL_FILLIN_AMOUNT _UxGT("Qtd de Enchimento") +#define MSG_UBL_MANUAL_FILLIN _UxGT("Enchimento Manual") +#define MSG_UBL_SMART_FILLIN _UxGT("Enchimento Smart") +#define MSG_UBL_FILLIN_MESH _UxGT("Preencher malha") +#define MSG_UBL_INVALIDATE_ALL _UxGT("Invalidar tudo") +#define MSG_UBL_INVALIDATE_CLOSEST _UxGT("Invalidar proximo") +#define MSG_UBL_FINE_TUNE_ALL _UxGT("Ajuste Fino de Todos") +#define MSG_UBL_FINE_TUNE_CLOSEST _UxGT("Ajuar Mais Proximo") +#define MSG_UBL_STORAGE_MESH_MENU _UxGT("Armazenamento Malha") +#define MSG_UBL_STORAGE_SLOT _UxGT("Slot de Memoria") +#define MSG_UBL_LOAD_MESH _UxGT("Ler Malha") +#define MSG_UBL_SAVE_MESH _UxGT("Salvar Malha") +#define MSG_MESH_LOADED _UxGT("Malha %i carregada") +#define MSG_MESH_SAVED _UxGT("Malha %i salva") +#define MSG_NO_STORAGE _UxGT("Sem armazenamento") +#define MSG_UBL_SAVE_ERROR _UxGT("Erro ao salvar UBL") +#define MSG_UBL_RESTORE_ERROR _UxGT("Erro no restauro UBL") +#define MSG_UBL_Z_OFFSET_STOPPED _UxGT("Compensacao Z parou") +#define MSG_UBL_STEP_BY_STEP_MENU _UxGT("UBL passo a passo") +#define MSG_LED_CONTROL _UxGT("Controle do LED") +#define MSG_LEDS_ON _UxGT("Luz Acesa") +#define MSG_LEDS_OFF _UxGT("Luz Apagada") +#define MSG_LED_PRESETS _UxGT("Configuracao da Luz") +#define MSG_SET_LEDS_RED _UxGT("Luz Vermelha") +#define MSG_SET_LEDS_ORANGE _UxGT("Luz Laranja") +#define MSG_SET_LEDS_YELLOW _UxGT("Luz Amarela") +#define MSG_SET_LEDS_GREEN _UxGT("Luz Verde") +#define MSG_SET_LEDS_BLUE _UxGT("Luz Azul") +#define MSG_SET_LEDS_INDIGO _UxGT("Luz Indigo") +#define MSG_SET_LEDS_VIOLET _UxGT("Luz Violeta") +#define MSG_SET_LEDS_WHITE _UxGT("Luz Branca") +#define MSG_SET_LEDS_DEFAULT _UxGT("Luz Padrao") +#define MSG_CUSTOM_LEDS _UxGT("Luz Customizada") +#define MSG_INTENSITY_R _UxGT("Intensidade Vermelho") +#define MSG_INTENSITY_G _UxGT("Intensidade Verde") +#define MSG_INTENSITY_B _UxGT("Intensidade Azul") +#define MSG_INTENSITY_W _UxGT("Intensidade Branco") +#define MSG_LED_BRIGHTNESS _UxGT("Brilho") + +#define MSG_MOVING _UxGT("Movendo...") +#define MSG_FREE_XY _UxGT("Liberar XY") +#define MSG_MOVE_X _UxGT("Mover X") +#define MSG_MOVE_Y _UxGT("Mover Y") +#define MSG_MOVE_Z _UxGT("Mover Z") +#define MSG_MOVE_E _UxGT("Mover Extrusor") +#define MSG_MOVE_01MM _UxGT("Mover 0.1mm") +#define MSG_MOVE_1MM _UxGT("Mover 1mm") +#define MSG_MOVE_10MM _UxGT("Mover 10mm") +#define MSG_SPEED _UxGT("Velocidade") +#define MSG_BED_Z _UxGT("Base Z") +#define MSG_NOZZLE _UxGT("Bocal") +#define MSG_BED _UxGT("Mesa") +#define MSG_FAN_SPEED _UxGT("Vel. Ventoinha") +#define MSG_FLOW _UxGT("Vazao") +#define MSG_CONTROL _UxGT("Controle") +#define MSG_MIN LCD_STR_THERMOMETER _UxGT(" Min") +#define MSG_MAX LCD_STR_THERMOMETER _UxGT(" Max") +#define MSG_FACTOR LCD_STR_THERMOMETER _UxGT(" Fator") +#define MSG_AUTOTEMP _UxGT("Temp. Automatica") +#define MSG_ON _UxGT("Ligado ") +#define MSG_OFF _UxGT("Desligado") +#define MSG_PID_P _UxGT("PID-P") +#define MSG_PID_I _UxGT("PID-I") +#define MSG_PID_D _UxGT("PID-D") +#define MSG_PID_C _UxGT("PID-C") +#define MSG_SELECT _UxGT("Selecionar") +#define MSG_ACC _UxGT("Acel.") +#define MSG_JERK _UxGT("Jogo") +#if IS_SCARA + #define MSG_VA_JERK _UxGT("jogo VA") + #define MSG_VB_JERK _UxGT("jogo VB") + #define MSG_VC_JERK _UxGT("jogo VZ") +#elif IS_DELTA + #define MSG_VA_JERK _UxGT("jogo VA") + #define MSG_VB_JERK _UxGT("jogo VB") + #define MSG_VC_JERK _UxGT("jogo VC") #else - #define MSG_VA_JERK "jogo VX" - #define MSG_VB_JERK "jogo VY" - #define MSG_VC_JERK "jogo VZ" + #define MSG_VA_JERK _UxGT("jogo VX") + #define MSG_VB_JERK _UxGT("jogo VY") + #define MSG_VC_JERK _UxGT("jogo VZ") #endif -#define MSG_VE_JERK "jogo VE" -#define MSG_VMAX " Vmax " -#define MSG_VMIN "Vmin" -#define MSG_VTRAV_MIN "VTrav min" -#define MSG_AMAX "Amax " -#define MSG_A_RETRACT "Retrair A" -#define MSG_A_TRAVEL "A-movimento" -#define MSG_STEPS_PER_MM "Passo/mm" -#if IS_KINEMATIC - #define MSG_ASTEPS "A/mm" - #define MSG_BSTEPS "B/mm" - #define MSG_CSTEPS "C/mm" +#define MSG_VE_JERK _UxGT("jogo VE") +#define MSG_VELOCITY _UxGT("Velocidade") +#define MSG_VMAX _UxGT("Vmax ") +#define MSG_VMIN _UxGT("Vmin") +#define MSG_VTRAV_MIN _UxGT("VDeslocamento min") +#define MSG_AMAX _UxGT("Amax ") +#define MSG_A_RETRACT _UxGT("Retrair A") +#define MSG_A_TRAVEL _UxGT("Movimento A") +#define MSG_STEPS_PER_MM _UxGT("Passo/mm") +#if IS_SCARA + #define MSG_ASTEPS _UxGT("Passo A/deg") + #define MSG_BSTEPS _UxGT("Passo B/deg") + #define MSG_CSTEPS _UxGT("Passo Z/mm") +#elif IS_DELTA + #define MSG_ASTEPS _UxGT("Passo A/mm") + #define MSG_BSTEPS _UxGT("Passo B/mm") + #define MSG_CSTEPS _UxGT("Passo C/mm") #else - #define MSG_ASTEPS "X/mm" - #define MSG_BSTEPS "Y/mm" - #define MSG_CSTEPS "Z/mm" + #define MSG_ASTEPS _UxGT("Passo X/mm") + #define MSG_BSTEPS _UxGT("Passo Y/mm") + #define MSG_CSTEPS _UxGT("Passo Z/mm") +#endif +#define MSG_ESTEPS _UxGT("E/mm") +#define MSG_E1STEPS _UxGT("E1/mm") +#define MSG_E2STEPS _UxGT("E2/mm") +#define MSG_E3STEPS _UxGT("E3/mm") +#define MSG_E4STEPS _UxGT("E4/mm") +#define MSG_E5STEPS _UxGT("E5/mm") +#define MSG_TEMPERATURE _UxGT("Temperatura") +#define MSG_MOTION _UxGT("Movimento") +#define MSG_FILAMENT _UxGT("Filamento") +#define MSG_VOLUMETRIC_ENABLED _UxGT("Extrusao em mm3") +#define MSG_FILAMENT_DIAM _UxGT("Diâmetro Fil.") +#define MSG_ADVANCE_K _UxGT("Avancar K") +#define MSG_CONTRAST _UxGT("Contraste") +#define MSG_STORE_EEPROM _UxGT("Salvar Configuracao") +#define MSG_LOAD_EEPROM _UxGT("Ler Configuracao") +#define MSG_RESTORE_FAILSAFE _UxGT("Restauro seguro") +#define MSG_INIT_EEPROM _UxGT("Iniciar EEPROM") +#define MSG_REFRESH LCD_STR_REFRESH _UxGT(" Atualizacao") +#define MSG_WATCH _UxGT("Informacoes") +#define MSG_PREPARE _UxGT("Preparar") +#define MSG_TUNE _UxGT("Ajustar") +#define MSG_PAUSE_PRINT _UxGT("Pausar impressao") +#define MSG_RESUME_PRINT _UxGT("Resumir impressao") +#define MSG_STOP_PRINT _UxGT("Parar impressao") +#define MSG_CARD_MENU _UxGT("Imprimir do SD") +#define MSG_NO_CARD _UxGT("Sem cartao SD") +#define MSG_DWELL _UxGT("ZzZzZz...") +#define MSG_USERWAIT _UxGT("Clique para retomar") +#define MSG_PRINT_ABORTED _UxGT("Impressao Abortada") +#define MSG_NO_MOVE _UxGT("Sem movimento") +#define MSG_KILLED _UxGT("PARADA DE EMERGENCIA") +#define MSG_STOPPED _UxGT("PAROU. ") +#define MSG_CONTROL_RETRACT _UxGT("Retrair mm") +#define MSG_CONTROL_RETRACT_SWAP _UxGT("Retrair Troca mm") +#define MSG_CONTROL_RETRACTF _UxGT("Retrair V") +#define MSG_CONTROL_RETRACT_ZLIFT _UxGT("Saltar mm") +#define MSG_CONTROL_RETRACT_RECOVER _UxGT("Des-Retrair mm") +#define MSG_CONTROL_RETRACT_RECOVER_SWAP _UxGT("Des-RetTroca mm") +#define MSG_CONTROL_RETRACT_RECOVERF _UxGT("Des-Retrair V") +#define MSG_AUTORETRACT _UxGT("Retracao Automatica") +#define MSG_FILAMENTCHANGE _UxGT("Trocar Filamento") +#define MSG_INIT_SDCARD _UxGT("Iniciar SD") +#define MSG_CNG_SDCARD _UxGT("Trocar SD") +#define MSG_ZPROBE_OUT _UxGT("Sonda fora da mesa") +#define MSG_SKEW_FACTOR _UxGT("Fator de Cisalho") +#define MSG_BLTOUCH _UxGT("BLTouch") +#define MSG_BLTOUCH_SELFTEST _UxGT("Testar BLTouch") +#define MSG_BLTOUCH_RESET _UxGT("Reiniciar BLTouch") +#define MSG_BLTOUCH_DEPLOY _UxGT("Implantar BLTouch") +#define MSG_BLTOUCH_STOW _UxGT("Condicionar BLTouch") + +#define MSG_HOME _UxGT("Home") +#define MSG_FIRST _UxGT("Primeiro") +#define MSG_ZPROBE_ZOFFSET _UxGT("Compensar Sonda em Z") +#define MSG_BABYSTEP_X _UxGT("Passinho X") +#define MSG_BABYSTEP_Y _UxGT("Passinho Y") +#define MSG_BABYSTEP_Z _UxGT("Passinho Z") +#define MSG_ENDSTOP_ABORT _UxGT("Fim de Curso") +#define MSG_HEATING_FAILED_LCD _UxGT("Aquecimento falhou") +#define MSG_ERR_REDUNDANT_TEMP _UxGT("Erro:Temp Redundante") +#define MSG_THERMAL_RUNAWAY _UxGT("ESCAPE TERMICO") +#define MSG_ERR_MAXTEMP _UxGT("Erro:Temp Maxima") +#define MSG_ERR_MINTEMP _UxGT("Erro:Temp Minima") +#define MSG_ERR_MAXTEMP_BED _UxGT("Erro:Temp Mesa Max") +#define MSG_ERR_MINTEMP_BED _UxGT("Erro:Temp Mesa Min") +#define MSG_HEATING _UxGT("Aquecendo...") +#define MSG_BED_HEATING _UxGT("Aquecendo base...") +#define MSG_DELTA_CALIBRATE _UxGT("Calibrar Delta") +#define MSG_DELTA_CALIBRATE_X _UxGT("Calibrar X") +#define MSG_DELTA_CALIBRATE_Y _UxGT("Calibrar Y") +#define MSG_DELTA_CALIBRATE_Z _UxGT("Calibrar Z") +#define MSG_DELTA_CALIBRATE_CENTER _UxGT("Calibrar Centro") + +#define MSG_DELTA_SETTINGS _UxGT("Configuracao Delta") +#define MSG_DELTA_AUTO_CALIBRATE _UxGT("Auto-Calibracao") +#define MSG_DELTA_HEIGHT_CALIBRATE _UxGT("Calibrar Altura") +#define MSG_DELTA_DIAG_ROD _UxGT("Haste Diagonal") +#define MSG_DELTA_HEIGHT _UxGT("Altura") +#define MSG_DELTA_RADIUS _UxGT("Raio") +#define MSG_INFO_MENU _UxGT("Sobre") +#define MSG_INFO_PRINTER_MENU _UxGT("Impressora") +#define MSG_3POINT_LEVELING _UxGT("Nivelamento 3 pontos") +#define MSG_LINEAR_LEVELING _UxGT("Nivelamento Linear") +#define MSG_BILINEAR_LEVELING _UxGT("Nivelamento Bilinear") +#define MSG_UBL_LEVELING _UxGT("Nivelamento UBL") +#define MSG_MESH_LEVELING _UxGT("Nivelamento da Malha") +#define MSG_INFO_STATS_MENU _UxGT("Estatisticas") +#define MSG_INFO_BOARD_MENU _UxGT("Info. da Placa") +#define MSG_INFO_THERMISTOR_MENU _UxGT("Thermistors") +#define MSG_INFO_EXTRUDERS _UxGT("Extrusoras") +#define MSG_INFO_BAUDRATE _UxGT("Frequencia Baud") +#define MSG_INFO_PROTOCOL _UxGT("Protocolo") +#define MSG_CASE_LIGHT _UxGT("Luz da Estrutura") +#define MSG_CASE_LIGHT_BRIGHTNESS _UxGT("Intensidade Brilho") +#define MSG_INFO_PRINT_COUNT _UxGT("Qtd Impressoes") +#define MSG_INFO_COMPLETED_PRINTS _UxGT("Completas") +#define MSG_INFO_PRINT_TIME _UxGT("Tempo de Imprimindo") +#define MSG_INFO_PRINT_LONGEST _UxGT("Impressao Mais Longa") +#define MSG_INFO_PRINT_FILAMENT _UxGT("Depositado") +#define MSG_INFO_MIN_TEMP _UxGT("Temp Min") +#define MSG_INFO_MAX_TEMP _UxGT("Temp Max") +#define MSG_INFO_PSU _UxGT("PSU") +#define MSG_DRIVE_STRENGTH _UxGT("Forca do Motor") +#define MSG_DAC_PERCENT _UxGT("Driver %") +#define MSG_DAC_EEPROM_WRITE _UxGT("Escrever Eeprom DAC") + +#define MSG_FILAMENT_CHANGE_HEADER _UxGT("Troca de Filamento") +#define MSG_FILAMENT_CHANGE_OPTION_HEADER _UxGT("Config. de Retomada") +#define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE _UxGT("Extrusar Mais") +#define MSG_FILAMENT_CHANGE_OPTION_RESUME _UxGT("Continuar Impressao") +#define MSG_FILAMENT_CHANGE_MINTEMP _UxGT("Temp. Minima eh ") +#define MSG_FILAMENT_CHANGE_NOZZLE _UxGT(" Bocal: ") +#define MSG_ERR_HOMING_FAILED _UxGT("Falha ao ir a origem") +#define MSG_ERR_PROBING_FAILED _UxGT("Falha ao sondar") + +#if LCD_HEIGHT >= 4 + #define MSG_FILAMENT_CHANGE_INIT_1 _UxGT("Esperando o") + #define MSG_FILAMENT_CHANGE_INIT_2 _UxGT("inicio da") + #define MSG_FILAMENT_CHANGE_INIT_3 _UxGT("troca de Filamento") + + #define MSG_FILAMENT_CHANGE_UNLOAD_1 _UxGT("Esperando") + #define MSG_FILAMENT_CHANGE_UNLOAD_2 _UxGT("remocao de filamento") + + #define MSG_FILAMENT_CHANGE_INSERT_1 _UxGT("Coloque Filamento") + #define MSG_FILAMENT_CHANGE_INSERT_2 _UxGT("pressione o botao") + #define MSG_FILAMENT_CHANGE_INSERT_3 _UxGT("para continuar...") + + #define MSG_FILAMENT_CHANGE_HEAT_1 _UxGT("Pressione o botao") + #define MSG_FILAMENT_CHANGE_HEAT_2 _UxGT("p/ Aquecer o Bocal") + + #define MSG_FILAMENT_CHANGE_HEATING_1 _UxGT("Aquecendo o Bocal") + #define MSG_FILAMENT_CHANGE_HEATING_2 _UxGT("Aguarde...") + + #define MSG_FILAMENT_CHANGE_LOAD_1 _UxGT("Esperando") + #define MSG_FILAMENT_CHANGE_LOAD_2 _UxGT("filamento") + + #define MSG_FILAMENT_CHANGE_EXTRUDE_1 _UxGT("Esperando extrusao") + #define MSG_FILAMENT_CHANGE_EXTRUDE_2 _UxGT("de filamento") + + #define MSG_FILAMENT_CHANGE_RESUME_1 _UxGT("Esperando impressao") + #define MSG_FILAMENT_CHANGE_RESUME_2 _UxGT("continuar") +#else LCD_HEIGHT < 4 + #define MSG_FILAMENT_CHANGE_INIT_1 _UxGT("Aguarde...") + #define MSG_FILAMENT_CHANGE_UNLOAD_1 _UxGT("Ejetando...") + #define MSG_FILAMENT_CHANGE_INSERT_1 _UxGT("Insira e Clique") + #define MSG_FILAMENT_CHANGE_HEATING_1 _UxGT("Aquecendo...") + #define MSG_FILAMENT_CHANGE_LOAD_1 _UxGT("Carregando...") + #define MSG_FILAMENT_CHANGE_EXTRUDE_1 _UxGT("Extrusando...") + #define MSG_FILAMENT_CHANGE_RESUME_1 _UxGT("Continuando...") #endif -#define MSG_ESTEPS "E/mm" -#define MSG_E1STEPS "E1/mm" -#define MSG_E2STEPS "E2/mm" -#define MSG_E3STEPS "E3/mm" -#define MSG_E4STEPS "E4/mm" -#define MSG_E5STEPS "E5/mm" -#define MSG_TEMPERATURE "Temperatura" -#define MSG_MOTION "Movimento" -#define MSG_FILAMENT "Filamento" -#define MSG_VOLUMETRIC_ENABLED "Extr. em mm3" -#define MSG_FILAMENT_DIAM "Diametro Fil." -#define MSG_CONTRAST "Contraste" -#define MSG_STORE_EEPROM "Salvar" -#define MSG_LOAD_EEPROM "Ler" -#define MSG_RESTORE_FAILSAFE "Rest. de emerg." -#define MSG_REFRESH LCD_STR_REFRESH " Restaurar" -#define MSG_WATCH "Monitorar" -#define MSG_PREPARE "Preparar" -#define MSG_TUNE "Afinar" -#define MSG_PAUSE_PRINT "Pausar impressao" -#define MSG_RESUME_PRINT "Resumir impressao" -#define MSG_STOP_PRINT "Parar impressao" -#define MSG_CARD_MENU "Imprimir do SD" -#define MSG_NO_CARD "Sem cartao SD" -#define MSG_DWELL "Repouso..." -#define MSG_USERWAIT "Esperando ordem" -#define MSG_RESUMING "Resumindo Impres." -#define MSG_PRINT_ABORTED "Impres. Abortada." -#define MSG_NO_MOVE "Sem movimento" -#define MSG_KILLED "PARADA DE EMERG." -#define MSG_STOPPED "PARADA. " -#define MSG_CONTROL_RETRACT "Retrair mm" -#define MSG_CONTROL_RETRACT_SWAP "Retrair Troca mm" -#define MSG_CONTROL_RETRACTF "Retrair V" -#define MSG_CONTROL_RETRACT_ZLIFT "Levantar mm" -#define MSG_CONTROL_RETRACT_RECOVER "Des Retrair mm" -#define MSG_CONTROL_RETRACT_RECOVER_SWAP "Des RetTroca mm" -#define MSG_CONTROL_RETRACT_RECOVERF "Des Retrair V" -#define MSG_AUTORETRACT "Retracao Autom." -#define MSG_FILAMENTCHANGE "Trocar Filamento" -#define MSG_INIT_SDCARD "Iniciar SD" -#define MSG_CNG_SDCARD "Trocar SD" -#define MSG_ZPROBE_OUT "Son. fora da mesa" -#define MSG_HOME "Home" // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST -#define MSG_FIRST "first" -#define MSG_ZPROBE_ZOFFSET "Deslocamento no Z" -#define MSG_BABYSTEP_X "Passinho X" -#define MSG_BABYSTEP_Y "Passinho Y" -#define MSG_BABYSTEP_Z "Passinho Z" -#define MSG_ENDSTOP_ABORT "Fim de Curso" -#define MSG_HEATING_FAILED_LCD "Aquecimento falhou" -#define MSG_ERR_REDUNDANT_TEMP "Err: REDUNDANT TEMP" -#define MSG_THERMAL_RUNAWAY "THERMAL RUNAWAY" -#define MSG_ERR_MAXTEMP "Err: T Maxima" -#define MSG_ERR_MINTEMP "Err: T Minima" -#define MSG_ERR_MAXTEMP_BED "Err: T Base Maxima" -#define MSG_ERR_MINTEMP_BED "Err: T Base Minima" -#define MSG_HEATING "Aquecendo..." -#define MSG_HEATING_COMPLETE "Aquecida." -#define MSG_BED_HEATING "Aquecendo base.." -#define MSG_BED_DONE "Base aquecida." -#define MSG_DELTA_CALIBRATE "Calibrar Delta" -#define MSG_DELTA_CALIBRATE_X "Calibrar X" -#define MSG_DELTA_CALIBRATE_Y "Calibrar Y" -#define MSG_DELTA_CALIBRATE_Z "Calibrar Z" -#define MSG_DELTA_CALIBRATE_CENTER "Calibrar Centro" #endif // LANGUAGE_PT_BR_H diff --git a/Marlin/language_pt-br_utf8.h b/Marlin/language_pt-br_utf8.h index 458500a3ce..2e481e4810 100644 --- a/Marlin/language_pt-br_utf8.h +++ b/Marlin/language_pt-br_utf8.h @@ -36,34 +36,138 @@ #define CHARSIZE 2 #define WELCOME_MSG MACHINE_NAME _UxGT(" pronto.") + +#define MSG_BACK _UxGT("Voltar") #define MSG_SD_INSERTED _UxGT("Cartão inserido") #define MSG_SD_REMOVED _UxGT("Cartão removido") +#define MSG_LCD_ENDSTOPS _UxGT("Finais") #define MSG_MAIN _UxGT("Menu principal") #define MSG_AUTOSTART _UxGT("Autostart") #define MSG_DISABLE_STEPPERS _UxGT("Desabi. motores") -#define MSG_AUTO_HOME _UxGT("Ir para origen") +#define MSG_DEBUG_MENU _UxGT("Menu Debug") +#define MSG_PROGRESS_BAR_TEST _UxGT("Testar Barra de Prog")//resso +#define MSG_AUTO_HOME_X _UxGT("Ir na origem X") +#define MSG_AUTO_HOME_Y _UxGT("Ir na origem Y") +#define MSG_AUTO_HOME_Z _UxGT("Ir na origem Z") +#define MSG_AUTO_HOME _UxGT("Ir na origem XYZ") #define MSG_LEVEL_BED_HOMING _UxGT("Indo para origem") -#define MSG_LEVEL_BED_WAITING _UxGT("Click to Begin") -#define MSG_LEVEL_BED_DONE _UxGT("Leveling Done!") -#define MSG_SET_HOME_OFFSETS _UxGT("Ajustar Jogo") -#define MSG_HOME_OFFSETS_APPLIED _UxGT("Offsets applied") -#define MSG_SET_ORIGIN _UxGT("Ajustar orig.") +#define MSG_LEVEL_BED_WAITING _UxGT("Clique para Iniciar") +#define MSG_LEVEL_BED_NEXT_POINT _UxGT("Próximo Ponto") +#define MSG_LEVEL_BED_DONE _UxGT("Fim nivelação!") +#define MSG_Z_FADE_HEIGHT _UxGT("Suavizar altura") +#define MSG_SET_HOME_OFFSETS _UxGT("Compensar origem") +#define MSG_HOME_OFFSETS_APPLIED _UxGT("Alteração feita") +#define MSG_SET_ORIGIN _UxGT("Ajustar Origem") #define MSG_PREHEAT_1 _UxGT("Pre-aquecer PLA") -#define MSG_PREHEAT_1_N _UxGT("Pre-aquecer PLA") +#define MSG_PREHEAT_1_N MSG_PREHEAT_1 _UxGT(" ") #define MSG_PREHEAT_1_ALL _UxGT("Pre-aq.Todo PLA") -#define MSG_PREHEAT_1_BEDONLY _UxGT("Pre-aq. PLA ") LCD_STR_THERMOMETER _UxGT("Base") +#define MSG_PREHEAT_1_END _UxGT("Pre-aq.Extrusora") +#define MSG_PREHEAT_1_BEDONLY _UxGT("Pre-aq.Mesa PLA") #define MSG_PREHEAT_1_SETTINGS _UxGT("Ajustar PLA") #define MSG_PREHEAT_2 _UxGT("Pre-aquecer ABS") #define MSG_PREHEAT_2_N _UxGT("Pre-aquecer ABS") #define MSG_PREHEAT_2_ALL _UxGT("Pre-aq.Todo ABS") -#define MSG_PREHEAT_2_BEDONLY _UxGT("Pre-aq. ABS ") LCD_STR_THERMOMETER _UxGT("Base") +#define MSG_PREHEAT_2_BEDONLY _UxGT("Pre-aq.Mesa ABS") +#define MSG_PREHEAT_2_END _UxGT("Pre-aq.Extrusora") #define MSG_PREHEAT_2_SETTINGS _UxGT("Ajustar ABS") #define MSG_COOLDOWN _UxGT("Esfriar") #define MSG_SWITCH_PS_ON _UxGT("Ligar") #define MSG_SWITCH_PS_OFF _UxGT("Desligar") -#define MSG_EXTRUDE _UxGT("Extrudar") +#define MSG_EXTRUDE _UxGT("Extrusar") #define MSG_RETRACT _UxGT("Retrair") #define MSG_MOVE_AXIS _UxGT("Mover eixo") +#define MSG_BED_LEVELING _UxGT("Nivelação Mesa") +#define MSG_LEVEL_BED _UxGT("Nivelar Mesa") +#define MSG_LEVEL_CORNERS _UxGT("Nivelar Cantos") +#define MSG_NEXT_CORNER _UxGT("Próximo Canto") +#define MSG_EDITING_STOPPED _UxGT("Fim da Edição") + +#define MSG_USER_MENU _UxGT("Comando customizado") +#define MSG_UBL_DOING_G29 _UxGT("Executando G29") +#define MSG_UBL_UNHOMED _UxGT("Fora da Origam") +#define MSG_UBL_TOOLS _UxGT("Ferramentas UBL") +#define MSG_UBL_LEVEL_BED _UxGT("Unified Bed Leveling") +#define MSG_UBL_MANUAL_MESH _UxGT("Fazer malha manual") +#define MSG_UBL_BC_INSERT _UxGT("Calçar e calibrar") +#define MSG_UBL_BC_INSERT2 _UxGT("Medir") +#define MSG_UBL_BC_REMOVE _UxGT("Remover e calibrar") + +#define MSG_UBL_MOVING_TO_NEXT _UxGT("Indo para o Próximo") +#define MSG_UBL_ACTIVATE_MESH _UxGT("Ativar UBL") +#define MSG_UBL_DEACTIVATE_MESH _UxGT("Desativar UBL") +#define MSG_UBL_SET_BED_TEMP _UxGT("Temp. Mesa") +#define MSG_UBL_CUSTOM_BED_TEMP MSG_UBL_SET_BED_TEMP +#define MSG_UBL_SET_HOTEND_TEMP _UxGT("Temp. Extrusora") +#define MSG_UBL_CUSTOM_HOTEND_TEMP MSG_UBL_SET_HOTEND_TEMP +#define MSG_UBL_MESH_EDIT _UxGT("Editar Malha") +#define MSG_UBL_EDIT_CUSTOM_MESH _UxGT("Editar Malha Custom") +#define MSG_UBL_FINE_TUNE_MESH _UxGT("Ajuste Fino da Malha") +#define MSG_UBL_DONE_EDITING_MESH _UxGT("Fim da Edição") +#define MSG_UBL_BUILD_CUSTOM_MESH _UxGT("Montar Customi") +#define MSG_UBL_BUILD_MESH_MENU _UxGT("Montar ") +#define MSG_UBL_BUILD_PLA_MESH _UxGT("Montar PLA") +#define MSG_UBL_BUILD_ABS_MESH _UxGT("Montar ABS") +#define MSG_UBL_BUILD_COLD_MESH _UxGT("Montar fria") +#define MSG_UBL_MESH_HEIGHT_ADJUST _UxGT("Ajustar Altura") +#define MSG_UBL_MESH_HEIGHT_AMOUNT _UxGT("Tamanho da Elevação") +#define MSG_UBL_VALIDATE_MESH_MENU _UxGT("Validar Malha") +#define MSG_UBL_VALIDATE_PLA_MESH _UxGT("Checar PLA") +#define MSG_UBL_VALIDATE_ABS_MESH _UxGT("Checar ABS") +#define MSG_UBL_VALIDATE_CUSTOM_MESH _UxGT("Validar Malha Custom") +#define MSG_UBL_CONTINUE_MESH _UxGT("Continuar Malha") +#define MSG_UBL_MESH_LEVELING _UxGT("Nivelação da Malha") +#define MSG_UBL_3POINT_MESH_LEVELING _UxGT("Nivelação 3 pontos") +#define MSG_UBL_GRID_MESH_LEVELING _UxGT("Nivelação Grid") +#define MSG_UBL_MESH_LEVEL _UxGT("Nivelar Malha") +#define MSG_UBL_SIDE_POINTS _UxGT("Cantos") +#define MSG_UBL_MAP_TYPE _UxGT("Tipo de Mapa") +#define MSG_UBL_OUTPUT_MAP _UxGT("Salvar Mapa da Malha") +#define MSG_UBL_OUTPUT_MAP_HOST _UxGT("Enviar Para Host") +#define MSG_UBL_OUTPUT_MAP_CSV _UxGT("Salvar Malha CSV") +#define MSG_UBL_OUTPUT_MAP_BACKUP _UxGT("Salvar Backup") +#define MSG_UBL_INFO_UBL _UxGT("Informação do UBL") +#define MSG_UBL_EDIT_MESH_MENU _UxGT("Editar Malha") +#define MSG_UBL_FILLIN_AMOUNT _UxGT("Qtd de Enchimento") +#define MSG_UBL_MANUAL_FILLIN _UxGT("Enchimento Manual") +#define MSG_UBL_SMART_FILLIN _UxGT("Enchimento Smart") +#define MSG_UBL_FILLIN_MESH _UxGT("Preencher malha") +#define MSG_UBL_INVALIDATE_ALL _UxGT("Invalidar tudo") +#define MSG_UBL_INVALIDATE_CLOSEST _UxGT("Invalidar próximo") +#define MSG_UBL_FINE_TUNE_ALL _UxGT("Ajuste Fino de Todos") +#define MSG_UBL_FINE_TUNE_CLOSEST _UxGT("Ajuar Mais Próximo") +#define MSG_UBL_STORAGE_MESH_MENU _UxGT("Armazenamento Malha") +#define MSG_UBL_STORAGE_SLOT _UxGT("Slot de Memória") +#define MSG_UBL_LOAD_MESH _UxGT("Ler Malha") +#define MSG_UBL_SAVE_MESH _UxGT("Salvar Malha") +#define MSG_MESH_LOADED _UxGT("Malha %i carregada") +#define MSG_MESH_SAVED _UxGT("Malha %i salva") +#define MSG_NO_STORAGE _UxGT("Sem armazenamento") +#define MSG_UBL_SAVE_ERROR _UxGT("Erro ao salvar UBL") +#define MSG_UBL_RESTORE_ERROR _UxGT("Erro no restauro UBL") +#define MSG_UBL_Z_OFFSET_STOPPED _UxGT("Compensação Z parou") +#define MSG_UBL_STEP_BY_STEP_MENU _UxGT("UBL passo a passo") +#define MSG_LED_CONTROL _UxGT("Controle do LED") +#define MSG_LEDS_ON _UxGT("Luz Acesa") +#define MSG_LEDS_OFF _UxGT("Luz Apagada") +#define MSG_LED_PRESETS _UxGT("Configuração da Luz") +#define MSG_SET_LEDS_RED _UxGT("Luz Vermelha") +#define MSG_SET_LEDS_ORANGE _UxGT("Luz Laranja") +#define MSG_SET_LEDS_YELLOW _UxGT("Luz Amarela") +#define MSG_SET_LEDS_GREEN _UxGT("Luz Verde") +#define MSG_SET_LEDS_BLUE _UxGT("Luz Azul") +#define MSG_SET_LEDS_INDIGO _UxGT("Luz Indigo") +#define MSG_SET_LEDS_VIOLET _UxGT("Luz Violeta") +#define MSG_SET_LEDS_WHITE _UxGT("Luz Branca") +#define MSG_SET_LEDS_DEFAULT _UxGT("Luz Padrão") +#define MSG_CUSTOM_LEDS _UxGT("Luz Customizada") +#define MSG_INTENSITY_R _UxGT("Intensidade Vermelho") +#define MSG_INTENSITY_G _UxGT("Intensidade Verde") +#define MSG_INTENSITY_B _UxGT("Intensidade Azul") +#define MSG_INTENSITY_W _UxGT("Intensidade Branco") +#define MSG_LED_BRIGHTNESS _UxGT("Brilho") + +#define MSG_MOVING _UxGT("Movendo...") +#define MSG_FREE_XY _UxGT("Liberar XY") #define MSG_MOVE_X _UxGT("Mover X") #define MSG_MOVE_Y _UxGT("Mover Y") #define MSG_MOVE_Z _UxGT("Mover Z") @@ -73,14 +177,14 @@ #define MSG_MOVE_10MM _UxGT("Mover 10mm") #define MSG_SPEED _UxGT("Velocidade") #define MSG_BED_Z _UxGT("Base Z") -#define MSG_NOZZLE LCD_STR_THERMOMETER _UxGT(" Bocal") -#define MSG_BED LCD_STR_THERMOMETER _UxGT(" Base") +#define MSG_NOZZLE _UxGT("Bocal") +#define MSG_BED _UxGT("Mesa") #define MSG_FAN_SPEED _UxGT("Vel. Ventoinha") -#define MSG_FLOW _UxGT("Fluxo") +#define MSG_FLOW _UxGT("Vazão") #define MSG_CONTROL _UxGT("Controle") #define MSG_MIN LCD_STR_THERMOMETER _UxGT(" Min") #define MSG_MAX LCD_STR_THERMOMETER _UxGT(" Max") -#define MSG_FACTOR LCD_STR_THERMOMETER _UxGT(" Fact") +#define MSG_FACTOR LCD_STR_THERMOMETER _UxGT(" Fator") #define MSG_AUTOTEMP _UxGT("Temp. Automática") #define MSG_ON _UxGT("Ligado ") #define MSG_OFF _UxGT("Desligado") @@ -88,9 +192,14 @@ #define MSG_PID_I _UxGT("PID-I") #define MSG_PID_D _UxGT("PID-D") #define MSG_PID_C _UxGT("PID-C") -#define MSG_ACC _UxGT("Acc") +#define MSG_SELECT _UxGT("Selecionar") +#define MSG_ACC _UxGT("Acel.") #define MSG_JERK _UxGT("Jogo") -#if IS_KINEMATIC +#if IS_SCARA + #define MSG_VA_JERK _UxGT("jogo VA") + #define MSG_VB_JERK _UxGT("jogo VB") + #define MSG_VC_JERK _UxGT("jogo VZ") +#elif IS_DELTA #define MSG_VA_JERK _UxGT("jogo VA") #define MSG_VB_JERK _UxGT("jogo VB") #define MSG_VC_JERK _UxGT("jogo VC") @@ -100,21 +209,26 @@ #define MSG_VC_JERK _UxGT("jogo VZ") #endif #define MSG_VE_JERK _UxGT("jogo VE") -#define MSG_VMAX _UxGT(" Vmax ") +#define MSG_VELOCITY _UxGT("Velocidade") +#define MSG_VMAX _UxGT("Vmax ") #define MSG_VMIN _UxGT("Vmin") -#define MSG_VTRAV_MIN _UxGT("VTrav min") +#define MSG_VTRAV_MIN _UxGT("VDeslocamento min") #define MSG_AMAX _UxGT("Amax ") #define MSG_A_RETRACT _UxGT("Retrair A") -#define MSG_A_TRAVEL _UxGT("A-movimento") +#define MSG_A_TRAVEL _UxGT("Movimento A") #define MSG_STEPS_PER_MM _UxGT("Passo/mm") -#if IS_KINEMATIC - #define MSG_ASTEPS _UxGT("A/mm") - #define MSG_BSTEPS _UxGT("B/mm") - #define MSG_CSTEPS _UxGT("C/mm") +#if IS_SCARA + #define MSG_ASTEPS _UxGT("Passo A/deg") + #define MSG_BSTEPS _UxGT("Passo B/deg") + #define MSG_CSTEPS _UxGT("Passo Z/mm") +#elif IS_DELTA + #define MSG_ASTEPS _UxGT("Passo A/mm") + #define MSG_BSTEPS _UxGT("Passo B/mm") + #define MSG_CSTEPS _UxGT("Passo C/mm") #else - #define MSG_ASTEPS _UxGT("X/mm") - #define MSG_BSTEPS _UxGT("Y/mm") - #define MSG_CSTEPS _UxGT("Z/mm") + #define MSG_ASTEPS _UxGT("Passo X/mm") + #define MSG_BSTEPS _UxGT("Passo Y/mm") + #define MSG_CSTEPS _UxGT("Passo Z/mm") #endif #define MSG_ESTEPS _UxGT("E/mm") #define MSG_E1STEPS _UxGT("E1/mm") @@ -125,62 +239,146 @@ #define MSG_TEMPERATURE _UxGT("Temperatura") #define MSG_MOTION _UxGT("Movimento") #define MSG_FILAMENT _UxGT("Filamento") -#define MSG_VOLUMETRIC_ENABLED _UxGT("Extr. em mm3") -#define MSG_FILAMENT_DIAM _UxGT("Diametro Fil.") +#define MSG_VOLUMETRIC_ENABLED _UxGT("Extrusão em mm3") +#define MSG_FILAMENT_DIAM _UxGT("Diâmetro Fil.") +#define MSG_ADVANCE_K _UxGT("Avançar K") #define MSG_CONTRAST _UxGT("Contraste") -#define MSG_STORE_EEPROM _UxGT("Salvar") -#define MSG_LOAD_EEPROM _UxGT("Ler") -#define MSG_RESTORE_FAILSAFE _UxGT("Rest. de emerg.") -#define MSG_REFRESH LCD_STR_REFRESH _UxGT(" Restaurar") -#define MSG_WATCH _UxGT("Monitorar") +#define MSG_STORE_EEPROM _UxGT("Salvar Configuração") +#define MSG_LOAD_EEPROM _UxGT("Ler Configuração") +#define MSG_RESTORE_FAILSAFE _UxGT("Restauro seguro") +#define MSG_INIT_EEPROM _UxGT("Iniciar EEPROM") +#define MSG_REFRESH LCD_STR_REFRESH _UxGT(" Atualização") +#define MSG_WATCH _UxGT("Informações") #define MSG_PREPARE _UxGT("Preparar") -#define MSG_TUNE _UxGT("Afinar") +#define MSG_TUNE _UxGT("Ajustar") #define MSG_PAUSE_PRINT _UxGT("Pausar impressão") #define MSG_RESUME_PRINT _UxGT("Resumir impressão") #define MSG_STOP_PRINT _UxGT("Parar impressão") #define MSG_CARD_MENU _UxGT("Imprimir do SD") #define MSG_NO_CARD _UxGT("Sem cartão SD") -#define MSG_DWELL _UxGT("Repouso...") -#define MSG_USERWAIT _UxGT("Esperando ordem") -#define MSG_RESUMING _UxGT("Resumindo Impres.") -#define MSG_PRINT_ABORTED _UxGT("Impres. Abortada.") +#define MSG_DWELL _UxGT("ZzZzZz...") +#define MSG_USERWAIT _UxGT("Clique para retomar") +#define MSG_PRINT_ABORTED _UxGT("Impressão Abortada") #define MSG_NO_MOVE _UxGT("Sem movimento") -#define MSG_KILLED _UxGT("PARADA DE EMERG.") -#define MSG_STOPPED _UxGT("PARADA. ") +#define MSG_KILLED _UxGT("PARADA DE EMERGÊNCIA") +#define MSG_STOPPED _UxGT("PAROU. ") #define MSG_CONTROL_RETRACT _UxGT("Retrair mm") #define MSG_CONTROL_RETRACT_SWAP _UxGT("Retrair Troca mm") -#define MSG_CONTROL_RETRACTF _UxGT("Retrair V") -#define MSG_CONTROL_RETRACT_ZLIFT _UxGT("Levantar mm") -#define MSG_CONTROL_RETRACT_RECOVER _UxGT("Des Retrair mm") -#define MSG_CONTROL_RETRACT_RECOVER_SWAP _UxGT("Des RetTroca mm") -#define MSG_CONTROL_RETRACT_RECOVERF _UxGT("Des Retrair V") -#define MSG_AUTORETRACT _UxGT("Retração Autom.") +#define MSG_CONTROL_RETRACTF _UxGT("Retrair V") +#define MSG_CONTROL_RETRACT_ZLIFT _UxGT("Saltar mm") +#define MSG_CONTROL_RETRACT_RECOVER _UxGT("Des-Retrair mm") +#define MSG_CONTROL_RETRACT_RECOVER_SWAP _UxGT("Des-RetTroca mm") +#define MSG_CONTROL_RETRACT_RECOVERF _UxGT("Des-Retrair V") +#define MSG_AUTORETRACT _UxGT("Retração Automática") #define MSG_FILAMENTCHANGE _UxGT("Trocar Filamento") #define MSG_INIT_SDCARD _UxGT("Iniciar SD") #define MSG_CNG_SDCARD _UxGT("Trocar SD") -#define MSG_ZPROBE_OUT _UxGT("Son. fora da mesa") -#define MSG_HOME _UxGT("Home") // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST -#define MSG_FIRST _UxGT("first") -#define MSG_ZPROBE_ZOFFSET _UxGT("Deslocamento no Z") +#define MSG_ZPROBE_OUT _UxGT("Sonda fora da mesa") +#define MSG_SKEW_FACTOR _UxGT("Fator de Cisalho") +#define MSG_BLTOUCH _UxGT("BLTouch") +#define MSG_BLTOUCH_SELFTEST _UxGT("Testar BLTouch") +#define MSG_BLTOUCH_RESET _UxGT("Reiniciar BLTouch") +#define MSG_BLTOUCH_DEPLOY _UxGT("Implantar BLTouch") +#define MSG_BLTOUCH_STOW _UxGT("Condicionar BLTouch") + +#define MSG_HOME _UxGT("Home") +#define MSG_FIRST _UxGT("Primeiro") +#define MSG_ZPROBE_ZOFFSET _UxGT("Compensar Sonda em Z") #define MSG_BABYSTEP_X _UxGT("Passinho X") #define MSG_BABYSTEP_Y _UxGT("Passinho Y") #define MSG_BABYSTEP_Z _UxGT("Passinho Z") #define MSG_ENDSTOP_ABORT _UxGT("Fim de Curso") #define MSG_HEATING_FAILED_LCD _UxGT("Aquecimento falhou") -#define MSG_ERR_REDUNDANT_TEMP _UxGT("Err: REDUNDANT TEMP") -#define MSG_THERMAL_RUNAWAY _UxGT("THERMAL RUNAWAY") -#define MSG_ERR_MAXTEMP _UxGT("Err: T Máxima") -#define MSG_ERR_MINTEMP _UxGT("Err: T Mínima") -#define MSG_ERR_MAXTEMP_BED _UxGT("Err: T Base Máxima") -#define MSG_ERR_MINTEMP_BED _UxGT("Err: T Base Mínima") +#define MSG_ERR_REDUNDANT_TEMP _UxGT("Erro:Temp Redundante") +#define MSG_THERMAL_RUNAWAY _UxGT("ESCAPE TÉRMICO") +#define MSG_ERR_MAXTEMP _UxGT("Erro:Temp Máxima") +#define MSG_ERR_MINTEMP _UxGT("Erro:Temp Mínima") +#define MSG_ERR_MAXTEMP_BED _UxGT("Erro:Temp Mesa Máx") +#define MSG_ERR_MINTEMP_BED _UxGT("Erro:Temp Mesa Mín") #define MSG_HEATING _UxGT("Aquecendo...") -#define MSG_HEATING_COMPLETE _UxGT("Aquecida.") -#define MSG_BED_HEATING _UxGT("Aquecendo base..") -#define MSG_BED_DONE _UxGT("Base aquecida.") +#define MSG_BED_HEATING _UxGT("Aquecendo base...") #define MSG_DELTA_CALIBRATE _UxGT("Calibrar Delta") #define MSG_DELTA_CALIBRATE_X _UxGT("Calibrar X") #define MSG_DELTA_CALIBRATE_Y _UxGT("Calibrar Y") #define MSG_DELTA_CALIBRATE_Z _UxGT("Calibrar Z") #define MSG_DELTA_CALIBRATE_CENTER _UxGT("Calibrar Centro") +#define MSG_DELTA_SETTINGS _UxGT("Configuração Delta") +#define MSG_DELTA_AUTO_CALIBRATE _UxGT("Auto-Calibração") +#define MSG_DELTA_HEIGHT_CALIBRATE _UxGT("Calibrar Altura") +#define MSG_DELTA_DIAG_ROD _UxGT("Haste Diagonal") +#define MSG_DELTA_HEIGHT _UxGT("Altura") +#define MSG_DELTA_RADIUS _UxGT("Raio") +#define MSG_INFO_MENU _UxGT("Sobre") +#define MSG_INFO_PRINTER_MENU _UxGT("Impressora") +#define MSG_3POINT_LEVELING _UxGT("Nivelamento 3 pontos") +#define MSG_LINEAR_LEVELING _UxGT("Nivelamento Linear") +#define MSG_BILINEAR_LEVELING _UxGT("Nivelamento Bilinear") +#define MSG_UBL_LEVELING _UxGT("Nivelamento UBL") +#define MSG_MESH_LEVELING _UxGT("Nivelamento da Malha") +#define MSG_INFO_STATS_MENU _UxGT("Estatísticas") +#define MSG_INFO_BOARD_MENU _UxGT("Info. da Placa") +#define MSG_INFO_THERMISTOR_MENU _UxGT("Thermistors") +#define MSG_INFO_EXTRUDERS _UxGT("Extrusoras") +#define MSG_INFO_BAUDRATE _UxGT("Frequência Baud") +#define MSG_INFO_PROTOCOL _UxGT("Protocolo") +#define MSG_CASE_LIGHT _UxGT("Luz da Estrutura") +#define MSG_CASE_LIGHT_BRIGHTNESS _UxGT("Intensidade Brilho") +#define MSG_INFO_PRINT_COUNT _UxGT("Qtd Impressões") +#define MSG_INFO_COMPLETED_PRINTS _UxGT("Completas") +#define MSG_INFO_PRINT_TIME _UxGT("Tempo de Imprimindo") +#define MSG_INFO_PRINT_LONGEST _UxGT("Impressão Mais Longa") +#define MSG_INFO_PRINT_FILAMENT _UxGT("Depositado") +#define MSG_INFO_MIN_TEMP _UxGT("Temp Min") +#define MSG_INFO_MAX_TEMP _UxGT("Temp Max") +#define MSG_INFO_PSU _UxGT("PSU") +#define MSG_DRIVE_STRENGTH _UxGT("Força do Motor") +#define MSG_DAC_PERCENT _UxGT("Driver %") +#define MSG_DAC_EEPROM_WRITE _UxGT("Escrever Eeprom DAC") + +#define MSG_FILAMENT_CHANGE_HEADER _UxGT("Troca de Filamento") +#define MSG_FILAMENT_CHANGE_OPTION_HEADER _UxGT("Config. de Retomada") +#define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE _UxGT("Extrusar Mais") +#define MSG_FILAMENT_CHANGE_OPTION_RESUME _UxGT("Continuar Impressão") +#define MSG_FILAMENT_CHANGE_MINTEMP _UxGT("Temp. Mínima é ") +#define MSG_FILAMENT_CHANGE_NOZZLE _UxGT(" Bocal: ") +#define MSG_ERR_HOMING_FAILED _UxGT("Falha ao ir à origem") +#define MSG_ERR_PROBING_FAILED _UxGT("Falha ao sondar") + +#if LCD_HEIGHT >= 4 + #define MSG_FILAMENT_CHANGE_INIT_1 _UxGT("Esperando o") + #define MSG_FILAMENT_CHANGE_INIT_2 _UxGT("inicio da") + #define MSG_FILAMENT_CHANGE_INIT_3 _UxGT("troca de Filamento") + + #define MSG_FILAMENT_CHANGE_UNLOAD_1 _UxGT("Esperando") + #define MSG_FILAMENT_CHANGE_UNLOAD_2 _UxGT("remoção de filamento") + + #define MSG_FILAMENT_CHANGE_INSERT_1 _UxGT("Coloque Filamento") + #define MSG_FILAMENT_CHANGE_INSERT_2 _UxGT("pressione o botão") + #define MSG_FILAMENT_CHANGE_INSERT_3 _UxGT("para continuar...") + + #define MSG_FILAMENT_CHANGE_HEAT_1 _UxGT("Pressione o botão") + #define MSG_FILAMENT_CHANGE_HEAT_2 _UxGT("p/ Aquecer o Bocal") + + #define MSG_FILAMENT_CHANGE_HEATING_1 _UxGT("Aquecendo o Bocal") + #define MSG_FILAMENT_CHANGE_HEATING_2 _UxGT("Aguarde...") + + #define MSG_FILAMENT_CHANGE_LOAD_1 _UxGT("Esperando") + #define MSG_FILAMENT_CHANGE_LOAD_2 _UxGT("filamento") + + #define MSG_FILAMENT_CHANGE_EXTRUDE_1 _UxGT("Esperando extrusão") + #define MSG_FILAMENT_CHANGE_EXTRUDE_2 _UxGT("de filamento") + + #define MSG_FILAMENT_CHANGE_RESUME_1 _UxGT("Esperando impressão") + #define MSG_FILAMENT_CHANGE_RESUME_2 _UxGT("continuar") +#else LCD_HEIGHT < 4 + #define MSG_FILAMENT_CHANGE_INIT_1 _UxGT("Aguarde...") + #define MSG_FILAMENT_CHANGE_UNLOAD_1 _UxGT("Ejetando...") + #define MSG_FILAMENT_CHANGE_INSERT_1 _UxGT("Insira e Clique") + #define MSG_FILAMENT_CHANGE_HEATING_1 _UxGT("Aquecendo...") + #define MSG_FILAMENT_CHANGE_LOAD_1 _UxGT("Carregando...") + #define MSG_FILAMENT_CHANGE_EXTRUDE_1 _UxGT("Extrusando...") + #define MSG_FILAMENT_CHANGE_RESUME_1 _UxGT("Continuando...") +#endif + #endif // LANGUAGE_PT_BR_UTF_H diff --git a/Marlin/language_pt.h b/Marlin/language_pt.h index b14a290d14..c314cc80da 100644 --- a/Marlin/language_pt.h +++ b/Marlin/language_pt.h @@ -144,7 +144,6 @@ #define MSG_NO_CARD "Sem cartao SD" #define MSG_DWELL "Em espera..." #define MSG_USERWAIT "A espera de ordem" -#define MSG_RESUMING "Retomando impressao" #define MSG_PRINT_ABORTED "Impressao cancelada" #define MSG_NO_MOVE "Sem movimento" #define MSG_KILLED "EMERGENCIA. " @@ -176,9 +175,7 @@ #define MSG_ERR_MAXTEMP_BED "Err: T Base Maxima" #define MSG_ERR_MINTEMP_BED "Err: T Base Minima" #define MSG_HEATING "Aquecendo..." -#define MSG_HEATING_COMPLETE "Aquecida." #define MSG_BED_HEATING "Aquecendo base.." -#define MSG_BED_DONE "Base aquecida." #define MSG_DELTA_CALIBRATE "Calibracao Delta" #define MSG_DELTA_CALIBRATE_X "Calibrar X" #define MSG_DELTA_CALIBRATE_Y "Calibrar Y" diff --git a/Marlin/language_pt_utf8.h b/Marlin/language_pt_utf8.h index 5933bcba77..df402884fa 100644 --- a/Marlin/language_pt_utf8.h +++ b/Marlin/language_pt_utf8.h @@ -146,7 +146,6 @@ #define MSG_NO_CARD _UxGT("Sem cartão SD") #define MSG_DWELL _UxGT("Em espera...") #define MSG_USERWAIT _UxGT("Á espera de ordem") -#define MSG_RESUMING _UxGT("Retomando impressão") #define MSG_PRINT_ABORTED _UxGT("Impressão cancelada") #define MSG_NO_MOVE _UxGT("Sem movimento") #define MSG_KILLED _UxGT("EMERGÊNCIA. ") @@ -178,9 +177,7 @@ #define MSG_ERR_MAXTEMP_BED _UxGT("Err: T Base Máxima") #define MSG_ERR_MINTEMP_BED _UxGT("Err: T Base Mínima") #define MSG_HEATING _UxGT("Aquecendo...") -#define MSG_HEATING_COMPLETE _UxGT("Aquecida.") -#define MSG_BED_HEATING _UxGT("Aquecendo base..") -#define MSG_BED_DONE _UxGT("Base aquecida.") +#define MSG_BED_HEATING _UxGT("Aquecendo base...") #define MSG_DELTA_CALIBRATE _UxGT("Calibração Delta") #define MSG_DELTA_CALIBRATE_X _UxGT("Calibrar X") #define MSG_DELTA_CALIBRATE_Y _UxGT("Calibrar Y") diff --git a/Marlin/language_ru.h b/Marlin/language_ru.h index 092d4a0e59..b7235ebb1d 100644 --- a/Marlin/language_ru.h +++ b/Marlin/language_ru.h @@ -39,6 +39,7 @@ #define MSG_SD_INSERTED _UxGT("Карта вставлена") #define MSG_SD_REMOVED _UxGT("Карта извлечена") #define MSG_LCD_ENDSTOPS _UxGT("Эндстопы") // Max length 8 characters +#define MSG_LCD_SOFT_ENDSTOPS _UxGT("Прогр. эндстопы") #define MSG_MAIN _UxGT("Меню") #define MSG_AUTOSTART _UxGT("Автостарт") #define MSG_DISABLE_STEPPERS _UxGT("Выкл. двигатели") @@ -252,7 +253,7 @@ #define MSG_DWELL _UxGT("Сон...") #define MSG_USERWAIT _UxGT("Продолжить...") #define MSG_PRINT_PAUSED _UxGT("Печать на паузе") -#define MSG_RESUMING _UxGT("Возобновление...") +#define MSG_PRINTING _UxGT("Печать...") #define MSG_PRINT_ABORTED _UxGT("Печать отменена") #define MSG_NO_MOVE _UxGT("Нет движения.") #define MSG_KILLED _UxGT("УБИТО. ") @@ -287,6 +288,7 @@ #define MSG_BABYSTEP_Z _UxGT("Микрошаг Z") #define MSG_ENDSTOP_ABORT _UxGT("Сработал концевик") #define MSG_HEATING_FAILED_LCD _UxGT("Разогрев не удался") +#define MSG_HEATING_FAILED_LCD_BED _UxGT("Разогр. стола не уд.") #define MSG_ERR_REDUNDANT_TEMP _UxGT("Ошибка: Избыточная Т") #define MSG_THERMAL_RUNAWAY _UxGT("УБЕГАНИЕ ТЕПЛА") #define MSG_THERMAL_RUNAWAY_BED _UxGT("УБЕГАНИЕ ТЕПЛА СТОЛА") @@ -294,16 +296,16 @@ #define MSG_ERR_MINTEMP _UxGT("Ошибка: Т мин.") #define MSG_ERR_MAXTEMP_BED _UxGT("Ошибка: Т стола макс") #define MSG_ERR_MINTEMP_BED _UxGT("Ошибка: Т стола мин.") -#define MSG_ERR_Z_HOMING _UxGT("G28 Z Запрещено") +#define MSG_ERR_Z_HOMING MSG_HOME _UxGT(" ") MSG_X MSG_Y _UxGT(" ") MSG_FIRST #define MSG_HALTED _UxGT("ПРИНТЕР ОСТАНОВЛЕН") #define MSG_PLEASE_RESET _UxGT("Сделайте сброс") #define MSG_SHORT_DAY _UxGT("д") // One character only #define MSG_SHORT_HOUR _UxGT("ч") // One character only #define MSG_SHORT_MINUTE _UxGT("м") // One character only #define MSG_HEATING _UxGT("Нагрев...") -#define MSG_HEATING_COMPLETE _UxGT("Нагрев выполнен") -#define MSG_BED_HEATING _UxGT("Нагрев стола") -#define MSG_BED_DONE _UxGT("Стол разогрет") +#define MSG_COOLING _UxGT("Охлаждение...") +#define MSG_BED_HEATING _UxGT("Нагрев стола...") +#define MSG_BED_COOLING _UxGT("Охлаждение стола...") #define MSG_DELTA_CALIBRATE _UxGT("Калибровка Delta") #define MSG_DELTA_CALIBRATE_X _UxGT("Калибровать X") #define MSG_DELTA_CALIBRATE_Y _UxGT("Калибровать Y") @@ -312,6 +314,7 @@ #define MSG_DELTA_SETTINGS _UxGT("Настройки Delta") #define MSG_DELTA_AUTO_CALIBRATE _UxGT("Авто калибровка") #define MSG_DELTA_HEIGHT_CALIBRATE _UxGT("Задать высоту Delta") +#define MSG_DELTA_Z_OFFSET_CALIBRATE _UxGT("Задать Z-смещение") #define MSG_DELTA_DIAG_ROD _UxGT("Диаг. стержень") #define MSG_DELTA_HEIGHT _UxGT("Высота") #define MSG_DELTA_RADIUS _UxGT("Радиус") diff --git a/Marlin/language_sk_utf8.h b/Marlin/language_sk_utf8.h index 40f64a893f..a7ce610c56 100644 --- a/Marlin/language_sk_utf8.h +++ b/Marlin/language_sk_utf8.h @@ -257,7 +257,6 @@ #define MSG_DWELL _UxGT("Spím...") #define MSG_USERWAIT _UxGT("Čakám...") #define MSG_PRINT_PAUSED _UxGT("Tlač pozastavená") -#define MSG_RESUMING _UxGT("Obnovovanie tlače") #define MSG_PRINT_ABORTED _UxGT("Tlač zrušená") #define MSG_NO_MOVE _UxGT("Žiadny pohyb.") #define MSG_KILLED _UxGT("PRERUŠENÉ. ") @@ -293,6 +292,7 @@ #define MSG_BABYSTEP_Z _UxGT("Babystep Z") #define MSG_ENDSTOP_ABORT _UxGT("Endstop zastavil") #define MSG_HEATING_FAILED_LCD _UxGT("Chyba ohrevu") +#define MSG_HEATING_FAILED_LCD_BED _UxGT("Chyba ohrevu podl.") #define MSG_ERR_REDUNDANT_TEMP _UxGT("REDUND. TEPLOTA") #define MSG_THERMAL_RUNAWAY _UxGT("TEPLOTNÝ SKOK") #define MSG_THERMAL_RUNAWAY_BED _UxGT("TEPLOTNÝ SKOK PODL.") @@ -300,16 +300,16 @@ #define MSG_ERR_MINTEMP _UxGT("NÍZKA TEPLOTA") #define MSG_ERR_MAXTEMP_BED _UxGT("VYS. TEPL. PODL.") #define MSG_ERR_MINTEMP_BED _UxGT("NÍZ. TEPL. PODL.") -#define MSG_ERR_Z_HOMING _UxGT("G28 Z ZAKÁZANÉ") +#define MSG_ERR_Z_HOMING MSG_HOME _UxGT(" ") MSG_X MSG_Y _UxGT(" ") MSG_FIRST #define MSG_HALTED _UxGT("TLAČ. ZASTAVENÁ") #define MSG_PLEASE_RESET _UxGT("Spravte reset") #define MSG_SHORT_DAY _UxGT("d") #define MSG_SHORT_HOUR _UxGT("h") #define MSG_SHORT_MINUTE _UxGT("m") #define MSG_HEATING _UxGT("Ohrev...") -#define MSG_HEATING_COMPLETE _UxGT("Ohrev prebehol.") -#define MSG_BED_HEATING _UxGT("Ohrev podl.") -#define MSG_BED_DONE _UxGT("Podložka hotová.") +#define MSG_COOLING _UxGT("Ochladzovanie...") +#define MSG_BED_HEATING _UxGT("Ohrev podl...") +#define MSG_BED_COOLING _UxGT("Ochladzovanie podl...") #define MSG_DELTA_CALIBRATE _UxGT("Delta Kalibrácia") #define MSG_DELTA_CALIBRATE_X _UxGT("Kalibrovať X") #define MSG_DELTA_CALIBRATE_Y _UxGT("Kalibrovať Y") diff --git a/Marlin/language_tr.h b/Marlin/language_tr.h index fc7432005b..9df9f32396 100644 --- a/Marlin/language_tr.h +++ b/Marlin/language_tr.h @@ -161,7 +161,6 @@ #define MSG_NO_CARD _UxGT("SD Kart Yok") // SD Kart Yok #define MSG_DWELL _UxGT("Uyku...") // Uyku... #define MSG_USERWAIT _UxGT("Operatör bekleniyor...") // Operatör bekleniyor... -#define MSG_RESUMING _UxGT("Baskı Sürdürülüyor") // Baskı Sürdürülüyor #define MSG_PRINT_ABORTED _UxGT("Baskı Durduruldu") // Baskı Durduruldu #define MSG_NO_MOVE _UxGT("İşlem yok.") // İşlem yok. #define MSG_KILLED _UxGT("Kilitlendi. ") // Kilitlendi. @@ -194,16 +193,14 @@ #define MSG_ERR_MINTEMP _UxGT("Hata: MINSICAKLIK") // Hata: MINSICAKLIK #define MSG_ERR_MAXTEMP_BED _UxGT("Hata: MAXSIC. TABLA") // Hata: MAXSIC. TABLA #define MSG_ERR_MINTEMP_BED _UxGT("Hata: MINSIC. TABLA") // Hata: MINSIC. TABLA -#define MSG_ERR_Z_HOMING _UxGT("G28 Z Yapılamaz") // G28 Z Yapılamaz +#define MSG_ERR_Z_HOMING MSG_HOME _UxGT(" ") MSG_X MSG_Y _UxGT(" ") MSG_FIRST #define MSG_HALTED _UxGT("YAZICI DURDURULDU") // YAZICI DURDURULDU #define MSG_PLEASE_RESET _UxGT("Lütfen resetleyin") // Lütfen resetleyin #define MSG_SHORT_DAY _UxGT("G") // One character only // G #define MSG_SHORT_HOUR _UxGT("S") // One character only // S #define MSG_SHORT_MINUTE _UxGT("D") // One character only // D #define MSG_HEATING _UxGT("Isınıyor...") // Isınıyor... -#define MSG_HEATING_COMPLETE _UxGT("Isınma tamam.") // Isınma tamam. -#define MSG_BED_HEATING _UxGT("Tabla Isınıyor.") // Tabla Isınıyor. -#define MSG_BED_DONE _UxGT("Tabla hazır.") // Tabla hazır. +#define MSG_BED_HEATING _UxGT("Tabla Isınıyor...") // Tabla Isınıyor... #define MSG_DELTA_CALIBRATE _UxGT("Delta Kalibrasyonu") // Delta Kalibrasyonu #define MSG_DELTA_CALIBRATE_X _UxGT("Ayarla X") // Ayarla X #define MSG_DELTA_CALIBRATE_Y _UxGT("Ayarla Y") // Ayarla Y diff --git a/Marlin/language_uk.h b/Marlin/language_uk.h index 6ae0acfb0d..3e3227d867 100644 --- a/Marlin/language_uk.h +++ b/Marlin/language_uk.h @@ -149,7 +149,6 @@ #define MSG_NO_CARD _UxGT("Відсутня SD карт.") #define MSG_DWELL _UxGT("Сплячка...") #define MSG_USERWAIT _UxGT("Очікування дій...") -#define MSG_RESUMING _UxGT("Відновлення друку") #define MSG_PRINT_ABORTED _UxGT("Друк скасовано") #define MSG_NO_MOVE _UxGT("Немає руху.") #define MSG_KILLED _UxGT("ПЕРЕРВАНО. ") @@ -169,16 +168,14 @@ #define MSG_ENDSTOP_ABORT _UxGT("невдача кінцевика") #define MSG_HEATING_FAILED_LCD _UxGT("Невдалий нагрів") #define MSG_THERMAL_RUNAWAY _UxGT("ЗБІЙ ТЕМПЕРАТУРИ") -#define MSG_ERR_Z_HOMING _UxGT("G28 Z Відмовлено") +#define MSG_ERR_Z_HOMING MSG_HOME _UxGT(" ") MSG_X MSG_Y _UxGT(" ") MSG_FIRST #define MSG_HALTED _UxGT("ПРИНТЕР ЗУПИНЕНО") #define MSG_PLEASE_RESET _UxGT("Перезавантажте") #define MSG_SHORT_DAY _UxGT("д") // One character only #define MSG_SHORT_HOUR _UxGT("г") // One character only #define MSG_SHORT_MINUTE _UxGT("х") // One character only #define MSG_HEATING _UxGT("Нагрівання...") -#define MSG_HEATING_COMPLETE _UxGT("Нагріто.") -#define MSG_BED_HEATING _UxGT("Нагрівання столу.") -#define MSG_BED_DONE _UxGT("Стіл нагрітий.") +#define MSG_BED_HEATING _UxGT("Нагрівання столу...") #define MSG_DELTA_CALIBRATE _UxGT("Калібр. Delta") #define MSG_DELTA_CALIBRATE_X _UxGT("Калібрування X") #define MSG_DELTA_CALIBRATE_Y _UxGT("Калібрування Y") diff --git a/Marlin/language_zh_CN.h b/Marlin/language_zh_CN.h index 2d52c9426d..c62bbc77b2 100644 --- a/Marlin/language_zh_CN.h +++ b/Marlin/language_zh_CN.h @@ -33,12 +33,15 @@ #define CHARSIZE 3 #define WELCOME_MSG MACHINE_NAME _UxGT("已就绪.") //" ready." +#define MSG_BACK _UxGT("返回") // ”Back“ #define MSG_SD_INSERTED _UxGT("存储卡已插入") //"Card inserted" #define MSG_SD_REMOVED _UxGT("存储卡被拔出") //"Card removed" #define MSG_LCD_ENDSTOPS _UxGT("挡块") //"Endstops" // Max length 8 characters #define MSG_MAIN _UxGT("主菜单") //"Main" #define MSG_AUTOSTART _UxGT("自动开始") //"Autostart" #define MSG_DISABLE_STEPPERS _UxGT("关闭步进电机") //"Disable steppers" +#define MSG_DEBUG_MENU _UxGT("调试菜单") // "Debug Menu" +#define MSG_PROGRESS_BAR_TEST _UxGT("进度条测试") // "Progress Bar Test" #define MSG_AUTO_HOME _UxGT("回原点") //"Auto home" #define MSG_AUTO_HOME_X _UxGT("回X原位") //"Home X" #define MSG_AUTO_HOME_Y _UxGT("回Y原位") //"Home Y" @@ -47,6 +50,7 @@ #define MSG_LEVEL_BED_WAITING _UxGT("单击开始热床调平") //"Click to Begin" #define MSG_LEVEL_BED_NEXT_POINT _UxGT("下个热床调平点") //"Next Point" #define MSG_LEVEL_BED_DONE _UxGT("完成热床调平") //"Leveling Done!" +#define MSG_Z_FADE_HEIGHT _UxGT("淡出高度") // "Fade Height" #define MSG_SET_HOME_OFFSETS _UxGT("设置原点偏移") //"Set home offsets" #define MSG_HOME_OFFSETS_APPLIED _UxGT("偏移已启用") //"Offsets applied" #define MSG_SET_ORIGIN _UxGT("设置原点") //"Set origin" @@ -68,6 +72,96 @@ #define MSG_MOVE_AXIS _UxGT("移动轴") //"Move axis" #define MSG_BED_LEVELING _UxGT("调平热床") //"Bed leveling" #define MSG_LEVEL_BED _UxGT("调平热床") //"Level bed" +#define MSG_LEVEL_CORNERS _UxGT("调平边角") // "Level corners" + +#define MSG_NEXT_CORNER _UxGT("下个边角") // "Next corner" +#define MSG_EDITING_STOPPED _UxGT("网格编辑已停止") // "Mesh Editing Stopped" + +#define MSG_USER_MENU _UxGT("定制命令") // "Custom Commands" +#define MSG_UBL_DOING_G29 _UxGT("执行G29") // "Doing G29" +#define MSG_UBL_UNHOMED _UxGT("先回XYZ原点") // "Home XYZ first" +#define MSG_UBL_TOOLS _UxGT("UBL工具") // "UBL Tools" +#define MSG_UBL_LEVEL_BED _UxGT("统一热床调平(UBL)") // "Unified Bed Leveling" +#define MSG_UBL_MANUAL_MESH _UxGT("手工创设网格") // "Manually Build Mesh" + +#define MSG_UBL_BC_INSERT _UxGT("放置垫片并测量") // "Place shim & measure" +#define MSG_UBL_BC_INSERT2 _UxGT("测量") // "Measure" +#define MSG_UBL_BC_REMOVE _UxGT("移除并测量热床") // "Remove & measure bed" +#define MSG_UBL_MOVING_TO_NEXT _UxGT("移动到下一个") // "Moving to next" +#define MSG_UBL_ACTIVATE_MESH _UxGT("激活UBL") // "Activate UBL" +#define MSG_UBL_DEACTIVATE_MESH _UxGT("关闭UBL") // "Deactivate UBL" +#define MSG_UBL_SET_BED_TEMP _UxGT("设置热床温度") // "Bed Temp" +#define MSG_UBL_SET_HOTEND_TEMP _UxGT("热端温度") // "Hotend Temp" +#define MSG_UBL_MESH_EDIT _UxGT("网格编辑") // "Mesh Edit" +#define MSG_UBL_EDIT_CUSTOM_MESH _UxGT("编辑客户网格") // "Edit Custom Mesh" +#define MSG_UBL_FINE_TUNE_MESH _UxGT("细调网格") // "Fine Tuning Mesh" +#define MSG_UBL_DONE_EDITING_MESH _UxGT("完成编辑网格") // "Done Editing Mesh" +#define MSG_UBL_BUILD_CUSTOM_MESH _UxGT("创设客户网格") // "Build Custom Mesh" +#define MSG_UBL_BUILD_MESH_MENU _UxGT("创设网格") // "Build Mesh" +#define MSG_UBL_BUILD_PLA_MESH _UxGT("创设PLA网格") // "Build PLA Mesh" +#define MSG_UBL_BUILD_ABS_MESH _UxGT("创设ABS网格") // "Build ABS Mesh" +#define MSG_UBL_BUILD_COLD_MESH _UxGT("创设冷网格") // "Build Cold Mesh" +#define MSG_UBL_MESH_HEIGHT_ADJUST _UxGT("调整网格高度") // "Adjust Mesh Height" +#define MSG_UBL_MESH_HEIGHT_AMOUNT _UxGT("高度合计") // "Height Amount" +#define MSG_UBL_VALIDATE_MESH_MENU _UxGT("批准网格") // "Validate Mesh" +#define MSG_UBL_VALIDATE_PLA_MESH _UxGT("批准PLA网格") // "Validate PLA Mesh" +#define MSG_UBL_VALIDATE_ABS_MESH _UxGT("批准ABS网格") // "Validate ABS Mesh" +#define MSG_UBL_VALIDATE_CUSTOM_MESH _UxGT("批准客户网格") // "Validate Custom Mesh" +#define MSG_UBL_CONTINUE_MESH _UxGT("继续热床网格") // "Continue Bed Mesh" +#define MSG_UBL_MESH_LEVELING _UxGT("网格调平") // "Mesh Leveling" +#define MSG_UBL_3POINT_MESH_LEVELING _UxGT("三点调平") // "3-Point Leveling" +#define MSG_UBL_GRID_MESH_LEVELING _UxGT("格子网格调平") // "Grid Mesh Leveling" +#define MSG_UBL_MESH_LEVEL _UxGT("调平网格") // "Level Mesh" +#define MSG_UBL_SIDE_POINTS _UxGT("边点") // "Side Points" +#define MSG_UBL_MAP_TYPE _UxGT("图类型") // "Map Type" +#define MSG_UBL_OUTPUT_MAP _UxGT("输出网格图") // "Output Mesh Map" +#define MSG_UBL_OUTPUT_MAP_HOST _UxGT("输出到主机") // "Output for Host" +#define MSG_UBL_OUTPUT_MAP_CSV _UxGT("输出到CSV") // "Output for CSV" +#define MSG_UBL_OUTPUT_MAP_BACKUP _UxGT("输出到备份") // "Off Printer Backup" +#define MSG_UBL_INFO_UBL _UxGT("输出UBL信息") // "Output UBL Info" +#define MSG_UBL_EDIT_MESH_MENU _UxGT("编辑网格") // "Edit Mesh" +#define MSG_UBL_FILLIN_AMOUNT _UxGT("填充合计") // "Fill-in Amount" +#define MSG_UBL_MANUAL_FILLIN _UxGT("手工填充") // "Manual Fill-in" +#define MSG_UBL_SMART_FILLIN _UxGT("聪明填充") // "Smart Fill-in" +#define MSG_UBL_FILLIN_MESH _UxGT("填充网格") // "Fill-in Mesh" +#define MSG_UBL_INVALIDATE_ALL _UxGT("作废所有的") // "Invalidate All" +#define MSG_UBL_INVALIDATE_CLOSEST _UxGT("作废最近的") // "Invalidate Closest" +#define MSG_UBL_FINE_TUNE_ALL _UxGT("细调所有的") // "Fine Tune All" +#define MSG_UBL_FINE_TUNE_CLOSEST _UxGT("细调最近的") // "Fine Tune Closest" +#define MSG_UBL_STORAGE_MESH_MENU _UxGT("网格存储") // "Mesh Storage" +#define MSG_UBL_STORAGE_SLOT _UxGT("存储槽") // "Memory Slot" +#define MSG_UBL_LOAD_MESH _UxGT("装载热床网格") // "Load Bed Mesh" +#define MSG_UBL_SAVE_MESH _UxGT("保存热床网格") // "Save Bed Mesh" +#define MSG_MESH_LOADED _UxGT("网格 %i 已装载") // "Mesh %i loaded" +#define MSG_MESH_SAVED _UxGT("网格 %i 已保存") // "Mesh %i saved" +#define MSG_NO_STORAGE _UxGT("没有存储") // "No storage" +#define MSG_UBL_SAVE_ERROR _UxGT("错误: UBL保存") // "Err: UBL Save" +#define MSG_UBL_RESTORE_ERROR _UxGT("错误: UBL还原") // "Err: UBL Restore" +#define MSG_UBL_Z_OFFSET_STOPPED _UxGT("Z偏移已停止") // "Z-Offset Stopped" +#define MSG_UBL_STEP_BY_STEP_MENU _UxGT("一步步UBL") // "Step-By-Step UBL" + +#define MSG_LED_CONTROL _UxGT("灯管控制") // "LED Control") +#define MSG_LEDS_ON _UxGT("灯亮") // "Lights On") +#define MSG_LEDS_OFF _UxGT("灯灭") // "Lights Off") +#define MSG_LED_PRESETS _UxGT("灯预置") // "Light Presets") +#define MSG_SET_LEDS_RED _UxGT("红") // "Red") +#define MSG_SET_LEDS_ORANGE _UxGT("橙") // "Orange") +#define MSG_SET_LEDS_YELLOW _UxGT("黄") // "Yellow") +#define MSG_SET_LEDS_GREEN _UxGT("绿") // "Green") +#define MSG_SET_LEDS_BLUE _UxGT("蓝") // "Blue") +#define MSG_SET_LEDS_INDIGO _UxGT("青") // "Indigo") +#define MSG_SET_LEDS_VIOLET _UxGT("紫") // "Violet") +#define MSG_SET_LEDS_WHITE _UxGT("白") // "White") +#define MSG_SET_LEDS_DEFAULT _UxGT("缺省") // "Default") +#define MSG_CUSTOM_LEDS _UxGT("定制灯") // "Custom Lights") +#define MSG_INTENSITY_R _UxGT("红饱和度") // "Red Intensity") +#define MSG_INTENSITY_G _UxGT("绿饱和度") // "Green Intensity") +#define MSG_INTENSITY_B _UxGT("蓝饱和度") // "Blue Intensity") +#define MSG_INTENSITY_W _UxGT("白饱和度") // "White Intensity") +#define MSG_LED_BRIGHTNESS _UxGT("亮度") // "Brightness") +#define MSG_MOVING _UxGT("移动 ...") // "Moving...") +#define MSG_FREE_XY _UxGT("释放 XY") // "Free XY") + #define MSG_MOVE_X _UxGT("移动X") //"Move X" #define MSG_MOVE_Y _UxGT("移动Y") //"Move Y" #define MSG_MOVE_Z _UxGT("移动Z") //"Move Z" @@ -80,6 +174,7 @@ #define MSG_NOZZLE _UxGT(" ") LCD_STR_THERMOMETER _UxGT(" 喷嘴") //"Nozzle" 噴嘴 #define MSG_BED _UxGT(" ") LCD_STR_THERMOMETER _UxGT(" 热床") //"Bed" #define MSG_FAN_SPEED _UxGT("风扇速率") //"Fan speed" +#define MSG_EXTRA_FAN_SPEED _UxGT("额外风扇速率") // "Extra fan speed" #define MSG_FLOW _UxGT("挤出速率") //"Flow" #define MSG_CONTROL _UxGT("控制") //"Control" #define MSG_MIN _UxGT(" ") LCD_STR_THERMOMETER _UxGT(" 最小") //" " LCD_STR_THERMOMETER " Min" @@ -105,9 +200,11 @@ #define MSG_VC_JERK _UxGT("Z轴抖动速率") //"Vz-jerk" #endif #define MSG_VE_JERK _UxGT("挤出机抖动速率") //"Ve-jerk" +#define MSG_VELOCITY _UxGT("速度") // "Velocity" #define MSG_VMAX _UxGT("最大进料速率") //"Vmax " max_feedrate_mm_s #define MSG_VMIN _UxGT("最小进料速率") //"Vmin" min_feedrate_mm_s #define MSG_VTRAV_MIN _UxGT("最小移动速率") //"VTrav min" min_travel_feedrate_mm_s, (target) speed of the move +#define MSG_ACCELERATION _UxGT("加速度") // "Acceleration" #define MSG_AMAX _UxGT("最大打印加速度") //"Amax " max_acceleration_mm_per_s2, acceleration in units/s^2 for print moves #define MSG_A_RETRACT _UxGT("收进加速度") //"A-retract" retract_acceleration, E acceleration in mm/s^2 for retracts #define MSG_A_TRAVEL _UxGT("非打印移动加速度") //"A-travel" travel_acceleration, X, Y, Z acceleration in mm/s^2 for travel (non printing) moves @@ -122,15 +219,24 @@ #define MSG_CSTEPS _UxGT("Z轴步数/mm") //"Zsteps/mm" #endif #define MSG_ESTEPS _UxGT("挤出机步数/mm") //"Esteps/mm" +#define MSG_E1STEPS _UxGT("挤出机1步数/mm") //"E1steps/mm" +#define MSG_E2STEPS _UxGT("挤出机2步数/mm") //"E2steps/mm" +#define MSG_E3STEPS _UxGT("挤出机3步数/mm") //"E3steps/mm" +#define MSG_E4STEPS _UxGT("挤出机4步数/mm") //"E4steps/mm" +#define MSG_E5STEPS _UxGT("挤出机5步数/mm") //"E5steps/mm" #define MSG_TEMPERATURE _UxGT("温度") //"Temperature" #define MSG_MOTION _UxGT("运动") //"Motion" #define MSG_FILAMENT _UxGT("丝料测容") //"Filament" lcd_control_volumetric_menu #define MSG_VOLUMETRIC_ENABLED _UxGT("测容积mm³") //"E in mm3" volumetric_enabled #define MSG_FILAMENT_DIAM _UxGT("丝料直径") //"Fil. Dia." +#define MSG_FILAMENT_UNLOAD _UxGT("卸载 mm") // "Unload mm" +#define MSG_FILAMENT_LOAD _UxGT("装载 mm") // "Load mm" +#define MSG_ADVANCE_K _UxGT("Advance K") // "Advance K" #define MSG_CONTRAST _UxGT("LCD对比度") //"LCD contrast" #define MSG_STORE_EEPROM _UxGT("保存设置") //"Store memory" #define MSG_LOAD_EEPROM _UxGT("装载设置") //"Load memory" #define MSG_RESTORE_FAILSAFE _UxGT("恢复安全值") //"Restore failsafe" +#define MSG_INIT_EEPROM _UxGT("初始化设置") // "Initialize EEPROM" #define MSG_REFRESH _UxGT("刷新") //"Refresh" #define MSG_WATCH _UxGT("信息屏") //"Info screen" #define MSG_PREPARE _UxGT("准备") //"Prepare" @@ -141,9 +247,9 @@ #define MSG_CARD_MENU _UxGT("从存储卡上打印") //"Print from SD" #define MSG_NO_CARD _UxGT("无存储卡") //"No SD card" #define MSG_DWELL _UxGT("休眠中 ...") //"Sleep..." -#define MSG_USERWAIT _UxGT("等待用户 ...") //"Wait for user..." -#define MSG_RESUMING _UxGT("恢复打印中") //"Resuming print" -#define MSG_PRINT_ABORTED _UxGT("打印已取消") //"Print aborted" +#define MSG_USERWAIT _UxGT("点击继续 ...") //"Click to resume..." +#define MSG_PRINT_PAUSED _UxGT("暫停打印") // "Print paused" +#define MSG_PRINT_ABORTED _UxGT("已取消打印") //"Print aborted" #define MSG_NO_MOVE _UxGT("无移动") //"No move." #define MSG_KILLED _UxGT("已杀掉") //"KILLED. " #define MSG_STOPPED _UxGT("已停止") //"STOPPED. " @@ -154,11 +260,21 @@ #define MSG_CONTROL_RETRACT_RECOVER _UxGT("回抽恢复长度mm") //"UnRet +mm" retract_recover_length, additional recover length (mm, added to retract length when recovering) #define MSG_CONTROL_RETRACT_RECOVER_SWAP _UxGT("换手回抽恢复长度mm") //"S UnRet+mm" swap_retract_recover_length, additional swap recover length (mm, added to retract length when recovering from extruder change) #define MSG_CONTROL_RETRACT_RECOVERF _UxGT("回抽恢复后进料速率mm/s") //"UnRet V" retract_recover_feedrate_mm_s, feedrate for recovering from retraction (mm/s) +#define MSG_CONTROL_RETRACT_RECOVER_SWAPF _UxGT("S UnRet V") // "S UnRet V" #define MSG_AUTORETRACT _UxGT("自动抽回") //"AutoRetr." autoretract_enabled, #define MSG_FILAMENTCHANGE _UxGT("更换丝料") //"Change filament" +#define MSG_FILAMENTLOAD _UxGT("装载丝料") // "Load filament" +#define MSG_FILAMENTUNLOAD _UxGT("卸载丝料") // "Unload filament" +#define MSG_FILAMENTUNLOAD_ALL _UxGT("卸载全部") // "Unload All" #define MSG_INIT_SDCARD _UxGT("初始化存储卡") //"Init. SD card" #define MSG_CNG_SDCARD _UxGT("更换存储卡") //"Change SD card" #define MSG_ZPROBE_OUT _UxGT("Z探针在热床之外") //"Z probe out. bed" Z probe is not within the physical limits +#define MSG_SKEW_FACTOR _UxGT("偏斜因数") // "Skew Factor" +#define MSG_BLTOUCH _UxGT("BLTouch") // "BLTouch" +#define MSG_BLTOUCH_SELFTEST _UxGT("BLTouch 自检") // "BLTouch Self-Test" +#define MSG_BLTOUCH_RESET _UxGT("重置BLTouch") // "Reset BLTouch" +#define MSG_BLTOUCH_DEPLOY _UxGT("部署BLTouch") // "Deploy BLTouch" +#define MSG_BLTOUCH_STOW _UxGT("装载BLTouch") // "Stow BLTouch" #define MSG_HOME _UxGT("归位") //"Home" // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST #define MSG_FIRST _UxGT("先") //"first" #define MSG_ZPROBE_ZOFFSET _UxGT("Z偏移") //"Z Offset" @@ -173,29 +289,40 @@ #define MSG_ERR_MINTEMP _UxGT("错误:最低温度") //"Err: MINTEMP" #define MSG_ERR_MAXTEMP_BED _UxGT("错误:最高热床温度") //"Err: MAXTEMP BED" #define MSG_ERR_MINTEMP_BED _UxGT("错误:最低热床温度") //"Err: MINTEMP BED" +#define MSG_ERR_Z_HOMING MSG_HOME _UxGT(" ") MSG_X MSG_Y _UxGT(" ") MSG_FIRST #define MSG_HALTED _UxGT("打印停机") //"PRINTER HALTED" #define MSG_PLEASE_RESET _UxGT("请重置") //"Please reset" #define MSG_SHORT_DAY _UxGT("天") //"d" // One character only #define MSG_SHORT_HOUR _UxGT("时") //"h" // One character only #define MSG_SHORT_MINUTE _UxGT("分") //"m" // One character only #define MSG_HEATING _UxGT("加热中 ...") //"Heating..." -#define MSG_HEATING_COMPLETE _UxGT("完成加热") //"Heating done." -#define MSG_BED_HEATING _UxGT("加热热床中") //"Bed Heating." -#define MSG_BED_DONE _UxGT("完成加热热床") //"Bed done." +#define MSG_BED_HEATING _UxGT("加热热床中...") //"Bed Heating..." #define MSG_DELTA_CALIBRATE _UxGT("⊿校准") //"Delta Calibration" -#define MSG_DELTA_CALIBRATE_X _UxGT("校准X") //"Calibrate X" -#define MSG_DELTA_CALIBRATE_Y _UxGT("校准Y") //"Calibrate Y" -#define MSG_DELTA_CALIBRATE_Z _UxGT("校准Z") //"Calibrate Z" -#define MSG_DELTA_CALIBRATE_CENTER _UxGT("校准中心") //"Calibrate Center" - +#define MSG_DELTA_CALIBRATE_X _UxGT("⊿校准X") //"Calibrate X" +#define MSG_DELTA_CALIBRATE_Y _UxGT("⊿校准Y") //"Calibrate Y" +#define MSG_DELTA_CALIBRATE_Z _UxGT("⊿校准Z") //"Calibrate Z" +#define MSG_DELTA_CALIBRATE_CENTER _UxGT("⊿校准中心") //"Calibrate Center" +#define MSG_DELTA_SETTINGS _UxGT("⊿设置") // "Delta Settings" +#define MSG_DELTA_AUTO_CALIBRATE _UxGT("⊿自动校准") // "Auto Calibration" +#define MSG_DELTA_HEIGHT_CALIBRATE _UxGT("设置⊿高度") // "Set Delta Height" +#define MSG_DELTA_DIAG_ROD _UxGT("⊿斜柱") // "Diag Rod" +#define MSG_DELTA_HEIGHT _UxGT("⊿高度") // "Height" +#define MSG_DELTA_RADIUS _UxGT("⊿半径") // "Radius" #define MSG_INFO_MENU _UxGT("关于打印机") //"About Printer" #define MSG_INFO_PRINTER_MENU _UxGT("打印机信息") //"Printer Info" +#define MSG_3POINT_LEVELING _UxGT("三点调平") // "3-Point Leveling" +#define MSG_LINEAR_LEVELING _UxGT("线性调平") // "Linear Leveling" +#define MSG_BILINEAR_LEVELING _UxGT("双线性调平") // "Bilinear Leveling" +#define MSG_UBL_LEVELING _UxGT("统一热床调平(UBL)") // "Unified Bed Leveling" +#define MSG_MESH_LEVELING _UxGT("网格调平") // "Mesh Leveling" #define MSG_INFO_STATS_MENU _UxGT("打印机统计") //"Printer Stats" #define MSG_INFO_BOARD_MENU _UxGT("主板信息") //"Board Info" #define MSG_INFO_THERMISTOR_MENU _UxGT("温度计") //"Thermistors" #define MSG_INFO_EXTRUDERS _UxGT("挤出机") //"Extruders" #define MSG_INFO_BAUDRATE _UxGT("波特率") //"Baud" #define MSG_INFO_PROTOCOL _UxGT("协议") //"Protocol" +#define MSG_CASE_LIGHT _UxGT("外壳灯") // "Case light" +#define MSG_CASE_LIGHT_BRIGHTNESS _UxGT("灯亮度") // "Light BRIGHTNESS" #if LCD_WIDTH > 19 #define MSG_INFO_PRINT_COUNT _UxGT("打印计数") //"Print Count" @@ -214,8 +341,19 @@ #define MSG_INFO_MIN_TEMP _UxGT("最低温度") //"Min Temp" #define MSG_INFO_MAX_TEMP _UxGT("最高温度") //"Max Temp" #define MSG_INFO_PSU _UxGT("电源供应") //"Power Supply" - +#define MSG_DRIVE_STRENGTH _UxGT("驱动力度") // "Drive Strength" +#define MSG_DAC_PERCENT _UxGT("驱动 %") // "Driver %" +#define MSG_DAC_EEPROM_WRITE _UxGT("保存驱动设置") // "DAC EEPROM Write" +#define MSG_FILAMENT_CHANGE_HEADER_PAUSE _UxGT("打印已暂停") // "PRINT PAUSED" +#define MSG_FILAMENT_CHANGE_HEADER_LOAD _UxGT("装载丝料") // "LOAD FILAMENT" +#define MSG_FILAMENT_CHANGE_HEADER_UNLOAD _UxGT("卸载丝料") // "UNLOAD FILAMENT" +#define MSG_FILAMENT_CHANGE_OPTION_HEADER _UxGT("恢复选项:") // "RESUME OPTIONS:" +#define MSG_FILAMENT_CHANGE_OPTION_PURGE _UxGT("清除更多") // "Purge more" #define MSG_FILAMENT_CHANGE_OPTION_RESUME _UxGT("恢复打印") //"Resume print" +#define MSG_FILAMENT_CHANGE_NOZZLE _UxGT(" 喷嘴: ") // " Nozzle: " +#define MSG_ERR_HOMING_FAILED _UxGT("归原位失败") // "Homing failed" +#define MSG_ERR_PROBING_FAILED _UxGT("探针探测失败") // "Probing failed" +#define MSG_M600_TOO_COLD _UxGT("M600: 太凉") // "M600: Too cold" #if LCD_HEIGHT >= 4 #define MSG_FILAMENT_CHANGE_INIT_1 _UxGT("等待开始") //"Wait for start" @@ -223,22 +361,27 @@ #define MSG_FILAMENT_CHANGE_INIT_3 _UxGT("变更") //"change" #define MSG_FILAMENT_CHANGE_UNLOAD_1 _UxGT("等待") //"Wait for" #define MSG_FILAMENT_CHANGE_UNLOAD_2 _UxGT("卸下丝料") //"filament unload" -#define MSG_FILAMENT_CHANGE_UNLOAD_3 _UxGT("") //"" #define MSG_FILAMENT_CHANGE_INSERT_1 _UxGT("插入丝料") //"Insert filament" #define MSG_FILAMENT_CHANGE_INSERT_2 _UxGT("并按键") //"and press button" #define MSG_FILAMENT_CHANGE_INSERT_3 _UxGT("来继续 ...") //"to continue..." +#define MSG_FILAMENT_CHANGE_HEAT_1 _UxGT("按下按钮来") // "Press button to" +#define MSG_FILAMENT_CHANGE_HEAT_2 _UxGT("加热喷嘴.") // "heat nozzle." +#define MSG_FILAMENT_CHANGE_HEATING_1 _UxGT("加热喷嘴") // "Heating nozzle" +#define MSG_FILAMENT_CHANGE_HEATING_2 _UxGT("请等待 ...") // "Please wait..." #define MSG_FILAMENT_CHANGE_LOAD_1 _UxGT("等待") //"Wait for" #define MSG_FILAMENT_CHANGE_LOAD_2 _UxGT("进料") //"filament load" -#define MSG_FILAMENT_CHANGE_LOAD_3 _UxGT("") //"" +#define MSG_FILAMENT_CHANGE_PURGE_1 _UxGT("等待") // "Wait for" +#define MSG_FILAMENT_CHANGE_PURGE_2 _UxGT("丝料清除") // "filament purge" #define MSG_FILAMENT_CHANGE_RESUME_1 _UxGT("等待打印") //"Wait for print" #define MSG_FILAMENT_CHANGE_RESUME_2 _UxGT("恢复") //"to resume" -#define MSG_FILAMENT_CHANGE_RESUME_3 _UxGT("") //"" #else // LCD_HEIGHT < 4 #define MSG_FILAMENT_CHANGE_INIT_1 _UxGT("请等待 ...") //"Please wait..." #define MSG_FILAMENT_CHANGE_UNLOAD_1 _UxGT("退出中 ...") //"Ejecting..." #define MSG_FILAMENT_CHANGE_INSERT_1 _UxGT("插入并单击") //"Insert and Click" +#define MSG_FILAMENT_CHANGE_HEATING_1 _UxGT("加热中 ...") // "Heating..." #define MSG_FILAMENT_CHANGE_LOAD_1 _UxGT("装载中 ...") //"Loading..." +#define MSG_FILAMENT_CHANGE_PURGE_1 _UxGT("清除中 ...") // "Purging..." #define MSG_FILAMENT_CHANGE_RESUME_1 _UxGT("恢复中 ...") //"Resuming..." #endif // LCD_HEIGHT < 4 diff --git a/Marlin/language_zh_TW.h b/Marlin/language_zh_TW.h index f7e0ffac7d..4eb420f423 100644 --- a/Marlin/language_zh_TW.h +++ b/Marlin/language_zh_TW.h @@ -33,12 +33,15 @@ #define CHARSIZE 3 #define WELCOME_MSG MACHINE_NAME _UxGT("已就緒.") //" ready." +#define MSG_BACK _UxGT("返回") // ”Back“ #define MSG_SD_INSERTED _UxGT("記憶卡已插入") //"Card inserted" #define MSG_SD_REMOVED _UxGT("記憶卡被拔出") //"Card removed" #define MSG_LCD_ENDSTOPS _UxGT("擋塊") //"Endstops" // Max length 8 characters #define MSG_MAIN _UxGT("主選單") //"Main" #define MSG_AUTOSTART _UxGT("自動開始") //"Autostart" #define MSG_DISABLE_STEPPERS _UxGT("關閉步進馬達") //"Disable steppers" +#define MSG_DEBUG_MENU _UxGT("除錯選單") // "Debug Menu" +#define MSG_PROGRESS_BAR_TEST _UxGT("進度條測試") // "Progress Bar Test" #define MSG_AUTO_HOME _UxGT("自動回原點") //"Auto home" #define MSG_AUTO_HOME_X _UxGT("回X原點") //"Home X" #define MSG_AUTO_HOME_Y _UxGT("回Y原點") //"Home Y" @@ -47,6 +50,7 @@ #define MSG_LEVEL_BED_WAITING _UxGT("單擊開始熱床調平") //"Click to Begin" #define MSG_LEVEL_BED_NEXT_POINT _UxGT("下個熱床調平點") //"Next Point" #define MSG_LEVEL_BED_DONE _UxGT("完成熱床調平") //"Leveling Done!" +#define MSG_Z_FADE_HEIGHT _UxGT("淡出高度") // "Fade Height" #define MSG_SET_HOME_OFFSETS _UxGT("設置原點偏移") //"Set home offsets" #define MSG_HOME_OFFSETS_APPLIED _UxGT("偏移已啟用") //"Offsets applied" #define MSG_SET_ORIGIN _UxGT("設置原點") //"Set origin" @@ -68,6 +72,96 @@ #define MSG_MOVE_AXIS _UxGT("移動軸") //"Move axis" #define MSG_BED_LEVELING _UxGT("調平熱床") //"Bed leveling" #define MSG_LEVEL_BED _UxGT("調平熱床") //"Level bed" +#define MSG_LEVEL_CORNERS _UxGT("調平邊角") // "Level corners" + +#define MSG_NEXT_CORNER _UxGT("下个邊角") // "Next corner" +#define MSG_EDITING_STOPPED _UxGT("網格編輯已停止") // "Mesh Editing Stopped" + +#define MSG_USER_MENU _UxGT("客制命令") // "Custom Commands" +#define MSG_UBL_DOING_G29 _UxGT("执行G29") // "Doing G29" +#define MSG_UBL_UNHOMED _UxGT("先回XYZ原點") // "Home XYZ first" +#define MSG_UBL_TOOLS _UxGT("UBL工具") // "UBL Tools" +#define MSG_UBL_LEVEL_BED _UxGT("統一熱床調平(UBL)") // "Unified Bed Leveling" +#define MSG_UBL_MANUAL_MESH _UxGT("手工建网") // "Manually Build Mesh" + +#define MSG_UBL_BC_INSERT _UxGT("放置墊片並測量") // "Place shim & measure" +#define MSG_UBL_BC_INSERT2 _UxGT("測量") // "Measure" +#define MSG_UBL_BC_REMOVE _UxGT("移除並測量熱床") // "Remove & measure bed" +#define MSG_UBL_MOVING_TO_NEXT _UxGT("移動到下一個") // "Moving to next" +#define MSG_UBL_ACTIVATE_MESH _UxGT("激活UBL") // "Activate UBL" +#define MSG_UBL_DEACTIVATE_MESH _UxGT("關閉UBL") // "Deactivate UBL" +#define MSG_UBL_SET_BED_TEMP _UxGT("設置熱床溫度") // "Bed Temp" +#define MSG_UBL_SET_HOTEND_TEMP _UxGT("熱端溫度") // "Hotend Temp" +#define MSG_UBL_MESH_EDIT _UxGT("網格編輯") // "Mesh Edit" +#define MSG_UBL_EDIT_CUSTOM_MESH _UxGT("編輯客戶網格") // "Edit Custom Mesh" +#define MSG_UBL_FINE_TUNE_MESH _UxGT("細調網格") // "Fine Tuning Mesh" +#define MSG_UBL_DONE_EDITING_MESH _UxGT("完成編輯網格") // "Done Editing Mesh" +#define MSG_UBL_BUILD_CUSTOM_MESH _UxGT("創設客戶網格") // "Build Custom Mesh" +#define MSG_UBL_BUILD_MESH_MENU _UxGT("創設網格") // "Build Mesh" +#define MSG_UBL_BUILD_PLA_MESH _UxGT("創設PLA網格") // "Build PLA Mesh" +#define MSG_UBL_BUILD_ABS_MESH _UxGT("創設ABS網格") // "Build ABS Mesh" +#define MSG_UBL_BUILD_COLD_MESH _UxGT("創設冷網格") // "Build Cold Mesh" +#define MSG_UBL_MESH_HEIGHT_ADJUST _UxGT("調整網格高度") // "Adjust Mesh Height" +#define MSG_UBL_MESH_HEIGHT_AMOUNT _UxGT("高度合計") // "Height Amount" +#define MSG_UBL_VALIDATE_MESH_MENU _UxGT("批准網格") // "Validate Mesh" +#define MSG_UBL_VALIDATE_PLA_MESH _UxGT("批准PLA網格") // "Validate PLA Mesh" +#define MSG_UBL_VALIDATE_ABS_MESH _UxGT("批准ABS網格") // "Validate ABS Mesh" +#define MSG_UBL_VALIDATE_CUSTOM_MESH _UxGT("批准客戶網格") // "Validate Custom Mesh" +#define MSG_UBL_CONTINUE_MESH _UxGT("繼續熱床網格") // "Continue Bed Mesh" +#define MSG_UBL_MESH_LEVELING _UxGT("網格調平") // "Mesh Leveling" +#define MSG_UBL_3POINT_MESH_LEVELING _UxGT("三點調平") // "3-Point Leveling" +#define MSG_UBL_GRID_MESH_LEVELING _UxGT("格子網格調平") // "Grid Mesh Leveling" +#define MSG_UBL_MESH_LEVEL _UxGT("調平網格") // "Level Mesh" +#define MSG_UBL_SIDE_POINTS _UxGT("邊點") // "Side Points" +#define MSG_UBL_MAP_TYPE _UxGT("圖類型") // "Map Type" +#define MSG_UBL_OUTPUT_MAP _UxGT("輸出網格圖") // "Output Mesh Map" +#define MSG_UBL_OUTPUT_MAP_HOST _UxGT("輸出到主機") // "Output for Host" +#define MSG_UBL_OUTPUT_MAP_CSV _UxGT("輸出到CSV") // "Output for CSV" +#define MSG_UBL_OUTPUT_MAP_BACKUP _UxGT("輸出到備份") // "Off Printer Backup" +#define MSG_UBL_INFO_UBL _UxGT("輸出UBL信息") // "Output UBL Info" +#define MSG_UBL_EDIT_MESH_MENU _UxGT("編輯網格") // "Edit Mesh" +#define MSG_UBL_FILLIN_AMOUNT _UxGT("填充合計") // "Fill-in Amount" +#define MSG_UBL_MANUAL_FILLIN _UxGT("手工填充") // "Manual Fill-in" +#define MSG_UBL_SMART_FILLIN _UxGT("聰明填充") // "Smart Fill-in" +#define MSG_UBL_FILLIN_MESH _UxGT("填充網格") // "Fill-in Mesh" +#define MSG_UBL_INVALIDATE_ALL _UxGT("作廢所有的") // "Invalidate All" +#define MSG_UBL_INVALIDATE_CLOSEST _UxGT("作廢最近的") // "Invalidate Closest" +#define MSG_UBL_FINE_TUNE_ALL _UxGT("細調所有的") // "Fine Tune All" +#define MSG_UBL_FINE_TUNE_CLOSEST _UxGT("細調最近的") // "Fine Tune Closest" +#define MSG_UBL_STORAGE_MESH_MENU _UxGT("網格存儲") // "Mesh Storage" +#define MSG_UBL_STORAGE_SLOT _UxGT("存儲槽") // "Memory Slot" +#define MSG_UBL_LOAD_MESH _UxGT("裝載熱床網格") // "Load Bed Mesh" +#define MSG_UBL_SAVE_MESH _UxGT("保存熱床網格") // "Save Bed Mesh" +#define MSG_MESH_LOADED _UxGT("網格 %i 已裝載") // "Mesh %i loaded" +#define MSG_MESH_SAVED _UxGT("網格 %i 已保存") // "Mesh %i saved" +#define MSG_NO_STORAGE _UxGT("沒有存儲") // "No storage" +#define MSG_UBL_SAVE_ERROR _UxGT("錯誤: UBL保存") // "Err: UBL Save" +#define MSG_UBL_RESTORE_ERROR _UxGT("錯誤: UBL還原") // "Err: UBL Restore" +#define MSG_UBL_Z_OFFSET_STOPPED _UxGT("Z偏移已停止") // "Z-Offset Stopped" +#define MSG_UBL_STEP_BY_STEP_MENU _UxGT("一步步UBL") // "Step-By-Step UBL" + +#define MSG_LED_CONTROL _UxGT("灯管控制") // "LED Control") +#define MSG_LEDS_ON _UxGT("灯亮") // "Lights On") +#define MSG_LEDS_OFF _UxGT("灯灭") // "Lights Off") +#define MSG_LED_PRESETS _UxGT("灯预置") // "Light Presets") +#define MSG_SET_LEDS_RED _UxGT("红") // "Red") +#define MSG_SET_LEDS_ORANGE _UxGT("橙") // "Orange") +#define MSG_SET_LEDS_YELLOW _UxGT("黄") // "Yellow") +#define MSG_SET_LEDS_GREEN _UxGT("绿") // "Green") +#define MSG_SET_LEDS_BLUE _UxGT("蓝") // "Blue") +#define MSG_SET_LEDS_INDIGO _UxGT("青") // "Indigo") +#define MSG_SET_LEDS_VIOLET _UxGT("紫") // "Violet") +#define MSG_SET_LEDS_WHITE _UxGT("白") // "White") +#define MSG_SET_LEDS_DEFAULT _UxGT("缺省") // "Default") +#define MSG_CUSTOM_LEDS _UxGT("定制灯") // "Custom Lights") +#define MSG_INTENSITY_R _UxGT("红飽和度") // "Red Intensity") +#define MSG_INTENSITY_G _UxGT("绿飽和度") // "Green Intensity") +#define MSG_INTENSITY_B _UxGT("蓝飽和度") // "Blue Intensity") +#define MSG_INTENSITY_W _UxGT("白飽和度") // "White Intensity") +#define MSG_LED_BRIGHTNESS _UxGT("亮度") // "Brightness") +#define MSG_MOVING _UxGT("移动 ...") // "Moving...") +#define MSG_FREE_XY _UxGT("释放 XY") // "Free XY") + #define MSG_MOVE_X _UxGT("移動X") //"Move X" #define MSG_MOVE_Y _UxGT("移動Y") //"Move Y" #define MSG_MOVE_Z _UxGT("移動Z") //"Move Z" @@ -80,6 +174,7 @@ #define MSG_NOZZLE _UxGT(" ") LCD_STR_THERMOMETER _UxGT(" 噴嘴") //"Nozzle" 噴嘴 #define MSG_BED _UxGT(" ") LCD_STR_THERMOMETER _UxGT(" 熱床") //"Bed" #define MSG_FAN_SPEED _UxGT("風扇速率") //"Fan speed" +#define MSG_EXTRA_FAN_SPEED _UxGT("額外風扇速率") // "Extra fan speed" #define MSG_FLOW _UxGT("擠出速率") //"Flow" #define MSG_CONTROL _UxGT("控制") //"Control" #define MSG_MIN _UxGT(" ") LCD_STR_THERMOMETER _UxGT(" 最小") //" " LCD_STR_THERMOMETER " Min" @@ -105,9 +200,11 @@ #define MSG_VC_JERK _UxGT("Z軸抖動速率") //"Vz-jerk" #endif #define MSG_VE_JERK _UxGT("擠出機抖動速率") //"Ve-jerk" +#define MSG_VELOCITY _UxGT("速度") // "Velocity" #define MSG_VMAX _UxGT("最大進料速率") //"Vmax " max_feedrate_mm_s #define MSG_VMIN _UxGT("最小進料速率") //"Vmin" min_feedrate_mm_s #define MSG_VTRAV_MIN _UxGT("最小移動速率") //"VTrav min" min_travel_feedrate_mm_s, (target) speed of the move +#define MSG_ACCELERATION _UxGT("加速度") // "Acceleration" #define MSG_AMAX _UxGT("最大列印加速度") //"Amax " max_acceleration_mm_per_s2, acceleration in units/s^2 for print moves #define MSG_A_RETRACT _UxGT("回縮加速度") //"A-retract" retract_acceleration, E acceleration in mm/s^2 for retracts #define MSG_A_TRAVEL _UxGT("非列印移動加速度") //"A-travel" travel_acceleration, X, Y, Z acceleration in mm/s^2 for travel (non printing) moves @@ -122,15 +219,24 @@ #define MSG_CSTEPS _UxGT("Z軸步數/mm") //"Zsteps/mm" #endif #define MSG_ESTEPS _UxGT("擠出機步數/mm") //"Esteps/mm" +#define MSG_E1STEPS _UxGT("擠出機1步數/mm") //"E1steps/mm" +#define MSG_E2STEPS _UxGT("擠出機2步數/mm") //"E2steps/mm" +#define MSG_E3STEPS _UxGT("擠出機3步數/mm") //"E3steps/mm" +#define MSG_E4STEPS _UxGT("擠出機4步數/mm") //"E4steps/mm" +#define MSG_E5STEPS _UxGT("擠出機5步數/mm") //"E5steps/mm" #define MSG_TEMPERATURE _UxGT("溫度") //"Temperature" #define MSG_MOTION _UxGT("運作") //"Motion" #define MSG_FILAMENT _UxGT("絲料測容") //"Filament" lcd_control_volumetric_menu #define MSG_VOLUMETRIC_ENABLED _UxGT("測容積mm³") //"E in mm3" volumetric_enabled #define MSG_FILAMENT_DIAM _UxGT("絲料直徑") //"Fil. Dia." +#define MSG_FILAMENT_UNLOAD _UxGT("卸載 mm") // "Unload mm" +#define MSG_FILAMENT_LOAD _UxGT("装載 mm") // "Load mm" +#define MSG_ADVANCE_K _UxGT("Advance K") // "Advance K" #define MSG_CONTRAST _UxGT("LCD對比度") //"LCD contrast" #define MSG_STORE_EEPROM _UxGT("保存設置") //"Store memory" #define MSG_LOAD_EEPROM _UxGT("載入設置") //"Load memory" #define MSG_RESTORE_FAILSAFE _UxGT("恢復安全值") //"Restore failsafe" +#define MSG_INIT_EEPROM _UxGT("初始化設置") // "Initialize EEPROM" #define MSG_REFRESH _UxGT("刷新") //"Refresh" #define MSG_WATCH _UxGT("資訊界面") //"Info screen" #define MSG_PREPARE _UxGT("準備") //"Prepare" @@ -141,9 +247,9 @@ #define MSG_CARD_MENU _UxGT("從記憶卡上列印") //"Print from SD" #define MSG_NO_CARD _UxGT("無記憶卡") //"No SD card" #define MSG_DWELL _UxGT("休眠 ...") //"Sleep..." -#define MSG_USERWAIT _UxGT("等待用戶 ...") //"Wait for user..." -#define MSG_RESUMING _UxGT("恢復列印中") //"Resuming print" -#define MSG_PRINT_ABORTED _UxGT("列印已取消") //"Print aborted" +#define MSG_USERWAIT _UxGT("點擊繼續 ...") //"Click to resume..." +#define MSG_PRINT_PAUSED _UxGT("列印已暫停") // "Print paused" +#define MSG_PRINT_ABORTED _UxGT("已取消列印") //"Print aborted" #define MSG_NO_MOVE _UxGT("無移動") //"No move." #define MSG_KILLED _UxGT("已砍掉") //"KILLED. " #define MSG_STOPPED _UxGT("已停止") //"STOPPED. " @@ -153,12 +259,22 @@ #define MSG_CONTROL_RETRACT_ZLIFT _UxGT("Hop mm") //"Hop mm" retract_zlift, retract Z-lift #define MSG_CONTROL_RETRACT_RECOVER _UxGT("回縮恢復長度mm") //"UnRet +mm" retract_recover_length, additional recover length (mm, added to retract length when recovering) #define MSG_CONTROL_RETRACT_RECOVER_SWAP _UxGT("換手回縮恢復長度mm") //"S UnRet+mm" swap_retract_recover_length, additional swap recover length (mm, added to retract length when recovering from extruder change) -#define MSG_CONTROL_RETRACT_RECOVERF _UxGT("回縮恢復後進料速率mm/s") //"UnRet V" retract_recover_feedrate_mm_s, feedrate for recovering from retraction (mm/s) +#define MSG_CONTROL_RETRACT_RECOVERF _UxGT("回縮恢復後進料速率mm/s") //"UnRet V" retract_recover_feedrate_mm_s, feedrate for recovering from retraction (mm/s) +#define MSG_CONTROL_RETRACT_RECOVER_SWAPF _UxGT("S UnRet V") // "S UnRet V" #define MSG_AUTORETRACT _UxGT("自動回縮") //"AutoRetr." autoretract_enabled, #define MSG_FILAMENTCHANGE _UxGT("更換絲料") //"Change filament" +#define MSG_FILAMENTLOAD _UxGT("裝載絲料") // "Load filament" +#define MSG_FILAMENTUNLOAD _UxGT("卸載絲料") // "Unload filament" +#define MSG_FILAMENTUNLOAD_ALL _UxGT("卸載全部") // "Unload All" #define MSG_INIT_SDCARD _UxGT("初始化記憶卡") //"Init. SD card" #define MSG_CNG_SDCARD _UxGT("更換記憶卡") //"Change SD card" #define MSG_ZPROBE_OUT _UxGT("Z探針在熱床之外") //"Z probe out. bed" Z probe is not within the physical limits +#define MSG_SKEW_FACTOR _UxGT("偏斜因數") // "Skew Factor" +#define MSG_BLTOUCH _UxGT("BLTouch") // "BLTouch" +#define MSG_BLTOUCH_SELFTEST _UxGT("BLTouch 自檢") // "BLTouch Self-Test" +#define MSG_BLTOUCH_RESET _UxGT("重置BLTouch") // "Reset BLTouch" +#define MSG_BLTOUCH_DEPLOY _UxGT("部署BLTouch") // "Deploy BLTouch" +#define MSG_BLTOUCH_STOW _UxGT("裝載BLTouch") // "Stow BLTouch" #define MSG_HOME _UxGT("歸位") //"Home" // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST #define MSG_FIRST _UxGT("先") //"first" #define MSG_ZPROBE_ZOFFSET _UxGT("Z偏移") //"Z Offset" @@ -173,29 +289,40 @@ #define MSG_ERR_MINTEMP _UxGT("錯誤:最低溫度") //"Err: MINTEMP" #define MSG_ERR_MAXTEMP_BED _UxGT("錯誤:最高熱床溫度") //"Err: MAXTEMP BED" #define MSG_ERR_MINTEMP_BED _UxGT("錯誤:最低熱床溫度") //"Err: MINTEMP BED" +#define MSG_ERR_Z_HOMING MSG_HOME _UxGT(" ") MSG_X MSG_Y _UxGT(" ") MSG_FIRST #define MSG_HALTED _UxGT("印表機停機") //"PRINTER HALTED" #define MSG_PLEASE_RESET _UxGT("請重置") //"Please reset" #define MSG_SHORT_DAY _UxGT("天") //"d" // One character only #define MSG_SHORT_HOUR _UxGT("時") //"h" // One character only #define MSG_SHORT_MINUTE _UxGT("分") //"m" // One character only #define MSG_HEATING _UxGT("加熱中 ...") //"Heating..." -#define MSG_HEATING_COMPLETE _UxGT("完成加熱") //"Heating done." -#define MSG_BED_HEATING _UxGT("加熱熱床中") //"Bed Heating." -#define MSG_BED_DONE _UxGT("完成加熱熱床") //"Bed done." +#define MSG_BED_HEATING _UxGT("加熱熱床中...") //"Bed Heating..." #define MSG_DELTA_CALIBRATE _UxGT("⊿校準") //"Delta Calibration" -#define MSG_DELTA_CALIBRATE_X _UxGT("校準X") //"Calibrate X" -#define MSG_DELTA_CALIBRATE_Y _UxGT("校準Y") //"Calibrate Y" -#define MSG_DELTA_CALIBRATE_Z _UxGT("校準Z") //"Calibrate Z" -#define MSG_DELTA_CALIBRATE_CENTER _UxGT("校準中心") //"Calibrate Center" - +#define MSG_DELTA_CALIBRATE_X _UxGT("⊿校準X") //"Calibrate X" +#define MSG_DELTA_CALIBRATE_Y _UxGT("⊿校準Y") //"Calibrate Y" +#define MSG_DELTA_CALIBRATE_Z _UxGT("⊿校準Z") //"Calibrate Z" +#define MSG_DELTA_CALIBRATE_CENTER _UxGT("⊿校準中心") //"Calibrate Center" +#define MSG_DELTA_SETTINGS _UxGT("⊿設置") // "Delta Settings" +#define MSG_DELTA_AUTO_CALIBRATE _UxGT("⊿自動校準") // "Auto Calibration" +#define MSG_DELTA_HEIGHT_CALIBRATE _UxGT("設置⊿高度") // "Set Delta Height" +#define MSG_DELTA_DIAG_ROD _UxGT("⊿斜柱") // "Diag Rod" +#define MSG_DELTA_HEIGHT _UxGT("⊿高度") // "Height" +#define MSG_DELTA_RADIUS _UxGT("⊿半徑") // "Radius" #define MSG_INFO_MENU _UxGT("關於印表機") //"About Printer" #define MSG_INFO_PRINTER_MENU _UxGT("印表機訊息") //"Printer Info" +#define MSG_3POINT_LEVELING _UxGT("三點調平") // "3-Point Leveling" +#define MSG_LINEAR_LEVELING _UxGT("線性調平") // "Linear Leveling" +#define MSG_BILINEAR_LEVELING _UxGT("雙線性調平") // "Bilinear Leveling" +#define MSG_UBL_LEVELING _UxGT("統一熱床調平(UBL)") // "Unified Bed Leveling" +#define MSG_MESH_LEVELING _UxGT("網格調平") // "Mesh Leveling" #define MSG_INFO_STATS_MENU _UxGT("印表機統計") //"Printer Stats" #define MSG_INFO_BOARD_MENU _UxGT("主板訊息") //"Board Info" #define MSG_INFO_THERMISTOR_MENU _UxGT("溫度計") //"Thermistors" #define MSG_INFO_EXTRUDERS _UxGT("擠出機") //"Extruders" #define MSG_INFO_BAUDRATE _UxGT("傳輸率") //"Baud" #define MSG_INFO_PROTOCOL _UxGT("協議") //"Protocol" +#define MSG_CASE_LIGHT _UxGT("外殼燈") // "Case light" +#define MSG_CASE_LIGHT_BRIGHTNESS _UxGT("燈亮度") // "Light BRIGHTNESS" #if LCD_WIDTH > 19 #define MSG_INFO_PRINT_COUNT _UxGT("列印計數") //"Print Count" @@ -214,8 +341,19 @@ #define MSG_INFO_MIN_TEMP _UxGT("最低溫度") //"Min Temp" #define MSG_INFO_MAX_TEMP _UxGT("最高溫度") //"Max Temp" #define MSG_INFO_PSU _UxGT("電源供應") //"Power Supply" - +#define MSG_DRIVE_STRENGTH _UxGT("驅動力度") // "Drive Strength" +#define MSG_DAC_PERCENT _UxGT("驅動 %") // "Driver %" +#define MSG_DAC_EEPROM_WRITE _UxGT("保存驅動設置") // "DAC EEPROM Write" +#define MSG_FILAMENT_CHANGE_HEADER_PAUSE _UxGT("列印已暫停") // "PRINT PAUSED" +#define MSG_FILAMENT_CHANGE_HEADER_LOAD _UxGT("裝載絲料") // "LOAD FILAMENT" +#define MSG_FILAMENT_CHANGE_HEADER_UNLOAD _UxGT("卸載絲料") // "UNLOAD FILAMENT" +#define MSG_FILAMENT_CHANGE_OPTION_HEADER _UxGT("恢複選項:") // "RESUME OPTIONS:" +#define MSG_FILAMENT_CHANGE_OPTION_PURGE _UxGT("清除更多") // "Purge more" #define MSG_FILAMENT_CHANGE_OPTION_RESUME _UxGT("恢復列印") //"Resume print" +#define MSG_FILAMENT_CHANGE_NOZZLE _UxGT(" 噴嘴: ") // " Nozzle: " +#define MSG_ERR_HOMING_FAILED _UxGT("歸原位失敗") // "Homing failed" +#define MSG_ERR_PROBING_FAILED _UxGT("探針探測失敗") // "Probing failed" +#define MSG_M600_TOO_COLD _UxGT("M600: 太涼") // "M600: Too cold" #if LCD_HEIGHT >= 4 #define MSG_FILAMENT_CHANGE_INIT_1 _UxGT("等待開始") //"Wait for start" @@ -223,22 +361,27 @@ #define MSG_FILAMENT_CHANGE_INIT_3 _UxGT("變更") //"change" #define MSG_FILAMENT_CHANGE_UNLOAD_1 _UxGT("等待") //"Wait for" #define MSG_FILAMENT_CHANGE_UNLOAD_2 _UxGT("卸下絲料") //"filament unload" -#define MSG_FILAMENT_CHANGE_UNLOAD_3 _UxGT("") //"" #define MSG_FILAMENT_CHANGE_INSERT_1 _UxGT("插入絲料") //"Insert filament" #define MSG_FILAMENT_CHANGE_INSERT_2 _UxGT("並按鍵") //"and press button" #define MSG_FILAMENT_CHANGE_INSERT_3 _UxGT("繼續 ...") //"to continue..." +#define MSG_FILAMENT_CHANGE_HEAT_1 _UxGT("按下按鈕來") // "Press button to" +#define MSG_FILAMENT_CHANGE_HEAT_2 _UxGT("加熱噴嘴.") // "heat nozzle." +#define MSG_FILAMENT_CHANGE_HEATING_1 _UxGT("加熱噴嘴") // "Heating nozzle" +#define MSG_FILAMENT_CHANGE_HEATING_2 _UxGT("請等待 ...") // "Please wait..." #define MSG_FILAMENT_CHANGE_LOAD_1 _UxGT("等待") //"Wait for" #define MSG_FILAMENT_CHANGE_LOAD_2 _UxGT("進料") //"filament load" -#define MSG_FILAMENT_CHANGE_LOAD_3 _UxGT("") //"" +#define MSG_FILAMENT_CHANGE_PURGE_1 _UxGT("等待") // "Wait for" +#define MSG_FILAMENT_CHANGE_PURGE_2 _UxGT("絲料清除") // "filament purge" #define MSG_FILAMENT_CHANGE_RESUME_1 _UxGT("等待列印") //"Wait for print" #define MSG_FILAMENT_CHANGE_RESUME_2 _UxGT("恢復") //"to resume" -#define MSG_FILAMENT_CHANGE_RESUME_3 _UxGT("") //"" #else // LCD_HEIGHT < 4 #define MSG_FILAMENT_CHANGE_INIT_1 _UxGT("請等待 ...") //"Please wait..." #define MSG_FILAMENT_CHANGE_UNLOAD_1 _UxGT("退出中 ...") //"Ejecting..." #define MSG_FILAMENT_CHANGE_INSERT_1 _UxGT("插入並點擊") //"Insert and Click" +#define MSG_FILAMENT_CHANGE_HEATING_1 _UxGT("加熱中 ...") // "Heating..." #define MSG_FILAMENT_CHANGE_LOAD_1 _UxGT("載入中 ...") //"Loading..." +#define MSG_FILAMENT_CHANGE_PURGE_1 _UxGT("清除中 ...") // "Purging..." #define MSG_FILAMENT_CHANGE_RESUME_1 _UxGT("恢復中 ...") //"Resuming..." #endif // LCD_HEIGHT < 4 diff --git a/Marlin/macros.h b/Marlin/macros.h index 75f32e852c..b09812ad2e 100644 --- a/Marlin/macros.h +++ b/Marlin/macros.h @@ -217,7 +217,7 @@ #define NEAR(x,y) NEAR_ZERO((x)-(y)) #define RECIPROCAL(x) (NEAR_ZERO(x) ? 0.0 : 1.0 / (x)) -#define FIXFLOAT(f) (f + 0.00001) +#define FIXFLOAT(f) (f + (f < 0.0 ? -0.00001 : 0.00001)) // // Maths macros that can be overridden by HAL diff --git a/Marlin/malyanlcd.cpp b/Marlin/malyanlcd.cpp index 29177deefb..894b8ae642 100644 --- a/Marlin/malyanlcd.cpp +++ b/Marlin/malyanlcd.cpp @@ -106,14 +106,14 @@ void process_lcd_c_command(const char* command) { // M104 S char cmd[20]; sprintf_P(cmd, PSTR("M104 S%s"), command + 1); - enqueue_and_echo_command_now(cmd, false); + enqueue_and_echo_command_now(cmd); } break; case 'P': { // M140 S char cmd[20]; sprintf_P(cmd, PSTR("M140 S%s"), command + 1); - enqueue_and_echo_command_now(cmd, false); + enqueue_and_echo_command_now(cmd); } break; default: @@ -175,8 +175,8 @@ void process_lcd_j_command(const char* command) { case 'E': // enable or disable steppers // switch to relative - enqueue_and_echo_command_now("G91"); - enqueue_and_echo_command_now(steppers_enabled ? "M18" : "M17"); + enqueue_and_echo_commands_now_P(PSTR("G91")); + enqueue_and_echo_commands_now_P(steppers_enabled ? PSTR("M18") : PSTR("M17")); steppers_enabled = !steppers_enabled; break; case 'A': @@ -242,7 +242,7 @@ void process_lcd_p_command(const char* command) { break; case 'H': // Home all axis - enqueue_and_echo_command_now("G28"); + enqueue_and_echo_commands_now_P(PSTR("G28")); break; default: { // Print file 000 - a three digit number indicating which diff --git a/Marlin/parser.cpp b/Marlin/parser.cpp index 9abaf1e09f..178583cad0 100644 --- a/Marlin/parser.cpp +++ b/Marlin/parser.cpp @@ -152,7 +152,7 @@ void GCodeParser::parse(char *p) { #endif // Only use string_arg for these M codes - if (letter == 'M') switch (codenum) { case 23: case 28: case 30: case 117: case 928: string_arg = p; return; default: break; } + if (letter == 'M') switch (codenum) { case 23: case 28: case 30: case 117: case 118: case 928: string_arg = p; return; default: break; } #if ENABLED(DEBUG_GCODE_PARSER) const bool debug = codenum == 800; diff --git a/Marlin/pins.h b/Marlin/pins.h index a280922187..9cad2557af 100644 --- a/Marlin/pins.h +++ b/Marlin/pins.h @@ -100,14 +100,16 @@ #include "pins_BAM_DICE_DUE.h" // ATmega1280, ATmega2560 #elif MB(MKS_BASE) #include "pins_MKS_BASE.h" // ATmega1280, ATmega2560 +#elif MB(MKS_BASE_15) + #include "pins_MKS_BASE_15.h" // ATmega1280, ATmega2560 #elif MB(MKS_BASE_HEROIC) #include "pins_MKS_BASE_HEROIC.h" // ATmega1280, ATmega2560 -#elif MB(MKS_13) - #include "pins_MKS_13.h" // ATmega1280, ATmega2560 +#elif MB(MKS_GEN_13) + #include "pins_MKS_GEN_13.h" // ATmega1280, ATmega2560 #elif MB(MKS_GEN_L) #include "pins_MKS_GEN_L.h" // ATmega1280, ATmega2560 #elif MB(ZRIB_V20) - #include "pins_ZRIB_V20.h" // ATmega1280, ATmega2560 (MKS_13) + #include "pins_ZRIB_V20.h" // ATmega1280, ATmega2560 (MKS_GEN_13) #elif MB(FELIX2) #include "pins_FELIX2.h" // ATmega1280, ATmega2560 #elif MB(RIGIDBOARD) @@ -132,8 +134,12 @@ #include "pins_BQ_ZUM_MEGA_3D.h" // ATmega2560 #elif MB(MAKEBOARD_MINI) #include "pins_MAKEBOARD_MINI.h" // ATmega2560 -#elif MB(TRIGORILLA) - #include "pins_TRIGORILLA.h" // ATmega2560 +#elif MB(TRIGORILLA_13) + #include "pins_TRIGORILLA_13.h" // ATmega2560 +#elif MB(TRIGORILLA_14) + #include "pins_TRIGORILLA_14.h" // ATmega2560 +#elif MB(RAMPS_ENDER_4) + #include "pins_RAMPS_ENDER_4.h" // ATmega2560 // // Other ATmega1280, ATmega2560 @@ -161,6 +167,8 @@ #include "pins_MINIRAMBO.h" // ATmega2560 #elif MB(EINSY_RAMBO) #include "pins_EINSY_RAMBO.h" // ATmega2560 +#elif MB(EINSY_RETRO) + #include "pins_EINSY_RETRO.h" // ATmega2560 #elif MB(ELEFU_3) #include "pins_ELEFU_3.h" // ATmega2560 #elif MB(LEAPFROG) @@ -199,8 +207,6 @@ #include "pins_MELZI_CREALITY.h" // ATmega644P, ATmega1284P #elif MB(MELZI_MALYAN) #include "pins_MELZI_MALYAN.h" // ATmega644P, ATmega1284P -#elif MB(CREALITY_ENDER) - #include "pins_CREALITY_ENDER.h" // ATmega1284P #elif MB(MELZI_TRONXY) #include "pins_MELZI_TRONXY.h" // ATmega644P, ATmega1284P #elif MB(STB_11) @@ -517,6 +523,13 @@ #define E4_AUTO_FAN_PIN -1 #endif #endif +#ifndef CHAMBER_AUTO_FAN_PIN + #ifdef ORIG_CHAMBER_AUTO_FAN_PIN + #define CHAMBER_AUTO_FAN_PIN ORIG_CHAMBER_AUTO_FAN_PIN + #else + #define CHAMBER_AUTO_FAN_PIN -1 + #endif +#endif // List of pins which to ignore when asked to change by gcode, 0 and 1 are RX and TX, do not mess with those! #define _E0_PINS E0_STEP_PIN, E0_DIR_PIN, E0_ENABLE_PIN, E0_MS1_PIN, E0_MS2_PIN, E0_CS_PIN, diff --git a/Marlin/pinsDebug_Teensyduino.h b/Marlin/pinsDebug_Teensyduino.h index 797a2cd71f..3e08bbbc66 100644 --- a/Marlin/pinsDebug_Teensyduino.h +++ b/Marlin/pinsDebug_Teensyduino.h @@ -29,7 +29,7 @@ #define __PINSDEBUG_TEENSYDUINO_H__ #undef NUM_DIGITAL_PINS -#define NUM_DIGITAL_PINS 48 // Teensy says 46 but FASTIO is 48 +#define NUM_DIGITAL_PINS 48 // Teensy says 46 but FASTIO is 48 // "digitalPinToPort" function just returns the pin number so need to create our own. // Can't use the name "digitalPinToPort" for our own because it interferes with the @@ -42,7 +42,6 @@ #define PE 5 #define PF 6 - const uint8_t PROGMEM digital_pin_to_port_PGM_Teensy[] = { PD, // 0 - PD0 - INT0 - PWM PD, // 1 - PD1 - INT1 - PWM diff --git a/Marlin/pinsDebug_list.h b/Marlin/pinsDebug_list.h index 875b3f04ab..e19858d528 100644 --- a/Marlin/pinsDebug_list.h +++ b/Marlin/pinsDebug_list.h @@ -83,9 +83,6 @@ #if PIN_EXISTS(TEMP_CHAMBER) && TEMP_CHAMBER_PIN < NUM_ANALOG_INPUTS REPORT_NAME_ANALOG(__LINE__, TEMP_CHAMBER_PIN) #endif -#if PIN_EXISTS(TEMP_X) && TEMP_X_PIN < NUM_ANALOG_INPUTS - REPORT_NAME_ANALOG(__LINE__, TEMP_X_PIN) -#endif #if PIN_EXISTS(ADC_KEYPAD) && ADC_KEYPAD_PIN < NUM_ANALOG_INPUTS REPORT_NAME_ANALOG(__LINE__, ADC_KEYPAD_PIN) #endif @@ -166,6 +163,9 @@ #if PIN_EXISTS(CASE_LIGHT) REPORT_NAME_DIGITAL(__LINE__, CASE_LIGHT_PIN) #endif +#if PIN_EXISTS(CHAMBER_AUTO_FAN) + REPORT_NAME_DIGITAL(__LINE__, CHAMBER_AUTO_FAN_PIN) +#endif #if PIN_EXISTS(CONTROLLER_FAN) REPORT_NAME_DIGITAL(__LINE__, CONTROLLER_FAN_PIN) #endif @@ -226,6 +226,15 @@ #if defined(DOGLCD_SCK) && DOGLCD_SCK >= 0 REPORT_NAME_DIGITAL(__LINE__, DOGLCD_SCK) #endif +#if defined(TMC_SW_MISO) && TMC_SW_MISO >= 0 + REPORT_NAME_DIGITAL(__LINE__, TMC_SW_MISO) +#endif +#if defined(TMC_SW_MOSI) && TMC_SW_MOSI >= 0 + REPORT_NAME_DIGITAL(__LINE__, TMC_SW_MOSI) +#endif +#if defined(TMC_SW_SCK) && TMC_SW_SCK >= 0 + REPORT_NAME_DIGITAL(__LINE__, TMC_SW_SCK) +#endif #if PIN_EXISTS(E_MUX0) REPORT_NAME_DIGITAL(__LINE__, E_MUX0_PIN) #endif diff --git a/Marlin/pins_3DRAG.h b/Marlin/pins_3DRAG.h index feadea4e3c..61cdb56c1d 100644 --- a/Marlin/pins_3DRAG.h +++ b/Marlin/pins_3DRAG.h @@ -153,11 +153,11 @@ #define Z_DIR_PIN 28 #define Z_ENABLE_PIN 24 #define Z_STEP_PIN 26 - #define SPINDLE_LASER_PWM_PIN 46 // MUST BE HARDWARE PWM - #define SPINDLE_LASER_ENABLE_PIN 62 // Pin should have a pullup! + #define SPINDLE_LASER_PWM_PIN 46 // MUST BE HARDWARE PWM + #define SPINDLE_LASER_ENABLE_PIN 62 // Pin should have a pullup! #define SPINDLE_DIR_PIN 48 #elif !(ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL)) // use expansion header if no LCD in use - #define SPINDLE_LASER_ENABLE_PIN 16 // Pin should have a pullup/pulldown! + #define SPINDLE_LASER_ENABLE_PIN 16 // Pin should have a pullup/pulldown! #define SPINDLE_DIR_PIN 17 #endif #endif diff --git a/Marlin/pins_5DPRINT.h b/Marlin/pins_5DPRINT.h index 266fde32d5..0e8b5f6019 100755 --- a/Marlin/pins_5DPRINT.h +++ b/Marlin/pins_5DPRINT.h @@ -140,4 +140,4 @@ #define SDSS 20 // B0 //DIGIPOTS slave addresses -#define DIGIPOT_I2C_ADDRESS_A 0x2C // unshifted slave address for DIGIPOT 0x2C (0x58 <- 0x2C << 1) +#define DIGIPOT_I2C_ADDRESS_A 0x2C // unshifted slave address for DIGIPOT 0x2C (0x58 <- 0x2C << 1) diff --git a/Marlin/pins_ANET_10.h b/Marlin/pins_ANET_10.h index 2ab92a3d9b..d7c113d355 100644 --- a/Marlin/pins_ANET_10.h +++ b/Marlin/pins_ANET_10.h @@ -125,14 +125,14 @@ // // Temperature Sensors // -#define TEMP_0_PIN 7 // Analog Input (pin 33 extruder) -#define TEMP_BED_PIN 6 // Analog Input (pin 34 bed) +#define TEMP_0_PIN 7 // Analog Input (pin 33 extruder) +#define TEMP_BED_PIN 6 // Analog Input (pin 34 bed) // // Heaters / Fans // -#define HEATER_0_PIN 13 // (extruder) -#define HEATER_BED_PIN 12 // (bed) +#define HEATER_0_PIN 13 // (extruder) +#define HEATER_BED_PIN 12 // (bed) #define FAN_PIN 4 // diff --git a/Marlin/pins_AZTEEG_X3.h b/Marlin/pins_AZTEEG_X3.h index 86ccbd9245..0abc9b87d6 100644 --- a/Marlin/pins_AZTEEG_X3.h +++ b/Marlin/pins_AZTEEG_X3.h @@ -32,8 +32,8 @@ #error "Azteeg X3 supports up to 2 hotends / E-steppers. Comment out this line to continue." #endif -#if ENABLED(CASE_LIGHT_ENABLE) && !PIN_EXISTS(CASE_LIGHT) - #define CASE_LIGHT_PIN 6 // must define it here or else RAMPS will define it +#if ENABLED(CASE_LIGHT_ENABLE) && !PIN_EXISTS(CASE_LIGHT) + #define CASE_LIGHT_PIN 6 // Define before RAMPS pins include #endif #define BOARD_NAME "Azteeg X3" @@ -44,8 +44,8 @@ // #undef SERVO0_PIN #undef SERVO1_PIN -#define SERVO0_PIN 44 // SERVO1 port -#define SERVO1_PIN 55 // SERVO2 port +#define SERVO0_PIN 44 // SERVO1 port +#define SERVO1_PIN 55 // SERVO2 port // // LCD / Controller @@ -91,9 +91,9 @@ #undef SCL #if SERVO0_PIN == 7 #undef SERVO0_PIN - #def SERVO0_PIN 11 + #define SERVO0_PIN 11 #endif - #define SPINDLE_LASER_PWM_PIN 7 // MUST BE HARDWARE PWM - #define SPINDLE_LASER_ENABLE_PIN 20 // Pin should have a pullup! + #define SPINDLE_LASER_PWM_PIN 7 // MUST BE HARDWARE PWM + #define SPINDLE_LASER_ENABLE_PIN 20 // Pin should have a pullup! #define SPINDLE_DIR_PIN 21 #endif diff --git a/Marlin/pins_AZTEEG_X3_PRO.h b/Marlin/pins_AZTEEG_X3_PRO.h index 159cd0f76f..1010320679 100644 --- a/Marlin/pins_AZTEEG_X3_PRO.h +++ b/Marlin/pins_AZTEEG_X3_PRO.h @@ -28,11 +28,10 @@ #error "Azteeg X3 Pro supports up to 5 hotends / E-steppers. Comment out this line to continue." #endif -#if ENABLED(CASE_LIGHT_ENABLE) && !PIN_EXISTS(CASE_LIGHT) - #define CASE_LIGHT_PIN 44 // must define it here or else RAMPS will define it +#if ENABLED(CASE_LIGHT_ENABLE) && !PIN_EXISTS(CASE_LIGHT) + #define CASE_LIGHT_PIN 44 // Define before RAMPS pins include #endif - #define BOARD_NAME "Azteeg X3 Pro" #include "pins_RAMPS.h" @@ -42,8 +41,8 @@ #endif // DIGIPOT slave addresses -#define DIGIPOT_I2C_ADDRESS_A 0x2C // unshifted slave address for first DIGIPOT 0x2C (0x58 <- 0x2C << 1) -#define DIGIPOT_I2C_ADDRESS_B 0x2E // unshifted slave address for second DIGIPOT 0x2E (0x5C <- 0x2E << 1) +#define DIGIPOT_I2C_ADDRESS_A 0x2C // unshifted slave address for first DIGIPOT 0x2C (0x58 <- 0x2C << 1) +#define DIGIPOT_I2C_ADDRESS_B 0x2E // unshifted slave address for second DIGIPOT 0x2E (0x5C <- 0x2E << 1) // // Servos @@ -118,10 +117,10 @@ #define HEATER_7_PIN 11 #undef FAN_PIN -#define FAN_PIN 6 // Part Cooling System +#define FAN_PIN 6 // Part Cooling System #ifndef CONTROLLER_FAN_PIN - #define CONTROLLER_FAN_PIN 4 // Pin used for the fan to cool motherboard (-1 to disable) + #define CONTROLLER_FAN_PIN 4 // Pin used for the fan to cool motherboard (-1 to disable) #endif // Fans/Water Pump to cool the hotend cool side. @@ -150,9 +149,9 @@ // Misc. Functions // #if ENABLED(CASE_LIGHT_ENABLE) && PIN_EXISTS(CASE_LIGHT) && defined(DOGLCD_A0) && DOGLCD_A0 == CASE_LIGHT_PIN - #undef DOGLCD_A0 // Steal pin 44 for the case light; if you have a Viki2 and have connected it - #define DOGLCD_A0 57 // following the Panucatt wiring diagram, you may need to tweak these pin assignments - // as the wiring diagram uses pin 44 for DOGLCD_A0 + #undef DOGLCD_A0 // Steal pin 44 for the case light; if you have a Viki2 and have connected it + #define DOGLCD_A0 57 // following the Panucatt wiring diagram, you may need to tweak these pin assignments + // as the wiring diagram uses pin 44 for DOGLCD_A0 #endif // @@ -162,13 +161,13 @@ #undef SPINDLE_LASER_ENABLE_PIN #undef SPINDLE_DIR_PIN -#if ENABLED(SPINDLE_LASER_ENABLE) // use EXP2 header +#if ENABLED(SPINDLE_LASER_ENABLE) // EXP2 header #if ENABLED(VIKI2) || ENABLED(miniVIKI) #undef BTN_EN2 - #define BTN_EN2 31 // need 7 for the spindle speed PWM + #define BTN_EN2 31 // need 7 for the spindle speed PWM #endif - #define SPINDLE_LASER_PWM_PIN 7 // must have a hardware PWM - #define SPINDLE_LASER_ENABLE_PIN 20 // Pin should have a pullup! + #define SPINDLE_LASER_PWM_PIN 7 // must have a hardware PWM + #define SPINDLE_LASER_ENABLE_PIN 20 // Pin should have a pullup! #define SPINDLE_DIR_PIN 21 #endif diff --git a/Marlin/pins_BAM_DICE_DUE.h b/Marlin/pins_BAM_DICE_DUE.h index 2b34cddd83..d763392c5d 100644 --- a/Marlin/pins_BAM_DICE_DUE.h +++ b/Marlin/pins_BAM_DICE_DUE.h @@ -33,9 +33,9 @@ // // M3/M4/M5 - Spindle/Laser Control // -#define SPINDLE_LASER_ENABLE_PIN 66 // Pin should have a pullup/pulldown! +#define SPINDLE_LASER_ENABLE_PIN 66 // Pin should have a pullup/pulldown! #define SPINDLE_DIR_PIN 67 -#define SPINDLE_LASER_PWM_PIN 44 // MUST BE HARDWARE PWM +#define SPINDLE_LASER_PWM_PIN 44 // MUST BE HARDWARE PWM #include "pins_RAMPS.h" diff --git a/Marlin/pins_BQ_ZUM_MEGA_3D.h b/Marlin/pins_BQ_ZUM_MEGA_3D.h index f20f9b54d9..f80379eda2 100644 --- a/Marlin/pins_BQ_ZUM_MEGA_3D.h +++ b/Marlin/pins_BQ_ZUM_MEGA_3D.h @@ -49,13 +49,13 @@ // // Misc. Functions // -#define CASE_LIGHT_PIN 44 // MUST BE HARDWARE PWM +#define CASE_LIGHT_PIN 44 // MUST BE HARDWARE PWM // // M3/M4/M5 - Spindle/Laser Control // -#define SPINDLE_LASER_ENABLE_PIN 40 // Pin should have a pullup/pulldown! -#define SPINDLE_LASER_PWM_PIN 44 // MUST BE HARDWARE PWM +#define SPINDLE_LASER_ENABLE_PIN 40 // Pin should have a pullup/pulldown! +#define SPINDLE_LASER_PWM_PIN 44 // MUST BE HARDWARE PWM #define SPINDLE_DIR_PIN 42 #include "pins_RAMPS_13.h" @@ -64,16 +64,16 @@ // Limit Switches // #undef X_MAX_PIN -#define X_MAX_PIN 79 // 2 +#define X_MAX_PIN 79 // 2 // // Z Probe (when not Z_MIN_PIN) // #undef Z_MIN_PROBE_PIN -#define Z_MIN_PROBE_PIN 19 // IND_S_5V +#define Z_MIN_PROBE_PIN 19 // IND_S_5V #undef Z_ENABLE_PIN -#define Z_ENABLE_PIN 77 // 62 +#define Z_ENABLE_PIN 77 // 62 // // Steppers @@ -93,8 +93,8 @@ // // Misc. Functions // -#undef PS_ON_PIN // 12 -#define PS_ON_PIN 81 // External Power Supply +#undef PS_ON_PIN // 12 +#define PS_ON_PIN 81 // External Power Supply // This board has headers for Z-min, Z-max and IND_S_5V *but* as the bq team @@ -104,8 +104,8 @@ #ifdef Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN #undef Z_MIN_PIN #undef Z_MAX_PIN - #define Z_MIN_PIN 19 // IND_S_5V - #define Z_MAX_PIN 18 // Z-MIN Label + #define Z_MIN_PIN 19 // IND_S_5V + #define Z_MAX_PIN 18 // Z-MIN Label #endif diff --git a/Marlin/pins_CNCONTROLS_11.h b/Marlin/pins_CNCONTROLS_11.h index 265d1b6aa3..8535288ece 100644 --- a/Marlin/pins_CNCONTROLS_11.h +++ b/Marlin/pins_CNCONTROLS_11.h @@ -65,7 +65,7 @@ #define HEATER_3_PIN 46 #define HEATER_BED_PIN 2 -//#define FAN_PIN 7 // common PWM pin for all tools +//#define FAN_PIN 7 // common PWM pin for all tools #define ORIG_E0_AUTO_FAN_PIN 7 #define ORIG_E1_AUTO_FAN_PIN 7 @@ -84,7 +84,7 @@ //#define TOOL_1_PIN 59 //#define TOOL_2_PIN 8 //#define TOOL_3_PIN 30 -//#define TOOL_PWM_PIN 7 // common PWM pin for all tools +//#define TOOL_PWM_PIN 7 // common PWM pin for all tools // Common I/O diff --git a/Marlin/pins_CNCONTROLS_12.h b/Marlin/pins_CNCONTROLS_12.h index 5cf462a940..9a849916f0 100644 --- a/Marlin/pins_CNCONTROLS_12.h +++ b/Marlin/pins_CNCONTROLS_12.h @@ -65,7 +65,7 @@ #define HEATER_3_PIN 3 #define HEATER_BED_PIN 24 -#define FAN_PIN 5 // 5 is PWMtool3 -> 7 is common PWM pin for all tools +#define FAN_PIN 5 // 5 is PWMtool3 -> 7 is common PWM pin for all tools #define ORIG_E0_AUTO_FAN_PIN 7 #define ORIG_E1_AUTO_FAN_PIN 7 @@ -81,9 +81,9 @@ // Tools //#define TOOL_0_PIN 56 -//#define TOOL_0_PWM_PIN 10 // red warning led at dual extruder +//#define TOOL_0_PWM_PIN 10 // red warning led at dual extruder //#define TOOL_1_PIN 59 -//#define TOOL_1_PWM_PIN 8 // lights at dual extruder +//#define TOOL_1_PWM_PIN 8 // lights at dual extruder //#define TOOL_2_PIN 4 //#define TOOL_2_PWM_PIN 5 //#define TOOL_3_PIN 14 diff --git a/Marlin/pins_EINSY_RAMBO.h b/Marlin/pins_EINSY_RAMBO.h index c6da8ea658..b86e1530ac 100644 --- a/Marlin/pins_EINSY_RAMBO.h +++ b/Marlin/pins_EINSY_RAMBO.h @@ -28,8 +28,7 @@ #error "Oops! Make sure you have 'Arduino Mega 2560 or Rambo' selected from the 'Tools -> Boards' menu." #endif -#define BOARD_NAME "Einsy Rambo" -#define LARGE_FLASH true +#define BOARD_NAME "Einsy Rambo" // // TMC2130 Configuration_adv defaults for EinsyRambo @@ -41,10 +40,10 @@ #endif // TMC2130 Diag Pins (currently just for reference) -#define X_DIAG_PIN 64 -#define Y_DIAG_PIN 69 -#define Z_DIAG_PIN 68 -#define E0_DIAG_PIN 65 +#define X_DIAG_PIN 64 +#define Y_DIAG_PIN 69 +#define Z_DIAG_PIN 68 +#define E0_DIAG_PIN 65 // // Limit Switches @@ -55,26 +54,22 @@ // SERVO0_PIN and Z_MIN_PIN configuration for BLTOUCH sensor when combined with SENSORLESS_HOMING. // -#define X_MAX_PIN -1 -#define Y_MAX_PIN -1 -#define Z_MAX_PIN -1 - #if DISABLED(SENSORLESS_HOMING) - #define X_MIN_PIN 12 - #define Y_MIN_PIN 11 - #define Z_MIN_PIN 10 + #define X_STOP_PIN 12 + #define Y_STOP_PIN 11 + #define Z_STOP_PIN 10 #else - #define X_MIN_PIN X_DIAG_PIN - #define Y_MIN_PIN Y_DIAG_PIN + #define X_STOP_PIN X_DIAG_PIN + #define Y_STOP_PIN Y_DIAG_PIN #if ENABLED(BLTOUCH) - #define Z_MIN_PIN 11 // Y-MIN - #define SERVO0_PIN 10 // Z-MIN + #define Z_STOP_PIN 11 // Y-MIN + #define SERVO0_PIN 10 // Z-MIN #else - #define Z_MIN_PIN 10 + #define Z_STOP_PIN 10 #endif #endif @@ -109,20 +104,6 @@ #define E0_ENABLE_PIN 26 #define E0_CS_PIN 66 -#define E1_STEP_PIN -1 -#define E1_DIR_PIN -1 -#define E1_ENABLE_PIN -1 - -// Microstepping pins - uses SPI instead -#define X_MS1_PIN -1 -#define X_MS2_PIN -1 -#define Y_MS1_PIN -1 -#define Y_MS2_PIN -1 -#define Z_MS1_PIN -1 -#define Z_MS2_PIN -1 -#define E0_MS1_PIN -1 -#define E0_MS2_PIN -1 - // // Temperature Sensors // @@ -134,8 +115,6 @@ // Heaters / Fans // #define HEATER_0_PIN 3 -#define HEATER_1_PIN -1 -#define HEATER_2_PIN -1 #define HEATER_BED_PIN 4 #define FAN_PIN 8 @@ -152,8 +131,8 @@ // M3/M4/M5 - Spindle/Laser Control // // use P1 connector for spindle pins -#define SPINDLE_LASER_PWM_PIN 9 // MUST BE HARDWARE PWM -#define SPINDLE_LASER_ENABLE_PIN 18 // Pin should have a pullup! +#define SPINDLE_LASER_PWM_PIN 9 // MUST BE HARDWARE PWM +#define SPINDLE_LASER_ENABLE_PIN 18 // Pin should have a pullup! #define SPINDLE_DIR_PIN 19 // @@ -161,14 +140,14 @@ // #define E_MUX0_PIN 17 #define E_MUX1_PIN 16 -#define E_MUX2_PIN 78 // 84 in MK2 Firmware, with BEEPER as 78 +#define E_MUX2_PIN 78 // 84 in MK2 Firmware, with BEEPER as 78 // // LCD / Controller // #if ENABLED(ULTRA_LCD) - #define KILL_PIN 32 + #define KILL_PIN 32 #if ENABLED(NEWPANEL) @@ -189,8 +168,8 @@ #define BTN_EN2 72 #endif - #define BTN_ENC 9 // AUX-2 - #define BEEPER_PIN 84 // AUX-4 + #define BTN_ENC 9 // AUX-2 + #define BEEPER_PIN 84 // AUX-4 #define SD_DETECT_PIN 15 #endif // NEWPANEL diff --git a/Marlin/pins_EINSY_RETRO.h b/Marlin/pins_EINSY_RETRO.h new file mode 100644 index 0000000000..4b46427f30 --- /dev/null +++ b/Marlin/pins_EINSY_RETRO.h @@ -0,0 +1,193 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * Einsy-Retro pin assignments + */ + +#ifndef __AVR_ATmega2560__ + #error "Oops! Make sure you have 'Arduino Mega 2560 or Rambo' selected from the 'Tools -> Boards' menu." +#endif + +#define BOARD_NAME "Einsy Retro" + +// +// TMC2130 Configuration_adv defaults for EinsyRetro +// +#if DISABLED(HAVE_TMC2130) + #error "You must enable TMC2130 support in Configuration_adv.h for EinsyRetro." +#elif DISABLED(X_IS_TMC2130) || DISABLED(Y_IS_TMC2130) || DISABLED(Z_IS_TMC2130) || DISABLED(E0_IS_TMC2130) + #error "You must enable ([XYZ]|E0)_IS_TMC2130 in Configuration_adv.h for EinsyRetro." +#endif + +// TMC2130 Diag Pins (currently just for reference) +#define X_DIAG_PIN 64 +#define Y_DIAG_PIN 69 +#define Z_DIAG_PIN 68 +#define E0_DIAG_PIN 65 + +// +// Limit Switches +// +// Only use Diag Pins when SENSORLESS_HOMING is enabled for the TMC2130 drivers. +// Otherwise use a physical endstop based configuration. +// +// SERVO0_PIN and Z_MIN_PIN configuration for BLTOUCH sensor when combined with SENSORLESS_HOMING. +// + +#if DISABLED(SENSORLESS_HOMING) + + #define X_MIN_PIN 12 + #define Y_MIN_PIN 11 + #define Z_MIN_PIN 10 + #define X_MAX_PIN 81 + #define Y_MAX_PIN 57 + +#else + + #if X_HOME_DIR == -1 + #define X_MIN_PIN X_DIAG_PIN + #define X_MAX_PIN 81 + #else + #define X_MIN_PIN 12 + #define X_MAX_PIN X_DIAG_PIN + #endif + + #if Y_HOME_DIR == -1 + #define Y_MIN_PIN Y_DIAG_PIN + #define Y_MAX_PIN 57 + #else + #define Y_MIN_PIN 11 + #define Y_MAX_PIN Y_DIAG_PIN + #endif + + #if ENABLED(BLTOUCH) + #define Z_MIN_PIN 11 // Y-MIN + #define SERVO0_PIN 10 // Z-MIN + #else + #define Z_MIN_PIN 10 + #endif + +#endif + +#define Z_MAX_PIN 7 + +// +// Z Probe (when not Z_MIN_PIN) +// +#ifndef Z_MIN_PROBE_PIN + #define Z_MIN_PROBE_PIN 10 +#endif + +// +// Steppers +// +#define X_STEP_PIN 37 +#define X_DIR_PIN 49 +#define X_ENABLE_PIN 29 +#define X_CS_PIN 41 + +#define Y_STEP_PIN 36 +#define Y_DIR_PIN 48 +#define Y_ENABLE_PIN 28 +#define Y_CS_PIN 39 + +#define Z_STEP_PIN 35 +#define Z_DIR_PIN 47 +#define Z_ENABLE_PIN 27 +#define Z_CS_PIN 67 + +#define E0_STEP_PIN 34 +#define E0_DIR_PIN 43 +#define E0_ENABLE_PIN 26 +#define E0_CS_PIN 66 + +// +// Temperature Sensors +// +#define TEMP_0_PIN 0 // Analog Input +#define TEMP_1_PIN 1 // Analog Input +#define TEMP_BED_PIN 2 // Analog Input + +// +// Heaters / Fans +// +#define HEATER_0_PIN 3 +#define HEATER_BED_PIN 4 + +#define FAN_PIN 8 +#define FAN1_PIN 6 + +// +// Misc. Functions +// +#define SDSS 53 +#define LED_PIN 13 +#define CASE_LIGHT_PIN 9 + +// +// M3/M4/M5 - Spindle/Laser Control +// +// use P1 connector for spindle pins +#define SPINDLE_LASER_PWM_PIN 9 // MUST BE HARDWARE PWM +#define SPINDLE_LASER_ENABLE_PIN 18 // Pin should have a pullup! +#define SPINDLE_DIR_PIN 19 + +// +// Průša i3 MK2 Multiplexer Support +// +#define E_MUX0_PIN 17 +#define E_MUX1_PIN 16 +#define E_MUX2_PIN 78 // 84 in MK2 Firmware, with BEEPER as 78 + +// +// LCD / Controller +// +#if ENABLED(ULTRA_LCD) + + #define KILL_PIN 32 + + #if ENABLED(NEWPANEL) + + #if ENABLED(CR10_STOCKDISPLAY) + #define LCD_PINS_RS 85 + #define LCD_PINS_ENABLE 71 + #define LCD_PINS_D4 70 + #define BTN_EN1 18 + #define BTN_EN2 19 + #else + #define LCD_PINS_RS 82 + #define LCD_PINS_ENABLE 18 + #define LCD_PINS_D4 19 + #define LCD_PINS_D5 70 + #define LCD_PINS_D6 85 + #define LCD_PINS_D7 71 + #define BTN_EN1 14 + #define BTN_EN2 72 + #endif + + #define BTN_ENC 9 // AUX-2 + #define BEEPER_PIN 84 // AUX-4 + #define SD_DETECT_PIN 15 + + #endif // NEWPANEL +#endif // ULTRA_LCD diff --git a/Marlin/pins_ELEFU_3.h b/Marlin/pins_ELEFU_3.h index 51bd078648..12631a901f 100644 --- a/Marlin/pins_ELEFU_3.h +++ b/Marlin/pins_ELEFU_3.h @@ -85,18 +85,18 @@ // // Heaters / Fans // -#define HEATER_0_PIN 45 // 12V PWM1 -#define HEATER_1_PIN 46 // 12V PWM2 -#define HEATER_2_PIN 17 // 12V PWM3 -#define HEATER_BED_PIN 44 // DOUBLE 12V PWM +#define HEATER_0_PIN 45 // 12V PWM1 +#define HEATER_1_PIN 46 // 12V PWM2 +#define HEATER_2_PIN 17 // 12V PWM3 +#define HEATER_BED_PIN 44 // DOUBLE 12V PWM -#define FAN_PIN 16 // 5V PWM +#define FAN_PIN 16 // 5V PWM // // Misc. Functions // -#define PS_ON_PIN 10 // Set to -1 if using a manual switch on the PWRSW Connector -#define SLEEP_WAKE_PIN 26 // This feature still needs work +#define PS_ON_PIN 10 // Set to -1 if using a manual switch on the PWRSW Connector +#define SLEEP_WAKE_PIN 26 // This feature still needs work #define PHOTOGRAPH_PIN 29 // @@ -122,28 +122,28 @@ #define TLC_XLAT_PIN 22 #define TLC_DATA_PIN 24 - // We also need to define pin to port number mapping for the 2560 to match the pins listed above. If you change the TLC pins, update this as well per the 2560 datasheet! - // This currently only works with the RA Board. - #define TLC_CLOCK_BIT 3 // bit 3 on port A - #define TLC_CLOCK_PORT &PORTA // bit 3 on port A + // We also need to define pin to port number mapping for the 2560 to match the pins listed above. + // If you change the TLC pins, update this as well per the 2560 datasheet! This currently only works with the RA Board. + #define TLC_CLOCK_BIT 3 + #define TLC_CLOCK_PORT &PORTA - #define TLC_BLANK_BIT 1 // bit 1 on port A - #define TLC_BLANK_PORT &PORTA // bit 1 on port A + #define TLC_BLANK_BIT 1 + #define TLC_BLANK_PORT &PORTA - #define TLC_DATA_BIT 2 // bit 2 on port A - #define TLC_DATA_PORT &PORTA // bit 2 on port A + #define TLC_DATA_BIT 2 + #define TLC_DATA_PORT &PORTA - #define TLC_XLAT_BIT 0 // bit 0 on port A - #define TLC_XLAT_PORT &PORTA // bit 0 on port A + #define TLC_XLAT_BIT 0 + #define TLC_XLAT_PORT &PORTA - // change this to match your situation. Lots of TLCs takes up the arduino SRAM very quickly, so be careful + // Change this to match your situation. Lots of TLCs takes up the arduino SRAM very quickly, so be careful // Leave it at at least 1 if you have enabled RA_LIGHTING // The number of TLC5947 boards chained together for use with the animation, additional ones will repeat the animation on them, but are not individually addressable and mimic those before them. You can leave the default at 2 even if you only have 1 TLC5947 module. - #define NUM_TLCS 2 + #define NUM_TLCS 2 // These TRANS_ARRAY values let you change the order the LEDs on the lighting modules will animate for chase functions. // Modify them according to your specific situation. // NOTE: the array should be 8 long for every TLC you have. These defaults assume (2) TLCs. - #define TRANS_ARRAY {0, 1, 2, 3, 4, 5, 6, 7, 15, 14, 13, 12, 11, 10, 9, 8} //forwards - //#define TRANS_ARRAY {7, 6, 5, 4, 3, 2, 1, 0, 8, 9, 10, 11, 12, 13, 14, 15} //backwards + #define TRANS_ARRAY { 0, 1, 2, 3, 4, 5, 6, 7, 15, 14, 13, 12, 11, 10, 9, 8 } // forward + //#define TRANS_ARRAY { 7, 6, 5, 4, 3, 2, 1, 0, 8, 9, 10, 11, 12, 13, 14, 15 } // backward #endif // RA_DISCO diff --git a/Marlin/pins_GEN7_12.h b/Marlin/pins_GEN7_12.h index b0f178ff34..3bc38d7ee7 100644 --- a/Marlin/pins_GEN7_12.h +++ b/Marlin/pins_GEN7_12.h @@ -60,7 +60,7 @@ #endif #ifndef GEN7_VERSION - #define GEN7_VERSION 12 // v1.x + #define GEN7_VERSION 12 // v1.x #endif // @@ -122,9 +122,9 @@ #define PS_ON_PIN 15 #if GEN7_VERSION < 13 - #define CASE_LIGHT_PIN 16 // MUST BE HARDWARE PWM + #define CASE_LIGHT_PIN 16 // MUST BE HARDWARE PWM #else // Gen7 v1.3 removed the I2C connector & signals so need to get PWM off the PC power supply header - #define CASE_LIGHT_PIN 15 // MUST BE HARDWARE PWM + #define CASE_LIGHT_PIN 15 // MUST BE HARDWARE PWM #endif // All these generations of Gen7 supply thermistor power @@ -140,10 +140,10 @@ // // M3/M4/M5 - Spindle/Laser Control // -#define SPINDLE_LASER_ENABLE_PIN 10 // Pin should have a pullup/pulldown! +#define SPINDLE_LASER_ENABLE_PIN 10 // Pin should have a pullup/pulldown! #define SPINDLE_DIR_PIN 11 #if GEN7_VERSION < 13 - #define SPINDLE_LASER_PWM_PIN 16 // MUST BE HARDWARE PWM + #define SPINDLE_LASER_PWM_PIN 16 // MUST BE HARDWARE PWM #else // Gen7 v1.3 removed the I2C connector & signals so need to get PWM off the PC power supply header - #define SPINDLE_LASER_PWM_PIN 15 // MUST BE HARDWARE PWM + #define SPINDLE_LASER_PWM_PIN 15 // MUST BE HARDWARE PWM #endif diff --git a/Marlin/pins_GEN7_13.h b/Marlin/pins_GEN7_13.h index 03ea131f46..749a6c3389 100644 --- a/Marlin/pins_GEN7_13.h +++ b/Marlin/pins_GEN7_13.h @@ -51,5 +51,5 @@ #define BOARD_NAME "Gen7 v1.3" -#define GEN7_VERSION 13 // v1.3 +#define GEN7_VERSION 13 // v1.3 #include "pins_GEN7_12.h" diff --git a/Marlin/pins_GEN7_14.h b/Marlin/pins_GEN7_14.h index 9d4e16af33..dedd227ca0 100644 --- a/Marlin/pins_GEN7_14.h +++ b/Marlin/pins_GEN7_14.h @@ -57,7 +57,7 @@ #define BOARD_NAME "Gen7 v1.4" -#define GEN7_VERSION 14 // v1.4 +#define GEN7_VERSION 14 // v1.4 // // Limit switches @@ -113,6 +113,6 @@ // // M3/M4/M5 - Spindle/Laser Control // -#define SPINDLE_LASER_ENABLE_PIN 20 // Pin should have a pullup/pulldown! -#define SPINDLE_LASER_PWM_PIN 16 // MUST BE HARDWARE PWM +#define SPINDLE_LASER_ENABLE_PIN 20 // Pin should have a pullup/pulldown! +#define SPINDLE_LASER_PWM_PIN 16 // MUST BE HARDWARE PWM #define SPINDLE_DIR_PIN 21 diff --git a/Marlin/pins_GEN7_CUSTOM.h b/Marlin/pins_GEN7_CUSTOM.h index d64e94e2d3..fdfb6b5fa1 100644 --- a/Marlin/pins_GEN7_CUSTOM.h +++ b/Marlin/pins_GEN7_CUSTOM.h @@ -133,6 +133,6 @@ // // M3/M4/M5 - Spindle/Laser Control // -#define SPINDLE_LASER_ENABLE_PIN 5 // Pin should have a pullup/pulldown! -#define SPINDLE_LASER_PWM_PIN 16 // MUST BE HARDWARE PWM +#define SPINDLE_LASER_ENABLE_PIN 5 // Pin should have a pullup/pulldown! +#define SPINDLE_LASER_PWM_PIN 16 // MUST BE HARDWARE PWM #define SPINDLE_DIR_PIN 6 diff --git a/Marlin/pins_GT2560_REV_A.h b/Marlin/pins_GT2560_REV_A.h index cb4892015e..73b32bb40c 100644 --- a/Marlin/pins_GT2560_REV_A.h +++ b/Marlin/pins_GT2560_REV_A.h @@ -90,7 +90,7 @@ #define SDSS 53 #define LED_PIN 13 #define PS_ON_PIN 12 -#define SUICIDE_PIN 54 // Must be enabled at startup to keep power flowing +#define SUICIDE_PIN 54 // Must be enabled at startup to keep power flowing #define KILL_PIN -1 #if ENABLED(ULTRA_LCD) diff --git a/Marlin/pins_MEGACONTROLLER.h b/Marlin/pins_MEGACONTROLLER.h index f5660547aa..b2631901be 100644 --- a/Marlin/pins_MEGACONTROLLER.h +++ b/Marlin/pins_MEGACONTROLLER.h @@ -138,7 +138,7 @@ // Pins for DOGM SPI LCD Support #define DOGLCD_A0 47 #define DOGLCD_CS 45 - #define LCD_BACKLIGHT_PIN 44 // backlight LED on PA3 + #define LCD_BACKLIGHT_PIN 44 // backlight LED on PA3 #define KILL_PIN 12 // GLCD features @@ -159,6 +159,6 @@ // // M3/M4/M5 - Spindle/Laser Control // -#define SPINDLE_LASER_PWM_PIN 6 // MUST BE HARDWARE PWM -#define SPINDLE_LASER_ENABLE_PIN 7 // Pin should have a pullup! +#define SPINDLE_LASER_PWM_PIN 6 // MUST BE HARDWARE PWM +#define SPINDLE_LASER_ENABLE_PIN 7 // Pin should have a pullup! #define SPINDLE_DIR_PIN 8 diff --git a/Marlin/pins_MEGATRONICS.h b/Marlin/pins_MEGATRONICS.h index 702cf98865..acf1da0160 100644 --- a/Marlin/pins_MEGATRONICS.h +++ b/Marlin/pins_MEGATRONICS.h @@ -123,6 +123,6 @@ // // M3/M4/M5 - Spindle/Laser Control // -#define SPINDLE_LASER_PWM_PIN 3 // MUST BE HARDWARE PWM -#define SPINDLE_LASER_ENABLE_PIN 4 // Pin should have a pullup! +#define SPINDLE_LASER_PWM_PIN 3 // MUST BE HARDWARE PWM +#define SPINDLE_LASER_ENABLE_PIN 4 // Pin should have a pullup! #define SPINDLE_DIR_PIN 11 diff --git a/Marlin/pins_MEGATRONICS_2.h b/Marlin/pins_MEGATRONICS_2.h index 2609d20653..2ae436674b 100644 --- a/Marlin/pins_MEGATRONICS_2.h +++ b/Marlin/pins_MEGATRONICS_2.h @@ -53,13 +53,13 @@ #define X_DIR_PIN 27 #define X_ENABLE_PIN 25 -#define Y_STEP_PIN 4 // A6 -#define Y_DIR_PIN 54 // A0 +#define Y_STEP_PIN 4 // A6 +#define Y_DIR_PIN 54 // A0 #define Y_ENABLE_PIN 5 -#define Z_STEP_PIN 56 // A2 -#define Z_DIR_PIN 60 // A6 -#define Z_ENABLE_PIN 55 // A1 +#define Z_STEP_PIN 56 // A2 +#define Z_DIR_PIN 60 // A6 +#define Z_ENABLE_PIN 55 // A1 #define E0_STEP_PIN 35 #define E0_DIR_PIN 36 @@ -69,8 +69,8 @@ #define E1_DIR_PIN 39 #define E1_ENABLE_PIN 28 -#define E2_STEP_PIN 23 // ? schematic says 24 -#define E2_DIR_PIN 24 // ? schematic says 23 +#define E2_STEP_PIN 23 // ? schematic says 24 +#define E2_DIR_PIN 24 // ? schematic says 23 #define E2_ENABLE_PIN 22 // @@ -138,6 +138,6 @@ // // M3/M4/M5 - Spindle/Laser Control // -#define SPINDLE_LASER_PWM_PIN 3 // MUST BE HARDWARE PWM -#define SPINDLE_LASER_ENABLE_PIN 16 // Pin should have a pullup! -#define SPINDLE_DIR_PIN 11 +#define SPINDLE_LASER_PWM_PIN 3 // MUST BE HARDWARE PWM +#define SPINDLE_LASER_ENABLE_PIN 16 // Pin should have a pullup! +#define SPINDLE_DIR_PIN 11 diff --git a/Marlin/pins_MEGATRONICS_3.h b/Marlin/pins_MEGATRONICS_3.h index 7b66361d3c..c638b27865 100644 --- a/Marlin/pins_MEGATRONICS_3.h +++ b/Marlin/pins_MEGATRONICS_3.h @@ -37,10 +37,10 @@ // // Servos // -#define SERVO0_PIN 46 // AUX3-6 -#define SERVO1_PIN 47 // AUX3-5 -#define SERVO2_PIN 48 // AUX3-4 -#define SERVO3_PIN 49 // AUX3-3 +#define SERVO0_PIN 46 // AUX3-6 +#define SERVO1_PIN 47 // AUX3-5 +#define SERVO2_PIN 48 // AUX3-4 +#define SERVO3_PIN 49 // AUX3-3 // // Limit Switches @@ -168,9 +168,9 @@ // // M3/M4/M5 - Spindle/Laser Control // -#if DISABLED(REPRAPWORLD_KEYPAD) // try to use the keypad connector first - #define SPINDLE_LASER_PWM_PIN 44 // MUST BE HARDWARE PWM - #define SPINDLE_LASER_ENABLE_PIN 43 // Pin should have a pullup! +#if DISABLED(REPRAPWORLD_KEYPAD) // try to use the keypad connector first + #define SPINDLE_LASER_PWM_PIN 44 // MUST BE HARDWARE PWM + #define SPINDLE_LASER_ENABLE_PIN 43 // Pin should have a pullup! #define SPINDLE_DIR_PIN 42 #elif EXTRUDERS <= 2 // Hijack the last extruder so that we can get the PWM signal off the Y breakout @@ -184,7 +184,7 @@ #define Y_ENABLE_PIN 23 #define Y_STEP_PIN 22 #define Y_DIR_PIN 60 - #define SPINDLE_LASER_PWM_PIN 4 // MUST BE HARDWARE PWM - #define SPINDLE_LASER_ENABLE_PIN 17 // Pin should have a pullup! + #define SPINDLE_LASER_PWM_PIN 4 // MUST BE HARDWARE PWM + #define SPINDLE_LASER_ENABLE_PIN 17 // Pin should have a pullup! #define SPINDLE_DIR_PIN 5 #endif diff --git a/Marlin/pins_MELZI_CREALITY.h b/Marlin/pins_MELZI_CREALITY.h index da8ca1549b..b42075b76d 100644 --- a/Marlin/pins_MELZI_CREALITY.h +++ b/Marlin/pins_MELZI_CREALITY.h @@ -47,11 +47,11 @@ #undef LCD_PINS_D7 #undef FIL_RUNOUT_PIN -#define LCD_SDSS 31 // Smart Controller SD card reader (rather than the Melzi) -#define LCD_PINS_RS 28 // st9720 CS -#define LCD_PINS_ENABLE 17 // st9720 DAT -#define LCD_PINS_D4 30 // st9720 CLK -#define FIL_RUNOUT_PIN -1 // Uses Beeper/LED Pin Pulled to GND +#define LCD_SDSS 31 // Smart Controller SD card reader (rather than the Melzi) +#define LCD_PINS_RS 28 // ST9720 CS +#define LCD_PINS_ENABLE 17 // ST9720 DAT +#define LCD_PINS_D4 30 // ST9720 CLK +#define FIL_RUNOUT_PIN -1 // Uses Beeper/LED Pin Pulled to GND // Alter timing for graphical display #ifndef ST7920_DELAY_1 diff --git a/Marlin/pins_MELZI_MALYAN.h b/Marlin/pins_MELZI_MALYAN.h index b11160f8e2..3888b537d1 100644 --- a/Marlin/pins_MELZI_MALYAN.h +++ b/Marlin/pins_MELZI_MALYAN.h @@ -35,12 +35,12 @@ #undef BTN_EN2 #undef BTN_ENC -#define LCD_PINS_RS 17 // st9720 CS -#define LCD_PINS_ENABLE 16 // st9720 DAT -#define LCD_PINS_D4 11 // st9720 CLK -#define BTN_EN1 30 -#define BTN_EN2 29 -#define BTN_ENC 28 +#define LCD_PINS_RS 17 // ST9720 CS +#define LCD_PINS_ENABLE 16 // ST9720 DAT +#define LCD_PINS_D4 11 // ST9720 CLK +#define BTN_EN1 30 +#define BTN_EN2 29 +#define BTN_ENC 28 // Alter timing for graphical display #ifndef ST7920_DELAY_1 diff --git a/Marlin/pins_MIGHTYBOARD_REVE.h b/Marlin/pins_MIGHTYBOARD_REVE.h index 1e5e4f5f29..9a2fb539b2 100644 --- a/Marlin/pins_MIGHTYBOARD_REVE.h +++ b/Marlin/pins_MIGHTYBOARD_REVE.h @@ -119,7 +119,7 @@ #define DIGIPOTS_I2C_SDA_Z 65 // K3 #define DIGIPOTS_I2C_SDA_E0 27 // A5 #define DIGIPOTS_I2C_SDA_E1 77 // J6 -#define DIGIPOT_I2C_ADDRESS_A 0x2F // unshifted slave address (5E <- 2F << 1) +#define DIGIPOT_I2C_ADDRESS_A 0x2F // unshifted slave address (5E <- 2F << 1) // // Temperature Sensors @@ -267,9 +267,9 @@ // // M3/M4/M5 - Spindle/Laser Control // -#define SPINDLE_LASER_ENABLE_PIN 66 // K4 Pin should have a pullup! -#define SPINDLE_LASER_PWM_PIN 8 // H5 MUST BE HARDWARE PWM -#define SPINDLE_DIR_PIN 67 // K5 +#define SPINDLE_LASER_ENABLE_PIN 66 // K4 Pin should have a pullup! +#define SPINDLE_LASER_PWM_PIN 8 // H5 MUST BE HARDWARE PWM +#define SPINDLE_DIR_PIN 67 // K5 diff --git a/Marlin/pins_MINIRAMBO.h b/Marlin/pins_MINIRAMBO.h index b326112e68..609c0c867c 100644 --- a/Marlin/pins_MINIRAMBO.h +++ b/Marlin/pins_MINIRAMBO.h @@ -122,8 +122,8 @@ // M3/M4/M5 - Spindle/Laser Control // // use P1 connector for spindle pins -#define SPINDLE_LASER_PWM_PIN 9 // MUST BE HARDWARE PWM -#define SPINDLE_LASER_ENABLE_PIN 18 // Pin should have a pullup! +#define SPINDLE_LASER_PWM_PIN 9 // MUST BE HARDWARE PWM +#define SPINDLE_LASER_ENABLE_PIN 18 // Pin should have a pullup! #define SPINDLE_DIR_PIN 19 // diff --git a/Marlin/pins_MINITRONICS.h b/Marlin/pins_MINITRONICS.h index d3ff9edbb0..fe2c9e0b54 100644 --- a/Marlin/pins_MINITRONICS.h +++ b/Marlin/pins_MINITRONICS.h @@ -130,13 +130,13 @@ // #if ENABLED(SPINDLE_LASER_ENABLE) // assumes we're only doing CNC work (no 3D printing) #undef HEATER_BED_PIN - #undef TEMP_BED_PIN // need to free up some pins but also need to - #undef TEMP_0_PIN // re-assign them (to unused pins) because Marlin - #undef TEMP_1_PIN // requires the presence of certain pins or else it - #define HEATER_BED_PIN 4 // won't compile + #undef TEMP_BED_PIN // need to free up some pins but also need to + #undef TEMP_0_PIN // re-assign them (to unused pins) because Marlin + #undef TEMP_1_PIN // requires the presence of certain pins or else it + #define HEATER_BED_PIN 4 // won't compile #define TEMP_BED_PIN 50 #define TEMP_0_PIN 51 - #define SPINDLE_LASER_ENABLE_PIN 52 // using A6 because it already has a pull up on it - #define SPINDLE_LASER_PWM_PIN 3 // WARNING - LED & resistor pull up to +12/+24V stepper voltage + #define SPINDLE_LASER_ENABLE_PIN 52 // using A6 because it already has a pullup + #define SPINDLE_LASER_PWM_PIN 3 // WARNING - LED & resistor pull up to +12/+24V stepper voltage #define SPINDLE_DIR_PIN 53 #endif diff --git a/Marlin/pins_MKS_BASE.h b/Marlin/pins_MKS_BASE.h index dcf9b90f29..65c78e1486 100644 --- a/Marlin/pins_MKS_BASE.h +++ b/Marlin/pins_MKS_BASE.h @@ -43,8 +43,8 @@ // // M3/M4/M5 - Spindle/Laser Control // -#define SPINDLE_LASER_PWM_PIN 2 // MUST BE HARDWARE PWM -#define SPINDLE_LASER_ENABLE_PIN 15 // Pin should have a pullup! +#define SPINDLE_LASER_PWM_PIN 2 // MUST BE HARDWARE PWM +#define SPINDLE_LASER_ENABLE_PIN 15 // Pin should have a pullup! #define SPINDLE_DIR_PIN 19 #include "pins_RAMPS.h" diff --git a/Marlin/pins_MKS_BASE_15.h b/Marlin/pins_MKS_BASE_15.h new file mode 100644 index 0000000000..e9f7050a1b --- /dev/null +++ b/Marlin/pins_MKS_BASE_15.h @@ -0,0 +1,41 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * MKS BASE v1.5 with A4982 stepper drivers and digital micro-stepping + */ + +#include "pins_MKS_BASE.h" + +/** + * Microstepping pins + */ +#define X_MS1_PIN 5 // Digital 3 / Pin 5 / PE3 / SERVO2_PIN +#define X_MS2_PIN 6 // Digital 6 / Pin 14 / PH3 / SERVO1_PIN +#define Y_MS1_PIN 59 // Analog 5 / Pin 92 / PF5 +#define Y_MS2_PIN 58 // Analog 4 / Pin 93 / PF4 +#define Z_MS1_PIN 22 // Digital 22 / Pin 78 / PA0 +#define Z_MS2_PIN 39 // Digital 39 / Pin 70 / PG2 +#define E0_MS1_PIN 63 // Analog 9 / Pin 86 / PK1 +#define E0_MS2_PIN 64 // Analog 10 / Pin 87 / PK2 +#define E1_MS1_PIN 57 // Analog 3 / Pin 93 / PF3 +#define E1_MS2_PIN 4 // Digital 4 / Pin 1 / PG5 / SERVO3_PIN diff --git a/Marlin/pins_MKS_BASE_HEROIC.h b/Marlin/pins_MKS_BASE_HEROIC.h index 444d51503c..84f7280dfa 100644 --- a/Marlin/pins_MKS_BASE_HEROIC.h +++ b/Marlin/pins_MKS_BASE_HEROIC.h @@ -24,23 +24,12 @@ * MKS BASE with Heroic HR4982 stepper drivers */ -#include "pins_MKS_BASE.h" +#include "pins_MKS_BASE_15.h" /** - * Microstepping pins (reverse engineered at V1.4 - due to closed source schematics). * Some new boards use HR4982 (Heroic) instead of the A4982 (Allegro) stepper drivers. - * While most of the functionality is similar, the HR variant obviously doesn't work - * with diode smoothers (no fast decay). And the Heroic has a 128 µStepping mode where - * the A4982 is doing quarter steps (MS1=L / MS2=H). + * Most the functionality is similar, the HR variant obviously doesn't work with diode + * smoothers (no fast decay). And the Heroic has a 128 µStepping mode where the A4982 + * is doing quarter steps (MS1=0, MS2=1). */ #define HEROIC_STEPPER_DRIVERS -#define X_MS1_PIN 5 // Digital 3 / Pin 5 / PE3 / SERVO2_PIN -#define X_MS2_PIN 6 // Digital 6 / Pin 14 / PH3 / SERVO1_PIN -#define Y_MS1_PIN 59 // Analog 5 / Pin 92 / PF5 -#define Y_MS2_PIN 58 // Analog 4 / Pin 93 / PF4 -#define Z_MS1_PIN 22 // Digital 22 / Pin 78 / PA0 -#define Z_MS2_PIN 39 // Digital 39 / Pin 70 / PG2 -#define E0_MS1_PIN 63 // Analog 9 / Pin 86 / PK1 -#define E0_MS2_PIN 64 // Analog 10 / Pin 87 / PK2 -#define E1_MS1_PIN 57 // Analog 3 / Pin 93 / PF3 -#define E1_MS2_PIN 4 // Digital 4 / Pin 1 / PG5 / SERVO3_PIN diff --git a/Marlin/pins_MKS_13.h b/Marlin/pins_MKS_GEN_13.h similarity index 91% rename from Marlin/pins_MKS_13.h rename to Marlin/pins_MKS_GEN_13.h index 07aa658116..70228e2f1f 100644 --- a/Marlin/pins_MKS_13.h +++ b/Marlin/pins_MKS_GEN_13.h @@ -23,17 +23,17 @@ /** * Arduino Mega with RAMPS v1.4 adjusted pin assignments * - * MKS v1.3 (Extruder, Fan, Bed) - * MKS v1.3 (Extruder, Extruder, Fan, Bed) - * MKS v1.4 (Extruder, Fan, Bed) - * MKS v1.4 (Extruder, Extruder, Fan, Bed) + * MKS GEN v1.3 (Extruder, Fan, Bed) + * MKS GEN v1.3 (Extruder, Extruder, Fan, Bed) + * MKS GEN v1.4 (Extruder, Fan, Bed) + * MKS GEN v1.4 (Extruder, Extruder, Fan, Bed) */ #if HOTENDS > 2 || E_STEPPERS > 2 - #error "MKS 1.3/1.4 supports up to 2 hotends / E-steppers. Comment out this line to continue." + #error "MKS GEN 1.3/1.4 supports up to 2 hotends / E-steppers. Comment out this line to continue." #endif -#define BOARD_NAME "MKS > v1.3" +#define BOARD_NAME "MKS GEN > v1.3" // // Heaters / Fans diff --git a/Marlin/pins_PRINTRBOARD.h b/Marlin/pins_PRINTRBOARD.h index 93f4b2b69b..a8197af9a4 100644 --- a/Marlin/pins_PRINTRBOARD.h +++ b/Marlin/pins_PRINTRBOARD.h @@ -148,8 +148,8 @@ #define SDSS 43 // F5 TMS JP2-8 - #define STAT_LED_RED_PIN 12 // C2 JP11-14 - #define STAT_LED_BLUE_PIN 10 // C0 JP11-12 + #define STAT_LED_RED_PIN 12 // C2 JP11-14 + #define STAT_LED_BLUE_PIN 10 // C0 JP11-12 #elif ENABLED(LCD_I2C_PANELOLU2) diff --git a/Marlin/pins_PRINTRBOARD_REVF.h b/Marlin/pins_PRINTRBOARD_REVF.h index 48cf0fb2f6..bf3a023c4d 100644 --- a/Marlin/pins_PRINTRBOARD_REVF.h +++ b/Marlin/pins_PRINTRBOARD_REVF.h @@ -218,29 +218,29 @@ #define SDSS 3 // F5 TMS JP2-8 - #define STAT_LED_RED_PIN 12 // C2 JP11-14 - #define STAT_LED_BLUE_PIN 10 // C0 JP11-12 + #define STAT_LED_RED_PIN 12 // C2 JP11-14 + #define STAT_LED_BLUE_PIN 10 // C0 JP11-12 #elif ENABLED(MINIPANEL) #if DISABLED(USE_INTERNAL_SD) // PIN FASTIO PIN# ATUSB90 PIN# Teensy2.0++ PIN# Printrboard RevF Conn. MKSLCD12864 PIN# - #define SDSS 11 // 36 C1 EXP2-13 EXP2-07 - #define SD_DETECT_PIN 9 // 34 E1 EXP2-11 EXP2-04 + #define SDSS 11 // 36 C1 EXP2-13 EXP2-07 + #define SD_DETECT_PIN 9 // 34 E1 EXP2-11 EXP2-04 #endif // PIN FASTIO PIN# ATUSB90 PIN# Teensy2.0++ PIN# Printrboard RevF Conn. MKSLCD12864 PIN# - #define DOGLCD_A0 4 // 29 D4 EXP2-05 EXP1-04 - #define DOGLCD_CS 5 // 30 D5 EXP2-06 EXP1-05 - #define BTN_ENC 6 // 31 D6 EXP2-07 EXP1-09 - #define BEEPER_PIN 7 // 32 D7 EXP2-08 EXP1-10 - #define KILL_PIN 8 // 33 E0 EXP2-10 EXP2-03 - #define BTN_EN1 10 // 35 C0 EXP2-12 EXP2-06 - #define BTN_EN2 12 // 37 C2 EXP2-14 EXP2-08 - //#define LCD_BACKLIGHT_PIN 43 // 56 F5 EXP1-12 Not Implemented - //#define SCK 21 // 11 B1 ICSP-04 EXP2-09 - //#define MOSI 22 // 12 B2 ICSP-03 EXP2-05 - //#define MISO 23 // 13 B3 ICSP-06 EXP2-05 + #define DOGLCD_A0 4 // 29 D4 EXP2-05 EXP1-04 + #define DOGLCD_CS 5 // 30 D5 EXP2-06 EXP1-05 + #define BTN_ENC 6 // 31 D6 EXP2-07 EXP1-09 + #define BEEPER_PIN 7 // 32 D7 EXP2-08 EXP1-10 + #define KILL_PIN 8 // 33 E0 EXP2-10 EXP2-03 + #define BTN_EN1 10 // 35 C0 EXP2-12 EXP2-06 + #define BTN_EN2 12 // 37 C2 EXP2-14 EXP2-08 + //#define LCD_BACKLIGHT_PIN 43 // 56 F5 EXP1-12 Not Implemented + //#define SCK 21 // 11 B1 ICSP-04 EXP2-09 + //#define MOSI 22 // 12 B2 ICSP-03 EXP2-05 + //#define MISO 23 // 13 B3 ICSP-06 EXP2-05 // increase delays #ifndef ST7920_DELAY_1 @@ -268,7 +268,7 @@ // // PIN FASTIO PIN# ATUSB90 PIN# Teensy2.0++ PIN# Printrboard RevF Conn. #ifndef SDSS - #define SDSS 20 // 10 B0 + #define SDSS 20 // 10 B0 #endif /** diff --git a/Marlin/pins_RAMBO.h b/Marlin/pins_RAMBO.h index b294a169fc..bcc1b4f62d 100644 --- a/Marlin/pins_RAMBO.h +++ b/Marlin/pins_RAMBO.h @@ -49,10 +49,10 @@ // // Servos // -#define SERVO0_PIN 22 // Motor header MX1 -#define SERVO1_PIN 23 // Motor header MX2 -#define SERVO2_PIN 24 // Motor header MX3 -#define SERVO3_PIN 5 // PWM header pin 5 +#define SERVO0_PIN 22 // Motor header MX1 +#define SERVO1_PIN 23 // Motor header MX2 +#define SERVO2_PIN 24 // Motor header MX3 +#define SERVO3_PIN 5 // PWM header pin 5 // // Limit Switches @@ -107,7 +107,7 @@ #define E1_MS2_PIN 64 #define DIGIPOTSS_PIN 38 -#define DIGIPOT_CHANNELS {4,5,3,0,1} // X Y Z E0 E1 digipot channels to stepper driver mapping +#define DIGIPOT_CHANNELS { 4,5,3,0,1 } // X Y Z E0 E1 digipot channels to stepper driver mapping #ifndef DIGIPOT_MOTOR_CURRENT #define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 } // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A) #endif @@ -146,8 +146,8 @@ // // M3/M4/M5 - Spindle/Laser Control // -#define SPINDLE_LASER_PWM_PIN 45 // MUST BE HARDWARE PWM -#define SPINDLE_LASER_ENABLE_PIN 31 // Pin should have a pullup! +#define SPINDLE_LASER_PWM_PIN 45 // MUST BE HARDWARE PWM +#define SPINDLE_LASER_ENABLE_PIN 31 // Pin should have a pullup! #define SPINDLE_DIR_PIN 32 // @@ -155,14 +155,14 @@ // #define E_MUX0_PIN 17 #define E_MUX1_PIN 16 -#define E_MUX2_PIN 84 // 84 in MK2 Firmware +#define E_MUX2_PIN 84 // 84 in MK2 Firmware // // LCD / Controller // #if ENABLED(ULTRA_LCD) - #define KILL_PIN 80 + #define KILL_PIN 80 #if ENABLED(NEWPANEL) @@ -174,32 +174,32 @@ #define LCD_PINS_D7 75 #if ENABLED(VIKI2) || ENABLED(miniVIKI) - #define BEEPER_PIN 44 + #define BEEPER_PIN 44 // NB: Panucatt's Viki 2.0 wiring diagram (v1.2) indicates that the // beeper/buzzer is connected to pin 33; however, the pin used in the // diagram is actually pin 44, so this is correct. - #define DOGLCD_A0 70 - #define DOGLCD_CS 71 + #define DOGLCD_A0 70 + #define DOGLCD_CS 71 #define LCD_SCREEN_ROT_180 - #define BTN_EN1 85 - #define BTN_EN2 84 - #define BTN_ENC 83 + #define BTN_EN1 85 + #define BTN_EN2 84 + #define BTN_ENC 83 - #define SD_DETECT_PIN -1 // Pin 72 if using easy adapter board + #define SD_DETECT_PIN -1 // Pin 72 if using easy adapter board #define STAT_LED_RED_PIN 22 #define STAT_LED_BLUE_PIN 32 #else // !VIKI2 && !miniVIKI - #define BEEPER_PIN 79 // AUX-4 + #define BEEPER_PIN 79 // AUX-4 // AUX-2 - #define BTN_EN1 76 - #define BTN_EN2 77 - #define BTN_ENC 78 + #define BTN_EN1 76 + #define BTN_EN2 77 + #define BTN_ENC 78 #define SD_DETECT_PIN 81 @@ -208,7 +208,7 @@ #else // !NEWPANEL - old style panel with shift register // No Beeper added - #define BEEPER_PIN 33 + #define BEEPER_PIN 33 // buttons are attached to a shift register // Not wired yet diff --git a/Marlin/pins_RAMPS.h b/Marlin/pins_RAMPS.h index 22fddf8cf4..e886a616f6 100644 --- a/Marlin/pins_RAMPS.h +++ b/Marlin/pins_RAMPS.h @@ -56,7 +56,7 @@ // Servos // #ifdef IS_RAMPS_13 - #define SERVO0_PIN 7 // RAMPS_13 // Will conflict with BTN_EN2 on LCD_I2C_VIKI + #define SERVO0_PIN 7 // RAMPS_13 // Will conflict with BTN_EN2 on LCD_I2C_VIKI #else #define SERVO0_PIN 11 #endif @@ -197,9 +197,9 @@ // SPI for Max6675 or Max31855 Thermocouple #if DISABLED(SDSUPPORT) - #define MAX6675_SS 66 // Do not use pin 53 if there is even the remote possibility of using Display/SD card + #define MAX6675_SS 66 // Do not use pin 53 if there is even the remote possibility of using Display/SD card #else - #define MAX6675_SS 66 // Do not use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present + #define MAX6675_SS 66 // Do not use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present #endif // @@ -286,10 +286,10 @@ #if ENABLED(CASE_LIGHT_ENABLE) && !defined(CASE_LIGHT_PIN) && !defined(SPINDLE_LASER_ENABLE_PIN) #if NUM_SERVOS <= 1 // try to use servo connector first - #define CASE_LIGHT_PIN 6 // MUST BE HARDWARE PWM + #define CASE_LIGHT_PIN 6 // MUST BE HARDWARE PWM #elif !(ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL) \ && (ENABLED(PANEL_ONE) || ENABLED(VIKI2) || ENABLED(miniVIKI) || ENABLED(MINIPANEL) || ENABLED(REPRAPWORLD_KEYPAD))) // try to use AUX 2 - #define CASE_LIGHT_PIN 44 // MUST BE HARDWARE PWM + #define CASE_LIGHT_PIN 44 // MUST BE HARDWARE PWM #endif #endif @@ -298,13 +298,13 @@ // #if ENABLED(SPINDLE_LASER_ENABLE) && !PIN_EXISTS(SPINDLE_LASER_ENABLE) #if !defined(NUM_SERVOS) || NUM_SERVOS == 0 // try to use servo connector first - #define SPINDLE_LASER_ENABLE_PIN 4 // Pin should have a pullup/pulldown! - #define SPINDLE_LASER_PWM_PIN 6 // MUST BE HARDWARE PWM + #define SPINDLE_LASER_ENABLE_PIN 4 // Pin should have a pullup/pulldown! + #define SPINDLE_LASER_PWM_PIN 6 // MUST BE HARDWARE PWM #define SPINDLE_DIR_PIN 5 #elif !(ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL) \ && (ENABLED(PANEL_ONE) || ENABLED(VIKI2) || ENABLED(miniVIKI) || ENABLED(MINIPANEL) || ENABLED(REPRAPWORLD_KEYPAD))) // try to use AUX 2 - #define SPINDLE_LASER_ENABLE_PIN 40 // Pin should have a pullup/pulldown! - #define SPINDLE_LASER_PWM_PIN 44 // MUST BE HARDWARE PWM + #define SPINDLE_LASER_ENABLE_PIN 40 // Pin should have a pullup/pulldown! + #define SPINDLE_LASER_PWM_PIN 44 // MUST BE HARDWARE PWM #define SPINDLE_DIR_PIN 65 #endif #endif @@ -333,9 +333,9 @@ // #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD) - #define LCD_PINS_RS 49 // CS chip select /SS chip slave select - #define LCD_PINS_ENABLE 51 // SID (MOSI) - #define LCD_PINS_D4 52 // SCK (CLK) clock + #define LCD_PINS_RS 49 // CS chip select /SS chip slave select + #define LCD_PINS_ENABLE 51 // SID (MOSI) + #define LCD_PINS_D4 52 // SCK (CLK) clock #elif ENABLED(NEWPANEL) && ENABLED(PANEL_ONE) @@ -370,8 +370,8 @@ #else #if ENABLED(MKS_12864OLED) || ENABLED(MKS_12864OLED_SSD1306) - #define LCD_PINS_DC 25 // Set as output on init - #define LCD_PINS_RS 27 // Pull low for 1s to init + #define LCD_PINS_DC 25 // Set as output on init + #define LCD_PINS_RS 27 // Pull low for 1s to init // DOGM SPI LCD Support #define DOGLCD_CS 16 #define DOGLCD_MOSI 17 @@ -441,16 +441,16 @@ #define BTN_EN1 47 #define BTN_EN2 43 #define BTN_ENC 32 - #define LCD_SDSS 53 + #define LCD_SDSS SDSS #define KILL_PIN 41 #elif ENABLED(LCD_I2C_VIKI) - #define BTN_EN1 22 // http://files.panucatt.com/datasheets/viki_wiring_diagram.pdf explains 40/42. - #define BTN_EN2 7 // 22/7 are unused on RAMPS_14. 22 is unused and 7 the SERVO0_PIN on RAMPS_13. + #define BTN_EN1 22 // http://files.panucatt.com/datasheets/viki_wiring_diagram.pdf explains 40/42. + #define BTN_EN2 7 // 22/7 are unused on RAMPS_14. 22 is unused and 7 the SERVO0_PIN on RAMPS_13. #define BTN_ENC -1 - #define LCD_SDSS 53 + #define LCD_SDSS SDSS #define SD_DETECT_PIN 49 #elif ENABLED(VIKI2) || ENABLED(miniVIKI) @@ -467,8 +467,7 @@ #define BTN_EN2 7 #define BTN_ENC 39 - #define SDSS 53 - #define SD_DETECT_PIN -1 // Pin 49 for display sd interface, 72 for easy adapter board + #define SD_DETECT_PIN -1 // Pin 49 for display sd interface, 72 for easy adapter board #define KILL_PIN 31 #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) @@ -483,11 +482,11 @@ #define BTN_EN2 37 #define BTN_ENC 31 - #define LCD_SDSS 53 + #define LCD_SDSS SDSS #define SD_DETECT_PIN 49 #define KILL_PIN 41 - #elif ENABLED(MKS_MINI_12864) // Added in Marlin 1.1.6 + #elif ENABLED(MKS_MINI_12864) // Added in Marlin 1.1.6 #define DOGLCD_A0 27 #define DOGLCD_CS 25 @@ -501,13 +500,12 @@ #define BEEPER_PIN 37 // not connected to a pin - #define LCD_BACKLIGHT_PIN 65 // backlight LED on A11/D65 + #define LCD_BACKLIGHT_PIN 65 // backlight LED on A11/D65 #define BTN_EN1 31 #define BTN_EN2 33 #define BTN_ENC 35 - #define SDSS 53 #define SD_DETECT_PIN 49 #define KILL_PIN 64 @@ -515,7 +513,7 @@ #define BEEPER_PIN 42 // not connected to a pin - #define LCD_BACKLIGHT_PIN 65 // backlight LED on A11/D65 + #define LCD_BACKLIGHT_PIN 65 // backlight LED on A11/D65 #define DOGLCD_A0 44 #define DOGLCD_CS 66 @@ -531,7 +529,6 @@ #define BTN_EN2 63 #define BTN_ENC 59 - #define SDSS 53 #define SD_DETECT_PIN 49 #define KILL_PIN 64 @@ -553,9 +550,9 @@ #define BTN_EN2 59 #define BTN_ENC 63 #elif ENABLED(PANEL_ONE) - #define BTN_EN1 59 // AUX2 PIN 3 - #define BTN_EN2 63 // AUX2 PIN 4 - #define BTN_ENC 49 // AUX3 PIN 7 + #define BTN_EN1 59 // AUX2 PIN 3 + #define BTN_EN2 63 // AUX2 PIN 4 + #define BTN_ENC 49 // AUX3 PIN 7 #else #define BTN_EN1 37 #define BTN_EN2 35 diff --git a/Marlin/pins_RAMPS_OLD.h b/Marlin/pins_RAMPS_OLD.h index 870f2fbd15..951e3b000b 100644 --- a/Marlin/pins_RAMPS_OLD.h +++ b/Marlin/pins_RAMPS_OLD.h @@ -77,9 +77,9 @@ // SPI for Max6675 or Max31855 Thermocouple #if DISABLED(SDSUPPORT) - #define MAX6675_SS 66 // Do not use pin 53 if there is even the remote possibility of using Display/SD card + #define MAX6675_SS 66 // Do not use pin 53 if there is even the remote possibility of using Display/SD card #else - #define MAX6675_SS 66 // Do not use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present + #define MAX6675_SS 66 // Do not use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present #endif // @@ -101,11 +101,11 @@ #define SDPOWER 48 #define SDSS 53 #define LED_PIN 13 -#define CASE_LIGHT_PIN 45 // MUST BE HARDWARE PWM +#define CASE_LIGHT_PIN 45 // MUST BE HARDWARE PWM // // M3/M4/M5 - Spindle/Laser Control // -#define SPINDLE_LASER_ENABLE_PIN 41 // Pin should have a pullup/pulldown! -#define SPINDLE_LASER_PWM_PIN 45 // MUST BE HARDWARE PWM +#define SPINDLE_LASER_ENABLE_PIN 41 // Pin should have a pullup/pulldown! +#define SPINDLE_LASER_PWM_PIN 45 // MUST BE HARDWARE PWM #define SPINDLE_DIR_PIN 43 diff --git a/Marlin/pins_RUMBA.h b/Marlin/pins_RUMBA.h index 56caf88646..ffa6a26e47 100644 --- a/Marlin/pins_RUMBA.h +++ b/Marlin/pins_RUMBA.h @@ -107,6 +107,7 @@ // optional for extruder 4 or chamber: //#define TEMP_X_PIN 12 // Analog Input (default connector for thermistor *T3* on rumba board is used) +//#define TEMP_CHAMBER_PIN 12 // Analog Input (default connector for thermistor *T3* on rumba board is used) #if TEMP_SENSOR_BED == -1 #define TEMP_BED_PIN 7 // Analog Input (connector *K3* on RUMBA thermocouple ADD ON is used <-- this can't be used when TEMP_SENSOR_2 is defined as thermocouple) @@ -154,10 +155,10 @@ // M3/M4/M5 - Spindle/Laser Control // #ifndef SPINDLE_LASER_PWM_PIN - #define SPINDLE_LASER_PWM_PIN 4 // MUST BE HARDWARE PWM. Pin 4 interrupts OC0* and OC1* always in use? + #define SPINDLE_LASER_PWM_PIN 4 // MUST BE HARDWARE PWM. Pin 4 interrupts OC0* and OC1* always in use? #endif #ifndef SPINDLE_LASER_ENABLE_PIN - #define SPINDLE_LASER_ENABLE_PIN 14 // Pin should have a pullup! + #define SPINDLE_LASER_ENABLE_PIN 14 // Pin should have a pullup! #endif #ifndef SPINDLE_DIR_PIN #define SPINDLE_DIR_PIN 15 diff --git a/Marlin/pins_SAINSMART_2IN1.h b/Marlin/pins_SAINSMART_2IN1.h index bf01a9e051..53d1a3e95b 100644 --- a/Marlin/pins_SAINSMART_2IN1.h +++ b/Marlin/pins_SAINSMART_2IN1.h @@ -21,7 +21,7 @@ */ /** - * Sainsmart 2-in-1 pin assignments + * Sainsmart 2-in-1 pin assignments */ #if HOTENDS > 2 || E_STEPPERS > 2 @@ -33,9 +33,9 @@ // // Heaters / Fans // -#define RAMPS_D10_PIN 9 // E -#define RAMPS_D9_PIN 7 // F PART FAN in front of board next to Extruder heat - // RAMPS_D8_PIN 8 // B -#define MOSFET_D_PIN 10 // F / E +#define RAMPS_D10_PIN 9 // E +#define RAMPS_D9_PIN 7 // F PART FAN in front of board next to Extruder heat + // RAMPS_D8_PIN 8 // B +#define MOSFET_D_PIN 10 // F / E #include "pins_RAMPS.h" diff --git a/Marlin/pins_SANGUINOLOLU_11.h b/Marlin/pins_SANGUINOLOLU_11.h index e37af51bc7..c27eab1c8a 100644 --- a/Marlin/pins_SANGUINOLOLU_11.h +++ b/Marlin/pins_SANGUINOLOLU_11.h @@ -90,23 +90,23 @@ // // Heaters / Fans // -#define HEATER_0_PIN 13 // (extruder) +#define HEATER_0_PIN 13 // (extruder) #if ENABLED(SANGUINOLOLU_V_1_2) - #define HEATER_BED_PIN 12 // (bed) + #define HEATER_BED_PIN 12 // (bed) #define X_ENABLE_PIN 14 #define Y_ENABLE_PIN 14 #define Z_ENABLE_PIN 26 #define E0_ENABLE_PIN 14 #if ENABLED(LCD_I2C_PANELOLU2) - #define FAN_PIN 4 // Uses Transistor1 (PWM) on Panelolu2's Sanguino Adapter Board to drive the fan + #define FAN_PIN 4 // Uses Transistor1 (PWM) on Panelolu2's Sanguino Adapter Board to drive the fan #endif #else - #define HEATER_BED_PIN 14 // (bed) + #define HEATER_BED_PIN 14 // (bed) #define X_ENABLE_PIN -1 #define Y_ENABLE_PIN -1 #define Z_ENABLE_PIN -1 @@ -114,8 +114,8 @@ #endif -#if MB(AZTEEG_X1) || MB(STB_11) || MB(CREALITY_ENDER) || ENABLED(IS_MELZI) - #define FAN_PIN 4 // Works for Panelolu2 too +#if MB(AZTEEG_X1) || MB(STB_11) || ENABLED(IS_MELZI) + #define FAN_PIN 4 // Works for Panelolu2 too #endif // @@ -134,11 +134,11 @@ #if ENABLED(IS_MELZI) #define LED_PIN 27 #elif MB(STB_11) - #define LCD_BACKLIGHT_PIN 17 // LCD backlight LED + #define LCD_BACKLIGHT_PIN 17 // LCD backlight LED #endif #if DISABLED(SPINDLE_LASER_ENABLE) && ENABLED(SANGUINOLOLU_V_1_2) && !(ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL)) // try to use IO Header - #define CASE_LIGHT_PIN 4 // MUST BE HARDWARE PWM - see if IO Header is available + #define CASE_LIGHT_PIN 4 // MUST BE HARDWARE PWM - see if IO Header is available #endif /** @@ -160,9 +160,9 @@ #if ENABLED(U8GLIB_ST7920) // SPI GLCD 12864 ST7920 ( like [www.digole.com] ) For Melzi V2.0 #if ENABLED(IS_MELZI) - #define LCD_PINS_RS 30 // CS chip select /SS chip slave select - #define LCD_PINS_ENABLE 29 // SID (MOSI) - #define LCD_PINS_D4 17 // SCK (CLK) clock + #define LCD_PINS_RS 30 // CS chip select /SS chip slave select + #define LCD_PINS_ENABLE 29 // SID (MOSI) + #define LCD_PINS_D4 17 // SCK (CLK) clock // Pin 27 is taken by LED_PIN, but Melzi LED does nothing with // Marlin so this can be used for BEEPER_PIN. You can use this pin // with M42 instead of BEEPER_PIN. @@ -185,9 +185,9 @@ #define BEEPER_PIN 29 #define DOGLCD_CS 17 - #define LCD_BACKLIGHT_PIN 28 // PA3 + #define LCD_BACKLIGHT_PIN 28 // PA3 - #elif MB(CREALITY_ENDER) + #elif ENABLED(IS_MELZI) #define BEEPER_PIN 27 #define DOGLCD_CS 28 @@ -224,7 +224,7 @@ #if ENABLED(IS_MELZI) #define BTN_ENC 29 - #define LCD_SDSS 30 // Panelolu2 SD card reader rather than the Melzi + #define LCD_SDSS 30 // Panelolu2 SD card reader rather than the Melzi #else #define BTN_ENC 30 #endif @@ -265,7 +265,7 @@ #else // !LCD_I2C_PANELOLU2 && !LCD_FOR_MELZI && !ZONESTAR_LCD #define BTN_ENC 16 - #define LCD_SDSS 28 // Smart Controller SD card reader rather than the Melzi + #define LCD_SDSS 28 // Smart Controller SD card reader rather than the Melzi #endif @@ -279,8 +279,8 @@ #if ENABLED(SPINDLE_LASER_ENABLE) #if !MB(AZTEEG_X1) && ENABLED(SANGUINOLOLU_V_1_2) && !(ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL)) // try to use IO Header - #define SPINDLE_LASER_ENABLE_PIN 10 // Pin should have a pullup/pulldown! - #define SPINDLE_LASER_PWM_PIN 4 // MUST BE HARDWARE PWM + #define SPINDLE_LASER_ENABLE_PIN 10 // Pin should have a pullup/pulldown! + #define SPINDLE_LASER_PWM_PIN 4 // MUST BE HARDWARE PWM #define SPINDLE_DIR_PIN 11 #elif !MB(MELZI) // use X stepper motor socket @@ -318,8 +318,8 @@ #define X_DIR_PIN 0 #define X_ENABLE_PIN 14 #define X_STEP_PIN 1 - #define SPINDLE_LASER_PWM_PIN 15 // MUST BE HARDWARE PWM - #define SPINDLE_LASER_ENABLE_PIN 21 // Pin should have a pullup! - #define SPINDLE_DIR_PIN -1 // No pin available on the socket for the direction pin + #define SPINDLE_LASER_PWM_PIN 15 // MUST BE HARDWARE PWM + #define SPINDLE_LASER_ENABLE_PIN 21 // Pin should have a pullup! + #define SPINDLE_DIR_PIN -1 // No pin available on the socket for the direction pin #endif #endif // SPINDLE_LASER_ENABLE diff --git a/Marlin/pins_SAV_MKI.h b/Marlin/pins_SAV_MKI.h index 99dd228cd2..1241ee083f 100644 --- a/Marlin/pins_SAV_MKI.h +++ b/Marlin/pins_SAV_MKI.h @@ -173,10 +173,10 @@ // // M3/M4/M5 - Spindle/Laser Control // - #define SPINDLE_LASER_PWM_PIN 24 // B4 PWM2A - #define SPINDLE_LASER_ENABLE_PIN 39 // F1 Pin should have a pullup! - #define SPINDLE_DIR_PIN 40 // F2 + #define SPINDLE_LASER_PWM_PIN 24 // B4 PWM2A + #define SPINDLE_LASER_ENABLE_PIN 39 // F1 Pin should have a pullup! + #define SPINDLE_DIR_PIN 40 // F2 - #define CASE_LIGHT_PIN 0 // D0 PWM0B + #define CASE_LIGHT_PIN 0 // D0 PWM0B #endif diff --git a/Marlin/pins_SCOOVO_X9H.h b/Marlin/pins_SCOOVO_X9H.h index 52b8d1400b..c0852bf310 100644 --- a/Marlin/pins_SCOOVO_X9H.h +++ b/Marlin/pins_SCOOVO_X9H.h @@ -33,10 +33,10 @@ // // Servos // -#define SERVO0_PIN 22 // Motor header MX1 -#define SERVO1_PIN 23 // Motor header MX2 -#define SERVO2_PIN 24 // Motor header MX3 -#define SERVO3_PIN 5 // PWM header pin 5 +#define SERVO0_PIN 22 // Motor header MX1 +#define SERVO1_PIN 23 // Motor header MX2 +#define SERVO2_PIN 24 // Motor header MX3 +#define SERVO3_PIN 5 // PWM header pin 5 // // Limit Switches diff --git a/Marlin/pins_SETHI.h b/Marlin/pins_SETHI.h index ac570fd27c..293373a6d7 100644 --- a/Marlin/pins_SETHI.h +++ b/Marlin/pins_SETHI.h @@ -56,7 +56,7 @@ #define BOARD_NAME "Sethi 3D_1" #ifndef GEN7_VERSION - #define GEN7_VERSION 12 // v1.x + #define GEN7_VERSION 12 // v1.x #endif // diff --git a/Marlin/pins_SILVER_GATE.h b/Marlin/pins_SILVER_GATE.h index e66615e4ea..ca96a427c1 100644 --- a/Marlin/pins_SILVER_GATE.h +++ b/Marlin/pins_SILVER_GATE.h @@ -60,7 +60,7 @@ #define HEATER_0_PIN 7 -#define ORIG_E0_AUTO_FAN_PIN 3 // Use this by NOT overriding E0_AUTO_FAN_PIN +#define ORIG_E0_AUTO_FAN_PIN 3 // Use this by NOT overriding E0_AUTO_FAN_PIN #define CONTROLLER_FAN_PIN 2 #define TEMP_0_PIN 7 // Analog Input diff --git a/Marlin/pins_TEENSY2.h b/Marlin/pins_TEENSY2.h index 9800eb027f..16fcd46f10 100644 --- a/Marlin/pins_TEENSY2.h +++ b/Marlin/pins_TEENSY2.h @@ -177,6 +177,6 @@ // // M3/M4/M5 - Spindle/Laser Control // -#define SPINDLE_LASER_ENABLE_PIN 5 // D5 Pin should have a pullup! -#define SPINDLE_LASER_PWM_PIN 0 // D0 PWM0B MUST BE HARDWARE PWM -#define SPINDLE_DIR_PIN 7 // D7 +#define SPINDLE_LASER_ENABLE_PIN 5 // D5 Pin should have a pullup! +#define SPINDLE_LASER_PWM_PIN 0 // D0 PWM0B MUST BE HARDWARE PWM +#define SPINDLE_DIR_PIN 7 // D7 diff --git a/Marlin/pins_TRIGORILLA_13.h b/Marlin/pins_TRIGORILLA_13.h new file mode 100644 index 0000000000..e876da4671 --- /dev/null +++ b/Marlin/pins_TRIGORILLA_13.h @@ -0,0 +1,40 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * Arduino Mega with RAMPS v1.3 for Anycubic + */ + +#ifndef BOARD_NAME + #define BOARD_NAME "Anycubic RAMPS 1.3" +#endif + +#define IS_RAMPS_EFB +#define RAMPS_D9_PIN 44 +#define ORIG_E0_AUTO_FAN_PIN RAMPS_D9_PIN + +#include "pins_RAMPS_13.h" + +#undef E1_STEP_PIN +#undef E1_DIR_PIN +#undef E1_ENABLE_PIN +#undef E1_CS_PIN diff --git a/Marlin/pins_TRIGORILLA.h b/Marlin/pins_TRIGORILLA_14.h similarity index 82% rename from Marlin/pins_TRIGORILLA.h rename to Marlin/pins_TRIGORILLA_14.h index 527c166c58..3903e1dba5 100644 --- a/Marlin/pins_TRIGORILLA.h +++ b/Marlin/pins_TRIGORILLA_14.h @@ -22,9 +22,6 @@ /** * Arduino Mega with RAMPS v1.4 for Anycubic - * - * Defines RAMPS_D44_PIN 44 - * Defines FAN_PIN RAMPS_D44_PIN or -1 */ #ifndef BOARD_NAME @@ -35,12 +32,7 @@ #include "pins_RAMPS_13.h" -#undef FAN_PIN -#define RAMPS_D44_PIN 44 -#define FAN_PIN RAMPS_D44_PIN - -#undef ORIG_E0_AUTO_FAN_PIN -#define ORIG_E0_AUTO_FAN_PIN RAMPS_D44_PIN +#define FAN2_PIN 44 #undef E1_STEP_PIN #undef E1_DIR_PIN diff --git a/Marlin/pins_ULTIMAIN_2.h b/Marlin/pins_ULTIMAIN_2.h index 4ac26c6af2..c52b20c3e3 100644 --- a/Marlin/pins_ULTIMAIN_2.h +++ b/Marlin/pins_ULTIMAIN_2.h @@ -101,8 +101,8 @@ #define SDSS 53 #define SD_DETECT_PIN 39 #define LED_PIN 8 -#define SAFETY_TRIGGERED_PIN 28 // PIN to detect the safety circuit has triggered -#define MAIN_VOLTAGE_MEASURE_PIN 14 // ANALOG PIN to measure the main voltage, with a 100k - 4k7 resitor divider. +#define SAFETY_TRIGGERED_PIN 28 // PIN to detect the safety circuit has triggered +#define MAIN_VOLTAGE_MEASURE_PIN 14 // ANALOG PIN to measure the main voltage, with a 100k - 4k7 resitor divider. // // LCD / Controller @@ -127,8 +127,8 @@ #if ENABLED(SPINDLE_LASER_ENABLE) // use the LED_PIN for spindle speed control or case light #undef LED_PIN #define SPINDLE_DIR_PIN 16 - #define SPINDLE_LASER_ENABLE_PIN 17 // Pin should have a pullup! - #define SPINDLE_LASER_PWM_PIN 8 // MUST BE HARDWARE PWM + #define SPINDLE_LASER_ENABLE_PIN 17 // Pin should have a pullup! + #define SPINDLE_LASER_PWM_PIN 8 // MUST BE HARDWARE PWM #else #undef LED_PIN #define CASE_LIGHT_PIN 8 diff --git a/Marlin/pins_ULTIMAKER.h b/Marlin/pins_ULTIMAKER.h index 4549bf7fc5..0d1a65431f 100644 --- a/Marlin/pins_ULTIMAKER.h +++ b/Marlin/pins_ULTIMAKER.h @@ -43,7 +43,7 @@ // // Servos // -#define SERVO0_PIN 13 // untested +#define SERVO0_PIN 13 // UNTESTED // // Limit Switches @@ -157,6 +157,6 @@ // // M3/M4/M5 - Spindle/Laser Control // -#define SPINDLE_LASER_PWM_PIN 9 // MUST BE HARDWARE PWM -#define SPINDLE_LASER_ENABLE_PIN 10 // Pin should have a pullup! -#define SPINDLE_DIR_PIN 11 // use the EXP3 PWM header +#define SPINDLE_LASER_PWM_PIN 9 // MUST BE HARDWARE PWM +#define SPINDLE_LASER_ENABLE_PIN 10 // Pin should have a pullup! +#define SPINDLE_DIR_PIN 11 // use the EXP3 PWM header diff --git a/Marlin/pins_ULTIMAKER_OLD.h b/Marlin/pins_ULTIMAKER_OLD.h index e04907d981..c07f2d0e75 100644 --- a/Marlin/pins_ULTIMAKER_OLD.h +++ b/Marlin/pins_ULTIMAKER_OLD.h @@ -72,21 +72,21 @@ // Limit Switches // #if ENABLED(board_rev_1_1_TO_1_3) - #define X_MIN_PIN 15 // SW1 - #define X_MAX_PIN 14 // SW2 - #define Y_MIN_PIN 17 // SW3 - #define Y_MAX_PIN 16 // SW4 - #define Z_MIN_PIN 19 // SW5 - #define Z_MAX_PIN 18 // SW6 + #define X_MIN_PIN 15 // SW1 + #define X_MAX_PIN 14 // SW2 + #define Y_MIN_PIN 17 // SW3 + #define Y_MAX_PIN 16 // SW4 + #define Z_MIN_PIN 19 // SW5 + #define Z_MAX_PIN 18 // SW6 #endif #if ENABLED(board_rev_1_0) - #define X_MIN_PIN 13 // SW1 - #define X_MAX_PIN 12 // SW2 - #define Y_MIN_PIN 11 // SW3 - #define Y_MAX_PIN 10 // SW4 - #define Z_MIN_PIN 9 // SW5 - #define Z_MAX_PIN 8 // SW6 + #define X_MIN_PIN 13 // SW1 + #define X_MAX_PIN 12 // SW2 + #define Y_MIN_PIN 11 // SW3 + #define Y_MAX_PIN 10 // SW4 + #define Z_MIN_PIN 9 // SW5 + #define Z_MAX_PIN 8 // SW6 #endif #if ENABLED(board_rev_1_5) @@ -124,9 +124,9 @@ #define E0_DIR_PIN 45 #define E0_ENABLE_PIN 41 -#define E1_STEP_PIN -1 // 49 -#define E1_DIR_PIN -1 // 47 -#define E1_ENABLE_PIN -1 // 48 +#define E1_STEP_PIN -1 // 49 +#define E1_DIR_PIN -1 // 47 +#define E1_ENABLE_PIN -1 // 48 // // Temperature Sensors @@ -138,7 +138,7 @@ // Heaters / Fans // #define HEATER_0_PIN 2 -//#define HEATER_1_PIN 3 // used for case light Rev A said "1" +//#define HEATER_1_PIN 3 // used for case light Rev A said "1" #define HEATER_BED_PIN 4 // @@ -196,7 +196,7 @@ // case light - see spindle section for more info on available hardware PWMs // #if !PIN_EXISTS(CASE_LIGHT) && ENABLED(board_rev_1_5) - #define CASE_LIGHT_PIN 7 // use PWM - MUST BE HARDWARE PWM + #define CASE_LIGHT_PIN 7 // use PWM - MUST BE HARDWARE PWM #endif // @@ -214,19 +214,19 @@ #undef Z_MIN_PIN // SW5 #undef Z_MAX_PIN // SW6 - #define X_STOP_PIN 13 // SW1 (didn't change) - also has a useable hardware PWM - #define Y_STOP_PIN 12 // SW2 - #define Z_STOP_PIN 11 // SW3 + #define X_STOP_PIN 13 // SW1 (didn't change) - also has a useable hardware PWM + #define Y_STOP_PIN 12 // SW2 + #define Z_STOP_PIN 11 // SW3 - #define SPINDLE_DIR_PIN 10 // SW4 - #define SPINDLE_LASER_PWM_PIN 9 // SW5 MUST BE HARDWARE PWM - #define SPINDLE_LASER_ENABLE_PIN 8 // SW6 Pin should have a pullup! + #define SPINDLE_DIR_PIN 10 // SW4 + #define SPINDLE_LASER_PWM_PIN 9 // SW5 MUST BE HARDWARE PWM + #define SPINDLE_LASER_ENABLE_PIN 8 // SW6 Pin should have a pullup! #elif ENABLED(board_rev_1_5) // use the same pins - but now they are on a different connector - #define SPINDLE_DIR_PIN 10 // EXP3-6 (silkscreen says 10) - #define SPINDLE_LASER_PWM_PIN 9 // EXP3-7 (silkscreen says 9) MUST BE HARDWARE PWM - #define SPINDLE_LASER_ENABLE_PIN 8 // EXP3-8 (silkscreen says 8) Pin should have a pullup! + #define SPINDLE_DIR_PIN 10 // EXP3-6 (silkscreen says 10) + #define SPINDLE_LASER_PWM_PIN 9 // EXP3-7 (silkscreen says 9) MUST BE HARDWARE PWM + #define SPINDLE_LASER_ENABLE_PIN 8 // EXP3-8 (silkscreen says 8) Pin should have a pullup! #elif ENABLED(board_rev_1_1_TO_1_3) @@ -249,14 +249,14 @@ #define E0_DIR_PIN 47 #define E0_ENABLE_PIN 48 #define SPINDLE_DIR_PIN 43 - #define SPINDLE_LASER_PWM_PIN 45 // MUST BE HARDWARE PWM - #define SPINDLE_LASER_ENABLE_PIN 41 // Pin should have a pullup! + #define SPINDLE_LASER_PWM_PIN 45 // MUST BE HARDWARE PWM + #define SPINDLE_LASER_ENABLE_PIN 41 // Pin should have a pullup! #elif TEMP_SENSOR_BED == 0 // Can't use E0 so see if HEATER_BED_PIN is available #undef HEATER_BED_PIN - #define SPINDLE_DIR_PIN 38 // Probably pin 4 on 10 pin connector closest to the E0 socket - #define SPINDLE_LASER_PWM_PIN 4 // MUST BE HARDWARE PWM - Special precautions usually needed. - #define SPINDLE_LASER_ENABLE_PIN 40 // Pin should have a pullup! (Probably pin 6 on the 10-pin - // connector closest to the E0 socket) + #define SPINDLE_DIR_PIN 38 // Probably pin 4 on 10 pin connector closest to the E0 socket + #define SPINDLE_LASER_PWM_PIN 4 // MUST BE HARDWARE PWM - Special precautions usually needed. + #define SPINDLE_LASER_ENABLE_PIN 40 // Pin should have a pullup! (Probably pin 6 on the 10-pin + // connector closest to the E0 socket) #endif #endif #endif diff --git a/Marlin/pins_ZRIB_V20.h b/Marlin/pins_ZRIB_V20.h index 1437c71840..94a083dd40 100644 --- a/Marlin/pins_ZRIB_V20.h +++ b/Marlin/pins_ZRIB_V20.h @@ -36,4 +36,4 @@ #define FILWIDTH_PIN 11 // Analog Input #endif -#include "pins_MKS_13.h" +#include "pins_MKS_GEN_13.h" diff --git a/Marlin/planner.cpp b/Marlin/planner.cpp index 0ef1e17fb4..93dbb18f92 100644 --- a/Marlin/planner.cpp +++ b/Marlin/planner.cpp @@ -85,8 +85,8 @@ Planner planner; * A ring buffer of moves described in steps */ block_t Planner::block_buffer[BLOCK_BUFFER_SIZE]; -volatile uint8_t Planner::block_buffer_head = 0, // Index of the next block to be pushed - Planner::block_buffer_tail = 0; +volatile uint8_t Planner::block_buffer_head, // Index of the next block to be pushed + Planner::block_buffer_tail; float Planner::max_feedrate_mm_s[XYZE_N], // Max speeds in mm per second Planner::axis_steps_per_mm[XYZE_N], @@ -174,8 +174,11 @@ float Planner::previous_speed[NUM_AXIS], #endif #if ENABLED(LIN_ADVANCE) - float Planner::extruder_advance_K, // Initialized by settings.load() - Planner::position_float[XYZE]; // Needed for accurate maths. Steps cannot be used! + float Planner::extruder_advance_K; // Initialized by settings.load() +#endif + +#if HAS_POSITION_FLOAT + float Planner::position_float[XYZE]; // Needed for accurate maths. Steps cannot be used! #endif #if ENABLED(ULTRA_LCD) @@ -189,9 +192,8 @@ float Planner::previous_speed[NUM_AXIS], Planner::Planner() { init(); } void Planner::init() { - block_buffer_head = block_buffer_tail = 0; ZERO(position); - #if ENABLED(LIN_ADVANCE) + #if HAS_POSITION_FLOAT ZERO(position_float); #endif ZERO(previous_speed); @@ -199,6 +201,7 @@ void Planner::init() { #if ABL_PLANAR bed_level_matrix.set_to_identity(); #endif + clear_block_buffer(); } #define MINIMAL_STEP_RATE 120 @@ -457,7 +460,7 @@ void Planner::check_axes_activity() { #endif #endif - if (blocks_queued()) { + if (has_blocks_queued()) { #if FAN_COUNT > 0 for (uint8_t i = 0; i < FAN_COUNT; i++) @@ -647,12 +650,11 @@ void Planner::check_axes_activity() { rx = dx + X_TILT_FULCRUM; ry = dy + Y_TILT_FULCRUM; - #else + #elif HAS_MESH #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) const float fade_scaling_factor = fade_scaling_factor_for_z(rz); - if (!fade_scaling_factor) return; - #elif HAS_MESH + #else constexpr float fade_scaling_factor = 1.0; #endif @@ -661,18 +663,16 @@ void Planner::check_axes_activity() { #endif rz += ( - #if ENABLED(AUTO_BED_LEVELING_UBL) - ubl.get_z_correction(rx, ry) * fade_scaling_factor - #elif ENABLED(MESH_BED_LEVELING) + #if ENABLED(MESH_BED_LEVELING) mbl.get_z(rx, ry #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) , fade_scaling_factor #endif ) + #elif ENABLED(AUTO_BED_LEVELING_UBL) + fade_scaling_factor ? fade_scaling_factor * ubl.get_z_correction(rx, ry) : 0.0 #elif ENABLED(AUTO_BED_LEVELING_BILINEAR) - bilinear_z_offset(raw) * fade_scaling_factor - #else - 0 + fade_scaling_factor ? fade_scaling_factor * bilinear_z_offset(raw) : 0.0 #endif ); @@ -681,13 +681,7 @@ void Planner::check_axes_activity() { void Planner::unapply_leveling(float raw[XYZ]) { - #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) - const float fade_scaling_factor = fade_scaling_factor_for_z(raw[Z_AXIS]); - #else - constexpr float fade_scaling_factor = 1.0; - #endif - - if (leveling_active && fade_scaling_factor) { + if (leveling_active) { #if ABL_PLANAR @@ -701,25 +695,29 @@ void Planner::check_axes_activity() { raw[X_AXIS] = dx + X_TILT_FULCRUM; raw[Y_AXIS] = dy + Y_TILT_FULCRUM; - #else // !ABL_PLANAR + #elif HAS_MESH + + #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) + const float fade_scaling_factor = fade_scaling_factor_for_z(raw[Z_AXIS]); + #else + constexpr float fade_scaling_factor = 1.0; + #endif raw[Z_AXIS] -= ( - #if ENABLED(AUTO_BED_LEVELING_UBL) - ubl.get_z_correction(raw[X_AXIS], raw[Y_AXIS]) * fade_scaling_factor - #elif ENABLED(MESH_BED_LEVELING) + #if ENABLED(MESH_BED_LEVELING) mbl.get_z(raw[X_AXIS], raw[Y_AXIS] #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) , fade_scaling_factor #endif ) + #elif ENABLED(AUTO_BED_LEVELING_UBL) + fade_scaling_factor ? fade_scaling_factor * ubl.get_z_correction(raw[X_AXIS], raw[Y_AXIS]) : 0.0 #elif ENABLED(AUTO_BED_LEVELING_BILINEAR) - bilinear_z_offset(raw) * fade_scaling_factor - #else - 0 + fade_scaling_factor ? fade_scaling_factor * bilinear_z_offset(raw) : 0.0 #endif ); - #endif // !ABL_PLANAR + #endif } #if ENABLED(SKEW_CORRECTION) @@ -739,7 +737,7 @@ void Planner::check_axes_activity() { * extruder - target extruder */ void Planner::_buffer_steps(const int32_t (&target)[XYZE] - #if ENABLED(LIN_ADVANCE) + #if HAS_POSITION_FLOAT , const float (&target_float)[XYZE] #endif , float fr_mm_s, const uint8_t extruder, const float &millimeters/*=0.0*/ @@ -769,7 +767,7 @@ void Planner::_buffer_steps(const int32_t (&target)[XYZE] #if ENABLED(PREVENT_COLD_EXTRUSION) if (thermalManager.tooColdToExtrude(extruder)) { position[E_AXIS] = target[E_AXIS]; // Behave as if the move really took place, but ignore E part - #if ENABLED(LIN_ADVANCE) + #if HAS_POSITION_FLOAT position_float[E_AXIS] = target_float[E_AXIS]; #endif de = 0; // no difference @@ -780,7 +778,7 @@ void Planner::_buffer_steps(const int32_t (&target)[XYZE] #if ENABLED(PREVENT_LENGTHY_EXTRUDE) if (labs(de * e_factor[extruder]) > (int32_t)axis_steps_per_mm[E_AXIS_N] * (EXTRUDE_MAXLENGTH)) { // It's not important to get max. extrusion length in a precision < 1mm, so save some cycles and cast to int position[E_AXIS] = target[E_AXIS]; // Behave as if the move really took place, but ignore E part - #if ENABLED(LIN_ADVANCE) + #if HAS_POSITION_FLOAT position_float[E_AXIS] = target_float[E_AXIS]; #endif de = 0; // no difference @@ -851,6 +849,10 @@ void Planner::_buffer_steps(const int32_t (&target)[XYZE] block->steps[X_AXIS] = labs(da); block->steps[B_AXIS] = labs(db + dc); block->steps[C_AXIS] = labs(db - dc); + #elif IS_SCARA + block->steps[A_AXIS] = labs(da); + block->steps[B_AXIS] = labs(db); + block->steps[Z_AXIS] = labs(dc); #else // default non-h-bot planning block->steps[A_AXIS] = labs(da); @@ -886,7 +888,7 @@ void Planner::_buffer_steps(const int32_t (&target)[XYZE] powerManager.power_on(); #endif - //enable active axes + // Enable active axes #if CORE_IS_XY if (block->steps[A_AXIS] || block->steps[B_AXIS]) { enable_X(); @@ -928,16 +930,8 @@ void Planner::_buffer_steps(const int32_t (&target)[XYZE] for (uint8_t i = 0; i < EXTRUDERS; i++) if (g_uc_extruder_last_move[i] > 0) g_uc_extruder_last_move[i]--; - switch(extruder) { + switch (extruder) { case 0: - enable_E0(); - g_uc_extruder_last_move[0] = (BLOCK_BUFFER_SIZE) * 2; - #if ENABLED(DUAL_X_CARRIAGE) || ENABLED(DUAL_NOZZLE_DUPLICATION_MODE) - if (extruder_duplication_enabled) { - enable_E1(); - g_uc_extruder_last_move[1] = (BLOCK_BUFFER_SIZE) * 2; - } - #endif #if EXTRUDERS > 1 DISABLE_IDLE_E(1); #if EXTRUDERS > 2 @@ -950,11 +944,17 @@ void Planner::_buffer_steps(const int32_t (&target)[XYZE] #endif // EXTRUDERS > 3 #endif // EXTRUDERS > 2 #endif // EXTRUDERS > 1 + enable_E0(); + g_uc_extruder_last_move[0] = (BLOCK_BUFFER_SIZE) * 2; + #if ENABLED(DUAL_X_CARRIAGE) || ENABLED(DUAL_NOZZLE_DUPLICATION_MODE) + if (extruder_duplication_enabled) { + enable_E1(); + g_uc_extruder_last_move[1] = (BLOCK_BUFFER_SIZE) * 2; + } + #endif break; #if EXTRUDERS > 1 case 1: - enable_E1(); - g_uc_extruder_last_move[1] = (BLOCK_BUFFER_SIZE) * 2; DISABLE_IDLE_E(0); #if EXTRUDERS > 2 DISABLE_IDLE_E(2); @@ -965,11 +965,11 @@ void Planner::_buffer_steps(const int32_t (&target)[XYZE] #endif // EXTRUDERS > 4 #endif // EXTRUDERS > 3 #endif // EXTRUDERS > 2 + enable_E1(); + g_uc_extruder_last_move[1] = (BLOCK_BUFFER_SIZE) * 2; break; #if EXTRUDERS > 2 case 2: - enable_E2(); - g_uc_extruder_last_move[2] = (BLOCK_BUFFER_SIZE) * 2; DISABLE_IDLE_E(0); DISABLE_IDLE_E(1); #if EXTRUDERS > 3 @@ -978,26 +978,28 @@ void Planner::_buffer_steps(const int32_t (&target)[XYZE] DISABLE_IDLE_E(4); #endif #endif + enable_E2(); + g_uc_extruder_last_move[2] = (BLOCK_BUFFER_SIZE) * 2; break; #if EXTRUDERS > 3 case 3: - enable_E3(); - g_uc_extruder_last_move[3] = (BLOCK_BUFFER_SIZE) * 2; DISABLE_IDLE_E(0); DISABLE_IDLE_E(1); DISABLE_IDLE_E(2); #if EXTRUDERS > 4 DISABLE_IDLE_E(4); #endif + enable_E3(); + g_uc_extruder_last_move[3] = (BLOCK_BUFFER_SIZE) * 2; break; #if EXTRUDERS > 4 case 4: - enable_E4(); - g_uc_extruder_last_move[4] = (BLOCK_BUFFER_SIZE) * 2; DISABLE_IDLE_E(0); DISABLE_IDLE_E(1); DISABLE_IDLE_E(2); DISABLE_IDLE_E(3); + enable_E4(); + g_uc_extruder_last_move[4] = (BLOCK_BUFFER_SIZE) * 2; break; #endif // EXTRUDERS > 4 #endif // EXTRUDERS > 3 @@ -1457,7 +1459,7 @@ void Planner::_buffer_steps(const int32_t (&target)[XYZE] // Update the position (only when a move was queued) static_assert(COUNT(target) > 1, "Parameter to _buffer_steps must be (&target)[XYZE]!"); COPY(position, target); - #if ENABLED(LIN_ADVANCE) + #if HAS_POSITION_FLOAT COPY(position_float, target_float); #endif @@ -1495,14 +1497,14 @@ void Planner::buffer_segment(const float &a, const float &b, const float &c, con LROUND(e * axis_steps_per_mm[E_AXIS_N]) }; - #if ENABLED(LIN_ADVANCE) + #if HAS_POSITION_FLOAT const float target_float[XYZE] = { a, b, c, e }; #endif // DRYRUN prevents E moves from taking place if (DEBUGGING(DRYRUN)) { position[E_AXIS] = target[E_AXIS]; - #if ENABLED(LIN_ADVANCE) + #if HAS_POSITION_FLOAT position_float[E_AXIS] = e; #endif } @@ -1536,12 +1538,12 @@ void Planner::buffer_segment(const float &a, const float &b, const float &c, con //*/ // Always split the first move into two (if not homing or probing) - if (!blocks_queued()) { + if (!has_blocks_queued()) { #define _BETWEEN(A) (position[A##_AXIS] + target[A##_AXIS]) >> 1 const int32_t between[ABCE] = { _BETWEEN(A), _BETWEEN(B), _BETWEEN(C), _BETWEEN(E) }; - #if ENABLED(LIN_ADVANCE) + #if HAS_POSITION_FLOAT #define _BETWEEN_F(A) (position_float[A##_AXIS] + target_float[A##_AXIS]) * 0.5 const float between_float[ABCE] = { _BETWEEN_F(A), _BETWEEN_F(B), _BETWEEN_F(C), _BETWEEN_F(E) }; #endif @@ -1549,7 +1551,7 @@ void Planner::buffer_segment(const float &a, const float &b, const float &c, con DISABLE_STEPPER_DRIVER_INTERRUPT(); _buffer_steps(between - #if ENABLED(LIN_ADVANCE) + #if HAS_POSITION_FLOAT , between_float #endif , fr_mm_s, extruder, millimeters * 0.5 @@ -1558,7 +1560,7 @@ void Planner::buffer_segment(const float &a, const float &b, const float &c, con const uint8_t next = block_buffer_head; _buffer_steps(target - #if ENABLED(LIN_ADVANCE) + #if HAS_POSITION_FLOAT , target_float #endif , fr_mm_s, extruder, millimeters * 0.5 @@ -1569,7 +1571,7 @@ void Planner::buffer_segment(const float &a, const float &b, const float &c, con } else _buffer_steps(target - #if ENABLED(LIN_ADVANCE) + #if HAS_POSITION_FLOAT , target_float #endif , fr_mm_s, extruder, millimeters @@ -1597,7 +1599,7 @@ void Planner::_set_position_mm(const float &a, const float &b, const float &c, c nb = position[B_AXIS] = LROUND(b * axis_steps_per_mm[B_AXIS]), nc = position[C_AXIS] = LROUND(c * axis_steps_per_mm[C_AXIS]), ne = position[E_AXIS] = LROUND(e * axis_steps_per_mm[_EINDEX]); - #if ENABLED(LIN_ADVANCE) + #if HAS_POSITION_FLOAT position_float[X_AXIS] = a; position_float[Y_AXIS] = b; position_float[Z_AXIS] = c; @@ -1629,7 +1631,7 @@ void Planner::set_position_mm_kinematic(const float (&cart)[XYZE]) { void Planner::sync_from_steppers() { LOOP_XYZE(i) { position[i] = stepper.position((AxisEnum)i); - #if ENABLED(LIN_ADVANCE) + #if HAS_POSITION_FLOAT position_float[i] = position[i] * steps_to_mm[i #if ENABLED(DISTINCT_E_FACTORS) + (i == E_AXIS ? active_extruder : 0) @@ -1650,10 +1652,10 @@ void Planner::set_position_mm(const AxisEnum axis, const float &v) { const uint8_t axis_index = axis; #endif position[axis] = LROUND(v * axis_steps_per_mm[axis_index]); - #if ENABLED(LIN_ADVANCE) + #if HAS_POSITION_FLOAT position_float[axis] = v; #endif - stepper.set_position(axis, v); + stepper.set_position(axis, position[axis]); previous_speed[axis] = 0.0; } diff --git a/Marlin/planner.h b/Marlin/planner.h index bc0a39d5e2..61af55fc81 100644 --- a/Marlin/planner.h +++ b/Marlin/planner.h @@ -126,6 +126,8 @@ typedef struct { } block_t; +#define HAS_POSITION_FLOAT (ENABLED(LIN_ADVANCE) || ENABLED(SCARA_FEEDRATE_SCALING)) + #define BLOCK_MOD(n) ((n)&(BLOCK_BUFFER_SIZE-1)) class Planner { @@ -190,8 +192,11 @@ class Planner { #endif #if ENABLED(LIN_ADVANCE) - static float extruder_advance_K, - position_float[XYZE]; + static float extruder_advance_K; + #endif + + #if HAS_POSITION_FLOAT + static float position_float[XYZE]; #endif #if ENABLED(SKEW_CORRECTION) @@ -291,6 +296,8 @@ class Planner { */ FORCE_INLINE static uint8_t movesplanned() { return BLOCK_MOD(block_buffer_head - block_buffer_tail + BLOCK_BUFFER_SIZE); } + FORCE_INLINE static void clear_block_buffer() { block_buffer_head = block_buffer_tail = 0; } + FORCE_INLINE static bool is_full() { return block_buffer_tail == next_block_index(block_buffer_head); } // Update multipliers based on new diameter measurements @@ -413,7 +420,7 @@ class Planner { * millimeters - the length of the movement, if known */ static void _buffer_steps(const int32_t (&target)[XYZE] - #if ENABLED(LIN_ADVANCE) + #if HAS_POSITION_FLOAT , const float (&target_float)[XYZE] #endif , float fr_mm_s, const uint8_t extruder, const float &millimeters=0.0 @@ -508,14 +515,14 @@ class Planner { /** * Does the buffer have any blocks queued? */ - static bool blocks_queued() { return (block_buffer_head != block_buffer_tail); } + static inline bool has_blocks_queued() { return (block_buffer_head != block_buffer_tail); } /** * "Discard" the block and "release" the memory. * Called when the current block is no longer needed. */ FORCE_INLINE static void discard_current_block() { - if (blocks_queued()) + if (has_blocks_queued()) block_buffer_tail = BLOCK_MOD(block_buffer_tail + 1); } @@ -524,7 +531,7 @@ class Planner { * Called after an interrupted move to throw away the rest of the move. */ FORCE_INLINE static bool discard_continued_block() { - const bool discard = blocks_queued() && TEST(block_buffer[block_buffer_tail].flag, BLOCK_BIT_CONTINUED); + const bool discard = has_blocks_queued() && TEST(block_buffer[block_buffer_tail].flag, BLOCK_BIT_CONTINUED); if (discard) discard_current_block(); return discard; } @@ -535,7 +542,7 @@ class Planner { * WARNING: Called from Stepper ISR context! */ static block_t* get_current_block() { - if (blocks_queued()) { + if (has_blocks_queued()) { block_t * const block = &block_buffer[block_buffer_tail]; // If the block has no trapezoid calculated, it's unsafe to execute. @@ -576,7 +583,7 @@ class Planner { return bbru; } - static void clear_block_buffer_runtime(){ + static void clear_block_buffer_runtime() { CRITICAL_SECTION_START block_buffer_runtime_us = 0; CRITICAL_SECTION_END diff --git a/Marlin/power.cpp b/Marlin/power.cpp index aeb474d59b..dbe2ff1dc2 100644 --- a/Marlin/power.cpp +++ b/Marlin/power.cpp @@ -86,11 +86,18 @@ void Power::check() { void Power::power_on() { lastPowerOn = millis(); - PSU_PIN_ON(); + if (!powersupply_on) { + PSU_PIN_ON(); + + #if HAS_TRINAMIC + delay(100); // Wait for power to settle + restore_stepper_drivers(); + #endif + } } void Power::power_off() { - PSU_PIN_OFF(); + if (powersupply_on) PSU_PIN_OFF(); } #endif // AUTO_POWER_CONTROL diff --git a/Marlin/power_loss_recovery.cpp b/Marlin/power_loss_recovery.cpp new file mode 100644 index 0000000000..fdee4274cf --- /dev/null +++ b/Marlin/power_loss_recovery.cpp @@ -0,0 +1,237 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * power_loss_recovery.cpp - Resume an SD print after power-loss + */ + +#include "MarlinConfig.h" + +#if ENABLED(POWER_LOSS_RECOVERY) + +#include "power_loss_recovery.h" + +#include "cardreader.h" +#include "planner.h" +#include "printcounter.h" +#include "serial.h" +#include "temperature.h" +#include "ultralcd.h" + +// Recovery data +job_recovery_info_t job_recovery_info; +JobRecoveryPhase job_recovery_phase = JOB_RECOVERY_IDLE; +uint8_t job_recovery_commands_count; //=0 +char job_recovery_commands[BUFSIZE + APPEND_CMD_COUNT][MAX_CMD_SIZE]; + +// Extern +extern uint8_t commands_in_queue, cmd_queue_index_r; + +// Private +static char sd_filename[MAXPATHNAMELENGTH]; + +#if ENABLED(DEBUG_POWER_LOSS_RECOVERY) + void debug_print_job_recovery(const bool recovery) { + SERIAL_PROTOCOLPAIR("valid_head:", (int)job_recovery_info.valid_head); + SERIAL_PROTOCOLLNPAIR(" valid_foot:", (int)job_recovery_info.valid_foot); + if (job_recovery_info.valid_head) { + if (job_recovery_info.valid_head == job_recovery_info.valid_foot) { + SERIAL_PROTOCOLPGM("current_position"); + LOOP_XYZE(i) SERIAL_PROTOCOLPAIR(": ", job_recovery_info.current_position[i]); + SERIAL_EOL(); + SERIAL_PROTOCOLLNPAIR("feedrate: ", job_recovery_info.feedrate); + SERIAL_PROTOCOLPGM("target_temperature"); + HOTEND_LOOP() SERIAL_PROTOCOLPAIR(": ", job_recovery_info.target_temperature[e]); + SERIAL_EOL(); + SERIAL_PROTOCOLPGM("fanSpeeds"); + for(uint8_t i = 0; i < FAN_COUNT; i++) SERIAL_PROTOCOLPAIR(": ", job_recovery_info.fanSpeeds[i]); + SERIAL_EOL(); + #if HAS_LEVELING + SERIAL_PROTOCOLPAIR("leveling: ", int(job_recovery_info.leveling)); + SERIAL_PROTOCOLLNPAIR(" fade: ", int(job_recovery_info.fade)); + #endif + SERIAL_PROTOCOLLNPAIR("target_temperature_bed: ", job_recovery_info.target_temperature_bed); + SERIAL_PROTOCOLLNPAIR("cmd_queue_index_r: ", job_recovery_info.cmd_queue_index_r); + SERIAL_PROTOCOLLNPAIR("commands_in_queue: ", job_recovery_info.commands_in_queue); + if (recovery) + for (uint8_t i = 0; i < job_recovery_commands_count; i++) SERIAL_PROTOCOLLNPAIR("> ", job_recovery_commands[i]); + else + for (uint8_t i = 0; i < job_recovery_info.commands_in_queue; i++) SERIAL_PROTOCOLLNPAIR("> ", job_recovery_info.command_queue[i]); + SERIAL_PROTOCOLLNPAIR("sd_filename: ", sd_filename); + SERIAL_PROTOCOLLNPAIR("sdpos: ", job_recovery_info.sdpos); + SERIAL_PROTOCOLLNPAIR("print_job_elapsed: ", job_recovery_info.print_job_elapsed); + } + else + SERIAL_PROTOCOLLNPGM("INVALID DATA"); + } + } +#endif // DEBUG_POWER_LOSS_RECOVERY + +/** + * Check for Print Job Recovery + * If the file has a saved state, populate the job_recovery_commands queue + */ +void do_print_job_recovery() { + //if (job_recovery_commands_count > 0) return; + memset(&job_recovery_info, 0, sizeof(job_recovery_info)); + ZERO(job_recovery_commands); + + if (!card.cardOK) card.initsd(); + + if (card.cardOK) { + + #if ENABLED(DEBUG_POWER_LOSS_RECOVERY) + SERIAL_PROTOCOLLNPAIR("Init job recovery info. Size: ", (int)sizeof(job_recovery_info)); + #endif + + if (card.jobRecoverFileExists()) { + card.openJobRecoveryFile(true); + card.loadJobRecoveryInfo(); + card.closeJobRecoveryFile(); + //card.removeJobRecoveryFile(); + + if (job_recovery_info.valid_head && job_recovery_info.valid_head == job_recovery_info.valid_foot) { + + uint8_t ind = 0; + + #if HAS_LEVELING + strcpy_P(job_recovery_commands[ind++], PSTR("M420 S0 Z0")); // Leveling off before G92 or G28 + #endif + + strcpy_P(job_recovery_commands[ind++], PSTR("G92.0 Z0")); // Ensure Z is equal to 0 + strcpy_P(job_recovery_commands[ind++], PSTR("G1 Z2")); // Raise Z by 2mm (we hope!) + strcpy_P(job_recovery_commands[ind++], PSTR("G28 R0" + #if !IS_KINEMATIC + " X Y" // Home X and Y for Cartesian + #endif + )); + + #if HAS_LEVELING + // Restore leveling state before G92 sets Z + // This ensures the steppers correspond to the native Z + sprintf_P(job_recovery_commands[ind++], PSTR("M420 S%i Z%s"), int(job_recovery_info.leveling), job_recovery_info.fade); + #endif + + char str_1[16], str_2[16]; + dtostrf(job_recovery_info.current_position[Z_AXIS] + 2, 1, 3, str_1); + dtostrf(job_recovery_info.current_position[E_AXIS] + #if ENABLED(SAVE_EACH_CMD_MODE) + - 5 + #endif + , 1, 3, str_2 + ); + sprintf_P(job_recovery_commands[ind++], PSTR("G92.0 Z%s E%s"), str_1, str_2); // Current Z + 2 and E + + strcpy_P(job_recovery_commands[ind++], PSTR("M117 Continuing...")); + + uint8_t r = job_recovery_info.cmd_queue_index_r; + while (job_recovery_info.commands_in_queue) { + strcpy(job_recovery_commands[ind++], job_recovery_info.command_queue[r]); + job_recovery_info.commands_in_queue--; + r = (r + 1) % BUFSIZE; + } + + job_recovery_commands_count = ind; + + #if ENABLED(DEBUG_POWER_LOSS_RECOVERY) + debug_print_job_recovery(true); + #endif + + card.openFile(sd_filename, true); + card.setIndex(job_recovery_info.sdpos); + } + else { + if (job_recovery_info.valid_head != job_recovery_info.valid_foot) + LCD_ALERTMESSAGEPGM("INVALID DATA"); + memset(&job_recovery_info, 0, sizeof(job_recovery_info)); + } + } + } +} + +/** + * Save the current machine state to the "bin" file + */ +void save_job_recovery_info() { + #if SAVE_INFO_INTERVAL_MS > 0 + static millis_t next_save_ms; // = 0; // Init on reset + millis_t ms = millis(); + #endif + if ( + #if SAVE_INFO_INTERVAL_MS > 0 + ELAPSED(ms, next_save_ms) || + #endif + #if ENABLED(SAVE_EACH_CMD_MODE) + true + #else + (current_position[Z_AXIS] > 0 && current_position[Z_AXIS] > job_recovery_info.current_position[Z_AXIS]) + #endif + ) { + #if SAVE_INFO_INTERVAL_MS > 0 + next_save_ms = ms + SAVE_INFO_INTERVAL_MS; + #endif + + // Head and foot will match if valid data was saved + if (!++job_recovery_info.valid_head) ++job_recovery_info.valid_head; // non-zero in sequence + job_recovery_info.valid_foot = job_recovery_info.valid_head; + + // Machine state + COPY(job_recovery_info.current_position, current_position); + job_recovery_info.feedrate = feedrate_mm_s; + COPY(job_recovery_info.target_temperature, thermalManager.target_temperature); + job_recovery_info.target_temperature_bed = thermalManager.target_temperature_bed; + COPY(job_recovery_info.fanSpeeds, fanSpeeds); + + #if HAS_LEVELING + job_recovery_info.leveling = planner.leveling_active; + job_recovery_info.fade = ( + #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) + planner.z_fade_height + #else + 0 + #endif + ); + #endif + + // Commands in the queue + job_recovery_info.cmd_queue_index_r = cmd_queue_index_r; + job_recovery_info.commands_in_queue = commands_in_queue; + COPY(job_recovery_info.command_queue, command_queue); + + // Elapsed print job time + job_recovery_info.print_job_elapsed = print_job_timer.duration() * 1000UL; + + // SD file position + card.getAbsFilename(sd_filename); + job_recovery_info.sdpos = card.getIndex(); + + #if ENABLED(DEBUG_POWER_LOSS_RECOVERY) + SERIAL_PROTOCOLLNPGM("Saving job_recovery_info"); + debug_print_job_recovery(false); + #endif + + card.openJobRecoveryFile(false); + (void)card.saveJobRecoveryInfo(); + } +} + +#endif // POWER_LOSS_RECOVERY diff --git a/Marlin/power_loss_recovery.h b/Marlin/power_loss_recovery.h new file mode 100644 index 0000000000..202f9654a6 --- /dev/null +++ b/Marlin/power_loss_recovery.h @@ -0,0 +1,86 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * power_loss_recovery.h - Resume an SD print after power-loss + */ + +#ifndef _POWER_LOSS_RECOVERY_H_ +#define _POWER_LOSS_RECOVERY_H_ + +#include "cardreader.h" +#include "types.h" +#include "MarlinConfig.h" + +#define SAVE_INFO_INTERVAL_MS 0 +//#define SAVE_EACH_CMD_MODE +//#define DEBUG_POWER_LOSS_RECOVERY + +typedef struct { + uint8_t valid_head; + + // Machine state + float current_position[NUM_AXIS], feedrate; + int16_t target_temperature[HOTENDS], + target_temperature_bed, + fanSpeeds[FAN_COUNT]; + + #if HAS_LEVELING + bool leveling; + float fade; + #endif + + // Command queue + uint8_t cmd_queue_index_r, commands_in_queue; + char command_queue[BUFSIZE][MAX_CMD_SIZE]; + + // SD File position + uint32_t sdpos; + + // Job elapsed time + millis_t print_job_elapsed; + + uint8_t valid_foot; +} job_recovery_info_t; + +extern job_recovery_info_t job_recovery_info; + +enum JobRecoveryPhase : unsigned char { + JOB_RECOVERY_IDLE, + JOB_RECOVERY_MAYBE, + JOB_RECOVERY_YES +}; +extern JobRecoveryPhase job_recovery_phase; + +#if HAS_LEVELING + #define APPEND_CMD_COUNT 7 +#else + #define APPEND_CMD_COUNT 5 +#endif + +extern char job_recovery_commands[BUFSIZE + APPEND_CMD_COUNT][MAX_CMD_SIZE]; +extern uint8_t job_recovery_commands_count; + +void do_print_job_recovery(); +void save_job_recovery_info(); + +#endif // _POWER_LOSS_RECOVERY_H_ diff --git a/Marlin/softspi.h b/Marlin/softspi.h index 3b77e443b3..c9fbea01b4 100644 --- a/Marlin/softspi.h +++ b/Marlin/softspi.h @@ -42,11 +42,10 @@ bool fastDigitalRead(uint8_t pin){ */ static inline __attribute__((always_inline)) void fastDigitalWrite(uint8_t pin, bool value){ - if(value) { + if (value) g_APinDescription[pin].pPort->PIO_SODR = g_APinDescription[pin].ulPin; - } else { + else g_APinDescription[pin].pPort->PIO_CODR = g_APinDescription[pin].ulPin; - } } #endif // CORE_TEENSY //------------------------------------------------------------------------------ diff --git a/Marlin/status_screen_DOGM.h b/Marlin/status_screen_DOGM.h index 478cbf846a..d4856fb8ed 100644 --- a/Marlin/status_screen_DOGM.h +++ b/Marlin/status_screen_DOGM.h @@ -300,12 +300,6 @@ static void lcd_implementation_status_screen() { // XYZ Coordinates // - #if ENABLED(USE_SMALL_INFOFONT) - #define INFO_FONT_HEIGHT 7 - #else - #define INFO_FONT_HEIGHT 8 - #endif - #define XYZ_BASELINE (30 + INFO_FONT_HEIGHT) #define X_LABEL_POS 3 diff --git a/Marlin/stepper.cpp b/Marlin/stepper.cpp index 458e9d7925..809cc54a9d 100644 --- a/Marlin/stepper.cpp +++ b/Marlin/stepper.cpp @@ -948,31 +948,6 @@ void Stepper::init() { microstep_init(); #endif - // Init TMC Steppers - #if ENABLED(HAVE_TMC26X) - tmc_init(); - #endif - - // Init TMC2130 Steppers - #if ENABLED(HAVE_TMC2130) - tmc2130_init(); - #endif - - // Init TMC2208 Steppers - #if ENABLED(HAVE_TMC2208) - tmc2208_init(); - #endif - - // TRAMS, TMC2130 and TMC2208 advanced settings - #if HAS_TRINAMIC - TMC_ADV() - #endif - - // Init L6470 Steppers - #if ENABLED(HAVE_L6470DRIVER) - L6470_init(); - #endif - // Init Dir Pins #if HAS_X_DIR X_DIR_INIT; @@ -1137,7 +1112,7 @@ void Stepper::init() { /** * Block until all buffered steps are executed / cleaned */ -void Stepper::synchronize() { while (planner.blocks_queued() || cleaning_buffer_counter) idle(); } +void Stepper::synchronize() { while (planner.has_blocks_queued() || cleaning_buffer_counter) idle(); } /** * Set the stepper positions directly in steps @@ -1235,10 +1210,11 @@ void Stepper::finish_and_disable() { } void Stepper::quick_stop() { - cleaning_buffer_counter = 5000; DISABLE_STEPPER_DRIVER_INTERRUPT(); - while (planner.blocks_queued()) planner.discard_current_block(); + kill_current_block(); current_block = NULL; + cleaning_buffer_counter = 5000; + planner.clear_block_buffer(); ENABLE_STEPPER_DRIVER_INTERRUPT(); #if ENABLED(ULTRA_LCD) planner.clear_block_buffer_runtime(); @@ -1271,21 +1247,21 @@ void Stepper::report_positions() { zpos = count_position[Z_AXIS]; CRITICAL_SECTION_END; - #if CORE_IS_XY || CORE_IS_XZ || IS_SCARA + #if CORE_IS_XY || CORE_IS_XZ || IS_DELTA || IS_SCARA SERIAL_PROTOCOLPGM(MSG_COUNT_A); #else SERIAL_PROTOCOLPGM(MSG_COUNT_X); #endif SERIAL_PROTOCOL(xpos); - #if CORE_IS_XY || CORE_IS_YZ || IS_SCARA + #if CORE_IS_XY || CORE_IS_YZ || IS_DELTA || IS_SCARA SERIAL_PROTOCOLPGM(" B:"); #else SERIAL_PROTOCOLPGM(" Y:"); #endif SERIAL_PROTOCOL(ypos); - #if CORE_IS_XZ || CORE_IS_YZ + #if CORE_IS_XZ || CORE_IS_YZ || IS_DELTA SERIAL_PROTOCOLPGM(" C:"); #else SERIAL_PROTOCOLPGM(" Z:"); diff --git a/Marlin/stepper_indirection.cpp b/Marlin/stepper_indirection.cpp index bf75ad70ca..8e3f7e9e22 100644 --- a/Marlin/stepper_indirection.cpp +++ b/Marlin/stepper_indirection.cpp @@ -42,83 +42,82 @@ #include #include - #define _TMC_DEFINE(ST) TMC26XStepper stepper##ST(200, ST##_ENABLE_PIN, ST##_STEP_PIN, ST##_DIR_PIN, ST##_MAX_CURRENT, ST##_SENSE_RESISTOR) + #define _TMC26X_DEFINE(ST) TMC26XStepper stepper##ST(200, ST##_ENABLE_PIN, ST##_STEP_PIN, ST##_DIR_PIN, ST##_MAX_CURRENT, ST##_SENSE_RESISTOR) #if ENABLED(X_IS_TMC26X) - _TMC_DEFINE(X); + _TMC26X_DEFINE(X); #endif #if ENABLED(X2_IS_TMC26X) - _TMC_DEFINE(X2); + _TMC26X_DEFINE(X2); #endif #if ENABLED(Y_IS_TMC26X) - _TMC_DEFINE(Y); + _TMC26X_DEFINE(Y); #endif #if ENABLED(Y2_IS_TMC26X) - _TMC_DEFINE(Y2); + _TMC26X_DEFINE(Y2); #endif #if ENABLED(Z_IS_TMC26X) - _TMC_DEFINE(Z); + _TMC26X_DEFINE(Z); #endif #if ENABLED(Z2_IS_TMC26X) - _TMC_DEFINE(Z2); + _TMC26X_DEFINE(Z2); #endif #if ENABLED(E0_IS_TMC26X) - _TMC_DEFINE(E0); + _TMC26X_DEFINE(E0); #endif #if ENABLED(E1_IS_TMC26X) - _TMC_DEFINE(E1); + _TMC26X_DEFINE(E1); #endif #if ENABLED(E2_IS_TMC26X) - _TMC_DEFINE(E2); + _TMC26X_DEFINE(E2); #endif #if ENABLED(E3_IS_TMC26X) - _TMC_DEFINE(E3); + _TMC26X_DEFINE(E3); #endif #if ENABLED(E4_IS_TMC26X) - _TMC_DEFINE(E4); + _TMC26X_DEFINE(E4); #endif - #define _TMC_INIT(A) do{ \ + #define _TMC26X_INIT(A) do{ \ stepper##A.setMicrosteps(A##_MICROSTEPS); \ stepper##A.start(); \ }while(0) - void tmc_init() { + void tmc26x_init_to_defaults() { #if ENABLED(X_IS_TMC26X) - _TMC_INIT(X); + _TMC26X_INIT(X); #endif #if ENABLED(X2_IS_TMC26X) - _TMC_INIT(X2); + _TMC26X_INIT(X2); #endif #if ENABLED(Y_IS_TMC26X) - _TMC_INIT(Y); + _TMC26X_INIT(Y); #endif #if ENABLED(Y2_IS_TMC26X) - _TMC_INIT(Y2); + _TMC26X_INIT(Y2); #endif #if ENABLED(Z_IS_TMC26X) - _TMC_INIT(Z); + _TMC26X_INIT(Z); #endif #if ENABLED(Z2_IS_TMC26X) - _TMC_INIT(Z2); + _TMC26X_INIT(Z2); #endif #if ENABLED(E0_IS_TMC26X) - _TMC_INIT(E0); + _TMC26X_INIT(E0); #endif #if ENABLED(E1_IS_TMC26X) - _TMC_INIT(E1); + _TMC26X_INIT(E1); #endif #if ENABLED(E2_IS_TMC26X) - _TMC_INIT(E2); + _TMC26X_INIT(E2); #endif #if ENABLED(E3_IS_TMC26X) - _TMC_INIT(E3); + _TMC26X_INIT(E3); #endif #if ENABLED(E4_IS_TMC26X) - _TMC_INIT(E4); + _TMC26X_INIT(E4); #endif } - #endif // HAVE_TMC26X // @@ -131,13 +130,16 @@ #include "planner.h" #include "enum.h" + #if TMC2130STEPPER_VERSION < 0x020201 + #error "Update TMC2130Stepper library to 2.2.1 or newer." + #endif + #if ENABLED(TMC_USE_SW_SPI) #define _TMC2130_DEFINE(ST) TMC2130Stepper stepper##ST(ST##_ENABLE_PIN, ST##_DIR_PIN, ST##_STEP_PIN, ST##_CS_PIN, TMC_SW_MOSI, TMC_SW_MISO, TMC_SW_SCK) #else #define _TMC2130_DEFINE(ST) TMC2130Stepper stepper##ST(ST##_ENABLE_PIN, ST##_DIR_PIN, ST##_STEP_PIN, ST##_CS_PIN) #endif - // Stepper objects of TMC2130 steppers used #if ENABLED(X_IS_TMC2130) _TMC2130_DEFINE(X); @@ -176,9 +178,9 @@ // Use internal reference voltage for current calculations. This is the default. // Following values from Trinamic's spreadsheet with values for a NEMA17 (42BYGHW609) // https://www.trinamic.com/products/integrated-circuits/details/tmc2130/ - void tmc2130_init(TMC2130Stepper &st, const uint16_t microsteps, const uint32_t thrs, const float spmm) { + void tmc2130_init(TMC2130Stepper &st, const uint16_t mA, const uint16_t microsteps, const uint32_t thrs, const float spmm) { st.begin(); - st.setCurrent(st.getCurrent(), R_SENSE, HOLD_MULTIPLIER); + st.setCurrent(mA, R_SENSE, HOLD_MULTIPLIER); st.microsteps(microsteps); st.blank_time(24); st.off_time(5); // Only enables the driver if used with stealthChop @@ -186,7 +188,6 @@ st.power_down_delay(128); // ~2s until driver lowers to hold current st.hysteresis_start(3); st.hysteresis_end(2); - st.diag1_active_high(1); // For sensorless homing #if ENABLED(STEALTHCHOP) st.stealth_freq(1); // f_pwm = 2/683 f_clk st.stealth_autoscale(1); @@ -205,9 +206,9 @@ st.GSTAT(); // Clear GSTAT } - #define _TMC2130_INIT(ST, SPMM) tmc2130_init(stepper##ST, ST##_MICROSTEPS, ST##_HYBRID_THRESHOLD, SPMM) + #define _TMC2130_INIT(ST, SPMM) tmc2130_init(stepper##ST, ST##_CURRENT, ST##_MICROSTEPS, ST##_HYBRID_THRESHOLD, SPMM) - void tmc2130_init() { + void tmc2130_init_to_defaults() { #if ENABLED(X_IS_TMC2130) _TMC2130_INIT( X, planner.axis_steps_per_mm[X_AXIS]); #endif @@ -242,7 +243,35 @@ { constexpr int extruder = 4; _TMC2130_INIT(E4, planner.axis_steps_per_mm[E_AXIS_N]); } #endif + #if ENABLED(SENSORLESS_HOMING) + #define TMC_INIT_SGT(P,Q) stepper##Q.sgt(P##_HOMING_SENSITIVITY); + #ifdef X_HOMING_SENSITIVITY + #if ENABLED(X_IS_TMC2130) || ENABLED(IS_TRAMS) + stepperX.sgt(X_HOMING_SENSITIVITY); + #endif + #if ENABLED(X2_IS_TMC2130) + stepperX2.sgt(X_HOMING_SENSITIVITY); + #endif + #endif + #ifdef Y_HOMING_SENSITIVITY + #if ENABLED(Y_IS_TMC2130) || ENABLED(IS_TRAMS) + stepperY.sgt(Y_HOMING_SENSITIVITY); + #endif + #if ENABLED(Y2_IS_TMC2130) + stepperY2.sgt(Y_HOMING_SENSITIVITY); + #endif + #endif + #ifdef Z_HOMING_SENSITIVITY + #if ENABLED(Z_IS_TMC2130) || ENABLED(IS_TRAMS) + stepperZ.sgt(Z_HOMING_SENSITIVITY); + #endif + #if ENABLED(Z2_IS_TMC2130) + stepperZ2.sgt(Z_HOMING_SENSITIVITY); + #endif + #endif + #endif } + #endif // HAVE_TMC2130 // @@ -256,6 +285,10 @@ #include #include "planner.h" + #if TMC2208STEPPER_VERSION < 0x000101 + #error "Update TMC2208Stepper library to 0.1.1 or newer." + #endif + #define _TMC2208_DEFINE_HARDWARE(ST) TMC2208Stepper stepper##ST(&ST##_HARDWARE_SERIAL) #define _TMC2208_DEFINE_SOFTWARE(ST) SoftwareSerial ST##_HARDWARE_SERIAL = SoftwareSerial(ST##_SERIAL_RX_PIN, ST##_SERIAL_TX_PIN); \ TMC2208Stepper stepper##ST(&ST##_HARDWARE_SERIAL, ST##_SERIAL_RX_PIN > -1) @@ -377,11 +410,11 @@ // Use internal reference voltage for current calculations. This is the default. // Following values from Trinamic's spreadsheet with values for a NEMA17 (42BYGHW609) - void tmc2208_init(TMC2208Stepper &st, const uint16_t microsteps, const uint32_t thrs, const float spmm) { + void tmc2208_init(TMC2208Stepper &st, const uint16_t mA, const uint16_t microsteps, const uint32_t thrs, const float spmm) { st.pdn_disable(true); // Use UART st.mstep_reg_select(true); // Select microsteps with UART st.I_scale_analog(false); - st.rms_current(st.getCurrent(), HOLD_MULTIPLIER, R_SENSE); + st.rms_current(mA, HOLD_MULTIPLIER, R_SENSE); st.microsteps(microsteps); st.blank_time(24); st.toff(5); @@ -411,9 +444,9 @@ delay(200); } - #define _TMC2208_INIT(ST, SPMM) tmc2208_init(stepper##ST, ST##_MICROSTEPS, ST##_HYBRID_THRESHOLD, SPMM) + #define _TMC2208_INIT(ST, SPMM) tmc2208_init(stepper##ST, ST##_CURRENT, ST##_MICROSTEPS, ST##_HYBRID_THRESHOLD, SPMM) - void tmc2208_init() { + void tmc2208_init_to_defaults() { #if ENABLED(X_IS_TMC2208) _TMC2208_INIT(X, planner.axis_steps_per_mm[X_AXIS]); #endif @@ -448,8 +481,63 @@ { constexpr int extruder = 4; _TMC2208_INIT(E4, planner.axis_steps_per_mm[E_AXIS_N]); } #endif } + #endif // HAVE_TMC2208 +void restore_stepper_drivers() { + #if X_IS_TRINAMIC + stepperX.push(); + #endif + #if X2_IS_TRINAMIC + stepperX2.push(); + #endif + #if Y_IS_TRINAMIC + stepperY.push(); + #endif + #if Y2_IS_TRINAMIC + stepperY2.push(); + #endif + #if Z_IS_TRINAMIC + stepperZ.push(); + #endif + #if Z2_IS_TRINAMIC + stepperZ2.push(); + #endif + #if E0_IS_TRINAMIC + stepperE0.push(); + #endif + #if E1_IS_TRINAMIC + stepperE1.push(); + #endif + #if E2_IS_TRINAMIC + stepperE2.push(); + #endif + #if E3_IS_TRINAMIC + stepperE3.push(); + #endif + #if E4_IS_TRINAMIC + stepperE4.push(); + #endif +} + +void reset_stepper_drivers() { + #if ENABLED(HAVE_TMC26X) + tmc26x_init_to_defaults(); + #endif + #if ENABLED(HAVE_TMC2130) + tmc2130_init_to_defaults(); + #endif + #if ENABLED(HAVE_TMC2208) + tmc2208_init_to_defaults(); + #endif + #ifdef TMC_ADV + TMC_ADV() + #endif + #if ENABLED(HAVE_L6470DRIVER) + L6470_init_to_defaults(); + #endif +} + // // L6470 Driver objects and inits // @@ -503,7 +591,7 @@ stepper##A.setStallCurrent(A##_STALLCURRENT); \ }while(0) - void L6470_init() { + void L6470_init_to_defaults() { #if ENABLED(X_IS_L6470) _L6470_INIT(X); #endif diff --git a/Marlin/stepper_indirection.h b/Marlin/stepper_indirection.h index 0f1e98d170..472b0884bf 100644 --- a/Marlin/stepper_indirection.h +++ b/Marlin/stepper_indirection.h @@ -50,29 +50,32 @@ #if ENABLED(HAVE_TMC26X) #include #include - void tmc_init(); + void tmc26x_init_to_defaults(); #endif #if ENABLED(HAVE_TMC2130) #include - void tmc2130_init(); + void tmc2130_init_to_defaults(); #endif #if ENABLED(HAVE_TMC2208) #include void tmc2208_serial_begin(); - void tmc2208_init(); + void tmc2208_init_to_defaults(); #endif // L6470 has STEP on normal pins, but DIR/ENABLE via SPI #if ENABLED(HAVE_L6470DRIVER) #include #include - void L6470_init(); + void L6470_init_to_defaults(); #endif +void restore_stepper_drivers(); // Called by PSU_ON +void reset_stepper_drivers(); // Called by settings.load / settings.reset + // X Stepper -#if ENABLED(HAVE_L6470DRIVER) && ENABLED(X_IS_L6470) +#if ENABLED(X_IS_L6470) extern L6470 stepperX; #define X_ENABLE_INIT NOOP #define X_ENABLE_WRITE(STATE) do{ if (STATE) stepperX.Step_Clock(stepperX.getStatus() & STATUS_HIZ); else stepperX.softFree(); }while(0) @@ -81,15 +84,15 @@ #define X_DIR_WRITE(STATE) stepperX.Step_Clock(STATE) #define X_DIR_READ (stepperX.getStatus() & STATUS_DIR) #else - #if ENABLED(HAVE_TMC26X) && ENABLED(X_IS_TMC26X) + #if ENABLED(X_IS_TMC26X) extern TMC26XStepper stepperX; #define X_ENABLE_INIT NOOP #define X_ENABLE_WRITE(STATE) stepperX.setEnabled(STATE) #define X_ENABLE_READ stepperX.isEnabled() #else - #if ENABLED(HAVE_TMC2130) && ENABLED(X_IS_TMC2130) + #if ENABLED(X_IS_TMC2130) extern TMC2130Stepper stepperX; - #elif ENABLED(HAVE_TMC2208) && ENABLED(X_IS_TMC2208) + #elif ENABLED(X_IS_TMC2208) extern TMC2208Stepper stepperX; #endif #define X_ENABLE_INIT SET_OUTPUT(X_ENABLE_PIN) @@ -105,7 +108,7 @@ #define X_STEP_READ READ(X_STEP_PIN) // Y Stepper -#if ENABLED(HAVE_L6470DRIVER) && ENABLED(Y_IS_L6470) +#if ENABLED(Y_IS_L6470) extern L6470 stepperY; #define Y_ENABLE_INIT NOOP #define Y_ENABLE_WRITE(STATE) do{ if (STATE) stepperY.Step_Clock(stepperY.getStatus() & STATUS_HIZ); else stepperY.softFree(); }while(0) @@ -114,15 +117,15 @@ #define Y_DIR_WRITE(STATE) stepperY.Step_Clock(STATE) #define Y_DIR_READ (stepperY.getStatus() & STATUS_DIR) #else - #if ENABLED(HAVE_TMC26X) && ENABLED(Y_IS_TMC26X) + #if ENABLED(Y_IS_TMC26X) extern TMC26XStepper stepperY; #define Y_ENABLE_INIT NOOP #define Y_ENABLE_WRITE(STATE) stepperY.setEnabled(STATE) #define Y_ENABLE_READ stepperY.isEnabled() #else - #if ENABLED(HAVE_TMC2130) && ENABLED(Y_IS_TMC2130) + #if ENABLED(Y_IS_TMC2130) extern TMC2130Stepper stepperY; - #elif ENABLED(HAVE_TMC2208) && ENABLED(Y_IS_TMC2208) + #elif ENABLED(Y_IS_TMC2208) extern TMC2208Stepper stepperY; #endif #define Y_ENABLE_INIT SET_OUTPUT(Y_ENABLE_PIN) @@ -138,7 +141,7 @@ #define Y_STEP_READ READ(Y_STEP_PIN) // Z Stepper -#if ENABLED(HAVE_L6470DRIVER) && ENABLED(Z_IS_L6470) +#if ENABLED(Z_IS_L6470) extern L6470 stepperZ; #define Z_ENABLE_INIT NOOP #define Z_ENABLE_WRITE(STATE) do{ if (STATE) stepperZ.Step_Clock(stepperZ.getStatus() & STATUS_HIZ); else stepperZ.softFree(); }while(0) @@ -147,15 +150,15 @@ #define Z_DIR_WRITE(STATE) stepperZ.Step_Clock(STATE) #define Z_DIR_READ (stepperZ.getStatus() & STATUS_DIR) #else - #if ENABLED(HAVE_TMC26X) && ENABLED(Z_IS_TMC26X) + #if ENABLED(Z_IS_TMC26X) extern TMC26XStepper stepperZ; #define Z_ENABLE_INIT NOOP #define Z_ENABLE_WRITE(STATE) stepperZ.setEnabled(STATE) #define Z_ENABLE_READ stepperZ.isEnabled() #else - #if ENABLED(HAVE_TMC2130) && ENABLED(Z_IS_TMC2130) + #if ENABLED(Z_IS_TMC2130) extern TMC2130Stepper stepperZ; - #elif ENABLED(HAVE_TMC2208) && ENABLED(Z_IS_TMC2208) + #elif ENABLED(Z_IS_TMC2208) extern TMC2208Stepper stepperZ; #endif #define Z_ENABLE_INIT SET_OUTPUT(Z_ENABLE_PIN) @@ -172,7 +175,7 @@ // X2 Stepper #if HAS_X2_ENABLE - #if ENABLED(HAVE_L6470DRIVER) && ENABLED(X2_IS_L6470) + #if ENABLED(X2_IS_L6470) extern L6470 stepperX2; #define X2_ENABLE_INIT NOOP #define X2_ENABLE_WRITE(STATE) do{ if (STATE) stepperX2.Step_Clock(stepperX2.getStatus() & STATUS_HIZ); else stepperX2.softFree(); }while(0) @@ -181,15 +184,15 @@ #define X2_DIR_WRITE(STATE) stepperX2.Step_Clock(STATE) #define X2_DIR_READ (stepperX2.getStatus() & STATUS_DIR) #else - #if ENABLED(HAVE_TMC26X) && ENABLED(X2_IS_TMC26X) + #if ENABLED(X2_IS_TMC26X) extern TMC26XStepper stepperX2; #define X2_ENABLE_INIT NOOP #define X2_ENABLE_WRITE(STATE) stepperX2.setEnabled(STATE) #define X2_ENABLE_READ stepperX2.isEnabled() #else - #if ENABLED(HAVE_TMC2130) && ENABLED(X2_IS_TMC2130) + #if ENABLED(X2_IS_TMC2130) extern TMC2130Stepper stepperX2; - #elif ENABLED(HAVE_TMC2208) && ENABLED(X2_IS_TMC2208) + #elif ENABLED(X2_IS_TMC2208) extern TMC2208Stepper stepperX2; #endif #define X2_ENABLE_INIT SET_OUTPUT(X2_ENABLE_PIN) @@ -207,7 +210,7 @@ // Y2 Stepper #if HAS_Y2_ENABLE - #if ENABLED(HAVE_L6470DRIVER) && ENABLED(Y2_IS_L6470) + #if ENABLED(Y2_IS_L6470) extern L6470 stepperY2; #define Y2_ENABLE_INIT NOOP #define Y2_ENABLE_WRITE(STATE) do{ if (STATE) stepperY2.Step_Clock(stepperY2.getStatus() & STATUS_HIZ); else stepperY2.softFree(); }while(0) @@ -216,15 +219,15 @@ #define Y2_DIR_WRITE(STATE) stepperY2.Step_Clock(STATE) #define Y2_DIR_READ (stepperY2.getStatus() & STATUS_DIR) #else - #if ENABLED(HAVE_TMC26X) && ENABLED(Y2_IS_TMC26X) + #if ENABLED(Y2_IS_TMC26X) extern TMC26XStepper stepperY2; #define Y2_ENABLE_INIT NOOP #define Y2_ENABLE_WRITE(STATE) stepperY2.setEnabled(STATE) #define Y2_ENABLE_READ stepperY2.isEnabled() #else - #if ENABLED(HAVE_TMC2130) && ENABLED(Y2_IS_TMC2130) + #if ENABLED(Y2_IS_TMC2130) extern TMC2130Stepper stepperY2; - #elif ENABLED(HAVE_TMC2208) && ENABLED(Y2_IS_TMC2208) + #elif ENABLED(Y2_IS_TMC2208) extern TMC2208Stepper stepperY2; #endif #define Y2_ENABLE_INIT SET_OUTPUT(Y2_ENABLE_PIN) @@ -242,7 +245,7 @@ // Z2 Stepper #if HAS_Z2_ENABLE - #if ENABLED(HAVE_L6470DRIVER) && ENABLED(Z2_IS_L6470) + #if ENABLED(Z2_IS_L6470) extern L6470 stepperZ2; #define Z2_ENABLE_INIT NOOP #define Z2_ENABLE_WRITE(STATE) do{ if (STATE) stepperZ2.Step_Clock(stepperZ2.getStatus() & STATUS_HIZ); else stepperZ2.softFree(); }while(0) @@ -251,15 +254,15 @@ #define Z2_DIR_WRITE(STATE) stepperZ2.Step_Clock(STATE) #define Z2_DIR_READ (stepperZ2.getStatus() & STATUS_DIR) #else - #if ENABLED(HAVE_TMC26X) && ENABLED(Z2_IS_TMC26X) + #if ENABLED(Z2_IS_TMC26X) extern TMC26XStepper stepperZ2; #define Z2_ENABLE_INIT NOOP #define Z2_ENABLE_WRITE(STATE) stepperZ2.setEnabled(STATE) #define Z2_ENABLE_READ stepperZ2.isEnabled() #else - #if ENABLED(HAVE_TMC2130) && ENABLED(Z2_IS_TMC2130) + #if ENABLED(Z2_IS_TMC2130) extern TMC2130Stepper stepperZ2; - #elif ENABLED(HAVE_TMC2208) && ENABLED(Z2_IS_TMC2208) + #elif ENABLED(Z2_IS_TMC2208) extern TMC2208Stepper stepperZ2; #endif #define Z2_ENABLE_INIT SET_OUTPUT(Z2_ENABLE_PIN) @@ -276,7 +279,7 @@ #endif // E0 Stepper -#if ENABLED(HAVE_L6470DRIVER) && ENABLED(E0_IS_L6470) +#if ENABLED(E0_IS_L6470) extern L6470 stepperE0; #define E0_ENABLE_INIT NOOP #define E0_ENABLE_WRITE(STATE) do{ if (STATE) stepperE0.Step_Clock(stepperE0.getStatus() & STATUS_HIZ); else stepperE0.softFree(); }while(0) @@ -285,15 +288,15 @@ #define E0_DIR_WRITE(STATE) stepperE0.Step_Clock(STATE) #define E0_DIR_READ (stepperE0.getStatus() & STATUS_DIR) #else - #if ENABLED(HAVE_TMC26X) && ENABLED(E0_IS_TMC26X) + #if ENABLED(E0_IS_TMC26X) extern TMC26XStepper stepperE0; #define E0_ENABLE_INIT NOOP #define E0_ENABLE_WRITE(STATE) stepperE0.setEnabled(STATE) #define E0_ENABLE_READ stepperE0.isEnabled() #else - #if ENABLED(HAVE_TMC2130) && ENABLED(E0_IS_TMC2130) + #if ENABLED(E0_IS_TMC2130) extern TMC2130Stepper stepperE0; - #elif ENABLED(HAVE_TMC2208) && ENABLED(E0_IS_TMC2208) + #elif ENABLED(E0_IS_TMC2208) extern TMC2208Stepper stepperE0; #endif #define E0_ENABLE_INIT SET_OUTPUT(E0_ENABLE_PIN) @@ -309,7 +312,7 @@ #define E0_STEP_READ READ(E0_STEP_PIN) // E1 Stepper -#if ENABLED(HAVE_L6470DRIVER) && ENABLED(E1_IS_L6470) +#if ENABLED(E1_IS_L6470) extern L6470 stepperE1; #define E1_ENABLE_INIT NOOP #define E1_ENABLE_WRITE(STATE) do{ if (STATE) stepperE1.Step_Clock(stepperE1.getStatus() & STATUS_HIZ); else stepperE1.softFree(); }while(0) @@ -318,15 +321,15 @@ #define E1_DIR_WRITE(STATE) stepperE1.Step_Clock(STATE) #define E1_DIR_READ (stepperE1.getStatus() & STATUS_DIR) #else - #if ENABLED(HAVE_TMC26X) && ENABLED(E1_IS_TMC26X) + #if ENABLED(E1_IS_TMC26X) extern TMC26XStepper stepperE1; #define E1_ENABLE_INIT NOOP #define E1_ENABLE_WRITE(STATE) stepperE1.setEnabled(STATE) #define E1_ENABLE_READ stepperE1.isEnabled() #else - #if ENABLED(HAVE_TMC2130) && ENABLED(E1_IS_TMC2130) + #if ENABLED(E1_IS_TMC2130) extern TMC2130Stepper stepperE1; - #elif ENABLED(HAVE_TMC2208) && ENABLED(E1_IS_TMC2208) + #elif ENABLED(E1_IS_TMC2208) extern TMC2208Stepper stepperE1; #endif #define E1_ENABLE_INIT SET_OUTPUT(E1_ENABLE_PIN) @@ -342,7 +345,7 @@ #define E1_STEP_READ READ(E1_STEP_PIN) // E2 Stepper -#if ENABLED(HAVE_L6470DRIVER) && ENABLED(E2_IS_L6470) +#if ENABLED(E2_IS_L6470) extern L6470 stepperE2; #define E2_ENABLE_INIT NOOP #define E2_ENABLE_WRITE(STATE) do{ if (STATE) stepperE2.Step_Clock(stepperE2.getStatus() & STATUS_HIZ); else stepperE2.softFree(); }while(0) @@ -351,15 +354,15 @@ #define E2_DIR_WRITE(STATE) stepperE2.Step_Clock(STATE) #define E2_DIR_READ (stepperE2.getStatus() & STATUS_DIR) #else - #if ENABLED(HAVE_TMC26X) && ENABLED(E2_IS_TMC26X) + #if ENABLED(E2_IS_TMC26X) extern TMC26XStepper stepperE2; #define E2_ENABLE_INIT NOOP #define E2_ENABLE_WRITE(STATE) stepperE2.setEnabled(STATE) #define E2_ENABLE_READ stepperE2.isEnabled() #else - #if ENABLED(HAVE_TMC2130) && ENABLED(E2_IS_TMC2130) + #if ENABLED(E2_IS_TMC2130) extern TMC2130Stepper stepperE2; - #elif ENABLED(HAVE_TMC2208) && ENABLED(E2_IS_TMC2208) + #elif ENABLED(E2_IS_TMC2208) extern TMC2208Stepper stepperE2; #endif #define E2_ENABLE_INIT SET_OUTPUT(E2_ENABLE_PIN) @@ -375,7 +378,7 @@ #define E2_STEP_READ READ(E2_STEP_PIN) // E3 Stepper -#if ENABLED(HAVE_L6470DRIVER) && ENABLED(E3_IS_L6470) +#if ENABLED(E3_IS_L6470) extern L6470 stepperE3; #define E3_ENABLE_INIT NOOP #define E3_ENABLE_WRITE(STATE) do{ if (STATE) stepperE3.Step_Clock(stepperE3.getStatus() & STATUS_HIZ); else stepperE3.softFree(); }while(0) @@ -384,15 +387,15 @@ #define E3_DIR_WRITE(STATE) stepperE3.Step_Clock(STATE) #define E3_DIR_READ (stepperE3.getStatus() & STATUS_DIR) #else - #if ENABLED(HAVE_TMC26X) && ENABLED(E3_IS_TMC26X) + #if ENABLED(E3_IS_TMC26X) extern TMC26XStepper stepperE3; #define E3_ENABLE_INIT NOOP #define E3_ENABLE_WRITE(STATE) stepperE3.setEnabled(STATE) #define E3_ENABLE_READ stepperE3.isEnabled() #else - #if ENABLED(HAVE_TMC2130) && ENABLED(E3_IS_TMC2130) + #if ENABLED(E3_IS_TMC2130) extern TMC2130Stepper stepperE3; - #elif ENABLED(HAVE_TMC2208) && ENABLED(E3_IS_TMC2208) + #elif ENABLED(E3_IS_TMC2208) extern TMC2208Stepper stepperE3; #endif #define E3_ENABLE_INIT SET_OUTPUT(E3_ENABLE_PIN) @@ -408,7 +411,7 @@ #define E3_STEP_READ READ(E3_STEP_PIN) // E4 Stepper -#if ENABLED(HAVE_L6470DRIVER) && ENABLED(E4_IS_L6470) +#if ENABLED(E4_IS_L6470) extern L6470 stepperE4; #define E4_ENABLE_INIT NOOP #define E4_ENABLE_WRITE(STATE) do{ if (STATE) stepperE4.Step_Clock(stepperE4.getStatus() & STATUS_HIZ); else stepperE4.softFree(); }while(0) @@ -417,15 +420,15 @@ #define E4_DIR_WRITE(STATE) stepperE4.Step_Clock(STATE) #define E4_DIR_READ (stepperE4.getStatus() & STATUS_DIR) #else - #if ENABLED(HAVE_TMC26X) && ENABLED(E4_IS_TMC26X) + #if ENABLED(E4_IS_TMC26X) extern TMC26XStepper stepperE4; #define E4_ENABLE_INIT NOOP #define E4_ENABLE_WRITE(STATE) stepperE4.setEnabled(STATE) #define E4_ENABLE_READ stepperE4.isEnabled() #else - #if ENABLED(HAVE_TMC2130) && ENABLED(E4_IS_TMC2130) + #if ENABLED(E4_IS_TMC2130) extern TMC2130Stepper stepperE4; - #elif ENABLED(HAVE_TMC2208) && ENABLED(E4_IS_TMC2208) + #elif ENABLED(E4_IS_TMC2208) extern TMC2208Stepper stepperE4; #endif #define E4_ENABLE_INIT SET_OUTPUT(E4_ENABLE_PIN) diff --git a/Marlin/stopwatch.cpp b/Marlin/stopwatch.cpp index e918265cd5..e5bc015904 100644 --- a/Marlin/stopwatch.cpp +++ b/Marlin/stopwatch.cpp @@ -71,6 +71,15 @@ bool Stopwatch::start() { else return false; } +void Stopwatch::resume(const millis_t duration) { + #if ENABLED(DEBUG_STOPWATCH) + Stopwatch::debug(PSTR("resume")); + #endif + + reset(); + if ((accumulator = duration)) state = RUNNING; +} + void Stopwatch::reset() { #if ENABLED(DEBUG_STOPWATCH) Stopwatch::debug(PSTR("reset")); @@ -82,16 +91,8 @@ void Stopwatch::reset() { accumulator = 0; } -bool Stopwatch::isRunning() { - return (state == RUNNING) ? true : false; -} - -bool Stopwatch::isPaused() { - return (state == PAUSED) ? true : false; -} - millis_t Stopwatch::duration() { - return (((isRunning()) ? millis() : stopTimestamp) + return ((isRunning() ? millis() : stopTimestamp) - startTimestamp) / 1000UL + accumulator; } diff --git a/Marlin/stopwatch.h b/Marlin/stopwatch.h index f5ac78bfae..f5e04bbde8 100644 --- a/Marlin/stopwatch.h +++ b/Marlin/stopwatch.h @@ -54,29 +54,35 @@ class Stopwatch { FORCE_INLINE static void init() { reset(); } /** - * @brief Stops the stopwatch - * @details Stops the running timer, it will silently ignore the request if - * no timer is currently running. - * @return true is method was successful + * @brief Stop the stopwatch + * @details Stop the running timer. Silently ignore the request if + * no timer is running. + * @return true on success */ static bool stop(); /** * @brief Pause the stopwatch * @details Pause the running timer, it will silently ignore the request if - * no timer is currently running. - * @return true is method was successful + * no timer is running. + * @return true on success */ static bool pause(); /** * @brief Start the stopwatch * @details Start the timer, it will silently ignore the request if the - * timer is already running. - * @return true is method was successful + * timer is already running. + * @return true on success */ static bool start(); + /** + * @brief Resume the stopwatch + * @details Resume a timer from a given duration + */ + static void resume(const millis_t duration); + /** * @brief Reset the stopwatch * @details Reset all settings to their default values. @@ -88,14 +94,14 @@ class Stopwatch { * @details Return true if the timer is currently running, false otherwise. * @return true if stopwatch is running */ - static bool isRunning(); + FORCE_INLINE static bool isRunning() { return state == RUNNING; } /** * @brief Check if the timer is paused * @details Return true if the timer is currently paused, false otherwise. * @return true if stopwatch is paused */ - static bool isPaused(); + FORCE_INLINE static bool isPaused() { return state == PAUSED; } /** * @brief Get the running time diff --git a/Marlin/temperature.cpp b/Marlin/temperature.cpp index ad0e27f003..8db4a1209f 100644 --- a/Marlin/temperature.cpp +++ b/Marlin/temperature.cpp @@ -58,13 +58,36 @@ Temperature thermalManager; +/** + * Macros to include the heater id in temp errors. The compiler's dead-code + * elimination should (hopefully) optimize out the unused strings. + */ +#if HAS_TEMP_BED + #define TEMP_ERR_PSTR(MSG, E) \ + (E) == -1 ? PSTR(MSG ## _BED) : \ + (HOTENDS > 1 && (E) == 1) ? PSTR(MSG_E2 " " MSG) : \ + (HOTENDS > 2 && (E) == 2) ? PSTR(MSG_E3 " " MSG) : \ + (HOTENDS > 3 && (E) == 3) ? PSTR(MSG_E4 " " MSG) : \ + (HOTENDS > 4 && (E) == 4) ? PSTR(MSG_E5 " " MSG) : \ + PSTR(MSG_E1 " " MSG) +#else + #define TEMP_ERR_PSTR(MSG, E) \ + (HOTENDS > 1 && (E) == 1) ? PSTR(MSG_E2 " " MSG) : \ + (HOTENDS > 2 && (E) == 2) ? PSTR(MSG_E3 " " MSG) : \ + (HOTENDS > 3 && (E) == 3) ? PSTR(MSG_E4 " " MSG) : \ + (HOTENDS > 4 && (E) == 4) ? PSTR(MSG_E5 " " MSG) : \ + PSTR(MSG_E1 " " MSG) +#endif + // public: float Temperature::current_temperature[HOTENDS] = { 0.0 }, + Temperature::current_temperature_chamber = 0.0, Temperature::current_temperature_bed = 0.0; int16_t Temperature::current_temperature_raw[HOTENDS] = { 0 }, Temperature::target_temperature[HOTENDS] = { 0 }, + Temperature::current_temperature_chamber_raw = 0, Temperature::current_temperature_bed_raw = 0; #if ENABLED(AUTO_POWER_E_FANS) @@ -153,6 +176,7 @@ volatile bool Temperature::temp_meas_ready = false; #endif uint16_t Temperature::raw_temp_value[MAX_EXTRUDERS] = { 0 }, + Temperature::raw_temp_chamber_value = 0, Temperature::raw_temp_bed_value = 0; // Init min and max temp with extreme values to prevent false errors during startup @@ -442,12 +466,10 @@ uint8_t Temperature::soft_pwm_amount[HOTENDS], if (current > watch_temp_target) heated = true; // - Flag if target temperature reached } else if (ELAPSED(ms, temp_change_ms)) // Watch timer expired - _temp_error(hotend, PSTR(MSG_T_HEATING_FAILED), PSTR(MSG_HEATING_FAILED_LCD)); + _temp_error(hotend, PSTR(MSG_T_HEATING_FAILED), TEMP_ERR_PSTR(MSG_HEATING_FAILED_LCD, hotend)); } else if (current < target - (MAX_OVERSHOOT_PID_AUTOTUNE)) // Heated, then temperature fell too far? - _temp_error(hotend, PSTR(MSG_T_THERMAL_RUNAWAY), - hotend >= 0 ? PSTR(MSG_THERMAL_RUNAWAY) : PSTR(MSG_THERMAL_RUNAWAY_BED) - ); + _temp_error(hotend, PSTR(MSG_T_THERMAL_RUNAWAY), TEMP_ERR_PSTR(MSG_THERMAL_RUNAWAY, hotend)); } #endif } // every 2 seconds @@ -526,19 +548,22 @@ int Temperature::getHeaterPower(int heater) { #if HAS_AUTO_FAN void Temperature::checkExtruderAutoFans() { - static const pin_t fanPin[] PROGMEM = { E0_AUTO_FAN_PIN, E1_AUTO_FAN_PIN, E2_AUTO_FAN_PIN, E3_AUTO_FAN_PIN, E4_AUTO_FAN_PIN }; + static const pin_t fanPin[] PROGMEM = { E0_AUTO_FAN_PIN, E1_AUTO_FAN_PIN, E2_AUTO_FAN_PIN, E3_AUTO_FAN_PIN, E4_AUTO_FAN_PIN, CHAMBER_AUTO_FAN_PIN }; static const uint8_t fanBit[] PROGMEM = { 0, AUTO_1_IS_0 ? 0 : 1, AUTO_2_IS_0 ? 0 : AUTO_2_IS_1 ? 1 : 2, AUTO_3_IS_0 ? 0 : AUTO_3_IS_1 ? 1 : AUTO_3_IS_2 ? 2 : 3, - AUTO_4_IS_0 ? 0 : AUTO_4_IS_1 ? 1 : AUTO_4_IS_2 ? 2 : AUTO_4_IS_3 ? 3 : 4 + AUTO_4_IS_0 ? 0 : AUTO_4_IS_1 ? 1 : AUTO_4_IS_2 ? 2 : AUTO_4_IS_3 ? 3 : 4, + AUTO_CHAMBER_IS_0 ? 0 : AUTO_CHAMBER_IS_1 ? 1 : AUTO_CHAMBER_IS_2 ? 2 : AUTO_CHAMBER_IS_3 ? 3 : AUTO_CHAMBER_IS_4 ? 4 : 5 }; uint8_t fanState = 0; HOTEND_LOOP() if (current_temperature[e] > EXTRUDER_AUTO_FAN_TEMPERATURE) SBI(fanState, pgm_read_byte(&fanBit[e])); + if (current_temperature_chamber > EXTRUDER_AUTO_FAN_TEMPERATURE) + SBI(fanState, pgm_read_byte(&fanBit[5])); uint8_t fanDone = 0; for (uint8_t f = 0; f < COUNT(fanPin); f++) { @@ -582,24 +607,11 @@ void Temperature::_temp_error(const int8_t e, const char * const serial_msg, con } void Temperature::max_temp_error(const int8_t e) { - #if HAS_TEMP_BED - _temp_error(e, PSTR(MSG_T_MAXTEMP), e >= 0 ? PSTR(MSG_ERR_MAXTEMP) : PSTR(MSG_ERR_MAXTEMP_BED)); - #else - _temp_error(HOTEND_INDEX, PSTR(MSG_T_MAXTEMP), PSTR(MSG_ERR_MAXTEMP)); - #if HOTENDS == 1 - UNUSED(e); - #endif - #endif + _temp_error(e, PSTR(MSG_T_MAXTEMP), TEMP_ERR_PSTR(MSG_ERR_MAXTEMP, e)); } + void Temperature::min_temp_error(const int8_t e) { - #if HAS_TEMP_BED - _temp_error(e, PSTR(MSG_T_MINTEMP), e >= 0 ? PSTR(MSG_ERR_MINTEMP) : PSTR(MSG_ERR_MINTEMP_BED)); - #else - _temp_error(HOTEND_INDEX, PSTR(MSG_T_MINTEMP), PSTR(MSG_ERR_MINTEMP)); - #if HOTENDS == 1 - UNUSED(e); - #endif - #endif + _temp_error(e, PSTR(MSG_T_MINTEMP), TEMP_ERR_PSTR(MSG_ERR_MINTEMP, e)); } float Temperature::get_pid_output(const int8_t e) { @@ -795,7 +807,7 @@ void Temperature::manage_heater() { // Make sure temperature is increasing if (watch_heater_next_ms[e] && ELAPSED(ms, watch_heater_next_ms[e])) { // Time to check this extruder? if (degHotend(e) < watch_target_temp[e]) // Failed to increase enough? - _temp_error(e, PSTR(MSG_T_HEATING_FAILED), PSTR(MSG_HEATING_FAILED_LCD)); + _temp_error(e, PSTR(MSG_T_HEATING_FAILED), TEMP_ERR_PSTR(MSG_HEATING_FAILED_LCD, e)); else // Start again if the target is still far off start_watching_heater(e); } @@ -833,7 +845,7 @@ void Temperature::manage_heater() { // Make sure temperature is increasing if (watch_bed_next_ms && ELAPSED(ms, watch_bed_next_ms)) { // Time to check the bed? if (degBed() < watch_target_bed_temp) // Failed to increase enough? - _temp_error(-1, PSTR(MSG_T_HEATING_FAILED), PSTR(MSG_HEATING_FAILED_LCD)); + _temp_error(-1, PSTR(MSG_T_HEATING_FAILED), TEMP_ERR_PSTR(MSG_HEATING_FAILED_LCD, -1)); else // Start again if the target is still far off start_watching_bed(); } @@ -976,6 +988,42 @@ float Temperature::analog2temp(const int raw, const uint8_t e) { } #endif // HAS_TEMP_BED +#if HAS_TEMP_CHAMBER + // Derived from RepRap FiveD extruder::getTemperature() + // For chamber temperature measurement. + float Temperature::analog2tempChamber(const int raw) { + #if ENABLED(CHAMBER_USES_THERMISTOR) + float celsius = 0; + byte i; + + for (i = 1; i < CHAMBERTEMPTABLE_LEN; i++) { + if (PGM_RD_W(CHAMBERTEMPTABLE[i][0]) > raw) { + celsius = PGM_RD_W(CHAMBERTEMPTABLE[i - 1][1]) + + (raw - PGM_RD_W(CHAMBERTEMPTABLE[i - 1][0])) * + (float)(PGM_RD_W(CHAMBERTEMPTABLE[i][1]) - PGM_RD_W(CHAMBERTEMPTABLE[i - 1][1])) / + (float)(PGM_RD_W(CHAMBERTEMPTABLE[i][0]) - PGM_RD_W(CHAMBERTEMPTABLE[i - 1][0])); + break; + } + } + + // Overflow: Set to last value in the table + if (i == CHAMBERTEMPTABLE_LEN) celsius = PGM_RD_W(CHAMBERTEMPTABLE[i - 1][1]); + + return celsius; + + #elif defined(CHAMBER_USES_AD595) + + return ((raw * ((5.0 * 100.0) / 1024.0) / OVERSAMPLENR) * (TEMP_SENSOR_AD595_GAIN)) + TEMP_SENSOR_AD595_OFFSET; + + #else + + UNUSED(raw); + return 0; + + #endif + } +#endif // HAS_TEMP_CHAMBER + /** * Get the raw values into the actual temperatures. * The raw values are created in interrupt context, @@ -991,6 +1039,9 @@ void Temperature::updateTemperaturesFromRawValues() { #if HAS_TEMP_BED current_temperature_bed = Temperature::analog2tempBed(current_temperature_bed_raw); #endif + #if HAS_TEMP_CHAMBER + current_temperature_chamber = Temperature::analog2tempChamber(current_temperature_chamber_raw); + #endif #if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT) redundant_temperature = Temperature::analog2temp(redundant_temperature_raw, 1); #endif @@ -1048,7 +1099,7 @@ void Temperature::updateTemperaturesFromRawValues() { */ void Temperature::init() { - #if MB(RUMBA) && (TEMP_SENSOR_0 == -1 || TEMP_SENSOR_1 == -1 || TEMP_SENSOR_2 == -1 || TEMP_SENSOR_BED == -1) + #if MB(RUMBA) && (TEMP_SENSOR_0 == -1 || TEMP_SENSOR_1 == -1 || TEMP_SENSOR_2 == -1 || TEMP_SENSOR_BED == -1 || TEMP_SENSOR_CHAMBER == -1) // Disable RUMBA JTAG in case the thermocouple extension is plugged on top of JTAG connector MCUCR = _BV(JTD); MCUCR = _BV(JTD); @@ -1144,6 +1195,9 @@ void Temperature::init() { #if HAS_TEMP_BED ANALOG_SELECT(TEMP_BED_PIN); #endif + #if HAS_TEMP_CHAMBER + ANALOG_SELECT(TEMP_CHAMBER_PIN); + #endif #if ENABLED(FILAMENT_WIDTH_SENSOR) ANALOG_SELECT(FILWIDTH_PIN); #endif @@ -1198,6 +1252,16 @@ void Temperature::init() { SET_OUTPUT(E4_AUTO_FAN_PIN); #endif #endif + #if HAS_AUTO_CHAMBER_FAN && !AUTO_CHAMBER_IS_0 && !AUTO_CHAMBER_IS_1 && !AUTO_CHAMBER_IS_2 && !AUTO_CHAMBER_IS_3 && ! AUTO_CHAMBER_IS_4 + #if CHAMBER_AUTO_FAN_PIN == FAN1_PIN + SET_OUTPUT(CHAMBER_AUTO_FAN_PIN); + #if ENABLED(FAST_PWM_FAN) + setPwmFrequency(CHAMBER_AUTO_FAN_PIN, 1); // No prescaling. Pwm frequency = F_CPU/256/8 + #endif + #else + SET_OUTPUT(CHAMBER_AUTO_FAN_PIN); + #endif + #endif // Use timer0 for temperature measurement // Interleave temperature interrupt with millies interrupt @@ -1432,9 +1496,7 @@ void Temperature::init() { else if (PENDING(millis(), *timer)) break; *state = TRRunaway; case TRRunaway: - _temp_error(heater_id, PSTR(MSG_T_THERMAL_RUNAWAY), - heater_id >= 0 ? PSTR(MSG_THERMAL_RUNAWAY) : PSTR(MSG_THERMAL_RUNAWAY_BED) - ); + _temp_error(heater_id, PSTR(MSG_T_THERMAL_RUNAWAY), TEMP_ERR_PSTR(MSG_THERMAL_RUNAWAY, heater_id)); } } @@ -1612,6 +1674,7 @@ void Temperature::set_current_temp_raw() { #endif #endif current_temperature_bed_raw = raw_temp_bed_value; + current_temperature_chamber_raw = raw_temp_chamber_value; temp_meas_ready = true; } @@ -2059,6 +2122,15 @@ void Temperature::isr() { break; #endif + #if HAS_TEMP_CHAMBER + case PrepareTemp_CHAMBER: + START_ADC(TEMP_CHAMBER_PIN); + break; + case MeasureTemp_CHAMBER: + raw_temp_chamber_value += ADC; + break; + #endif + #if HAS_TEMP_1 case PrepareTemp_1: START_ADC(TEMP_1_PIN); @@ -2145,6 +2217,7 @@ void Temperature::isr() { ZERO(raw_temp_value); raw_temp_bed_value = 0; + raw_temp_chamber_value = 0; #define TEMPDIR(N) ((HEATER_##N##_RAW_LO_TEMP) > (HEATER_##N##_RAW_HI_TEMP) ? -1 : 1) @@ -2256,15 +2329,17 @@ void Temperature::isr() { #if ENABLED(SHOW_TEMP_ADC_VALUES) const float r, #endif - const int8_t e=-2 + const int8_t e=-3 ) { - #if !(HAS_TEMP_BED && HAS_TEMP_HOTEND) && HOTENDS <= 1 + #if !(HAS_TEMP_BED && HAS_TEMP_HOTEND && HAS_TEMP_CHAMBER) && HOTENDS <= 1 UNUSED(e); #endif SERIAL_PROTOCOLCHAR(' '); SERIAL_PROTOCOLCHAR( - #if HAS_TEMP_BED && HAS_TEMP_HOTEND + #if HAS_TEMP_CHAMBER && HAS_TEMP_BED && HAS_TEMP_HOTEND + e == -2 ? 'C' : e == -1 ? 'B' : 'T' + #elif HAS_TEMP_BED && HAS_TEMP_HOTEND e == -1 ? 'B' : 'T' #elif HAS_TEMP_HOTEND 'T' @@ -2303,6 +2378,14 @@ void Temperature::isr() { , -1 // BED ); #endif + #if HAS_TEMP_CHAMBER + print_heater_state(degChamber(), 0 + #if ENABLED(SHOW_TEMP_ADC_VALUES) + , rawChamberTemp() + #endif + , -2 // CHAMBER + ); + #endif #if HOTENDS > 1 HOTEND_LOOP() print_heater_state(degHotend(e), degTargetHotend(e) #if ENABLED(SHOW_TEMP_ADC_VALUES) diff --git a/Marlin/temperature.h b/Marlin/temperature.h index deeedafaf7..195a567964 100644 --- a/Marlin/temperature.h +++ b/Marlin/temperature.h @@ -81,6 +81,10 @@ enum ADCSensorState : char { PrepareTemp_BED, MeasureTemp_BED, #endif + #if HAS_TEMP_CHAMBER + PrepareTemp_CHAMBER, + MeasureTemp_CHAMBER, + #endif #if ENABLED(FILAMENT_WIDTH_SENSOR) Prepare_FILWIDTH, Measure_FILWIDTH, @@ -120,9 +124,11 @@ class Temperature { public: static float current_temperature[HOTENDS], + current_temperature_chamber, current_temperature_bed; static int16_t current_temperature_raw[HOTENDS], target_temperature[HOTENDS], + current_temperature_chamber_raw, current_temperature_bed_raw; #if ENABLED(AUTO_POWER_E_FANS) @@ -246,6 +252,7 @@ class Temperature { #endif static uint16_t raw_temp_value[MAX_EXTRUDERS], + raw_temp_chamber_value, raw_temp_bed_value; // Init min and max temp with extreme values to prevent false errors during startup @@ -317,6 +324,9 @@ class Temperature { #if HAS_TEMP_BED static float analog2tempBed(const int raw); #endif + #if HAS_TEMP_CHAMBER + static float analog2tempChamber(const int raw); + #endif /** * Called from the Temperature ISR @@ -371,6 +381,7 @@ class Temperature { return current_temperature[HOTEND_INDEX]; } FORCE_INLINE static float degBed() { return current_temperature_bed; } + FORCE_INLINE static float degChamber() { return current_temperature_chamber; } #if ENABLED(SHOW_TEMP_ADC_VALUES) FORCE_INLINE static int16_t rawHotendTemp(const uint8_t e) { @@ -380,6 +391,7 @@ class Temperature { return current_temperature_raw[HOTEND_INDEX]; } FORCE_INLINE static int16_t rawBedTemp() { return current_temperature_bed_raw; } + FORCE_INLINE static int16_t rawChamberTemp() { return current_temperature_chamber_raw; } #endif FORCE_INLINE static int16_t degTargetHotend(const uint8_t e) { diff --git a/Marlin/thermistortable_20.h b/Marlin/thermistortable_20.h index 5a01f78cf5..1cd9480c80 100644 --- a/Marlin/thermistortable_20.h +++ b/Marlin/thermistortable_20.h @@ -47,6 +47,10 @@ #define HEATER_BED_RAW_HI_TEMP 16383 #define HEATER_BED_RAW_LO_TEMP 0 #endif +#if THERMISTORCHAMBER == 20 + #define HEATER_CHAMBER_RAW_HI_TEMP 16383 + #define HEATER_CHAMBER_RAW_LO_TEMP 0 +#endif const short temptable_20[][2] PROGMEM = { { OV( 0), 0 }, { OV(227), 1 }, diff --git a/Marlin/thermistortables.h b/Marlin/thermistortables.h index 08d4e80494..737fca816d 100644 --- a/Marlin/thermistortables.h +++ b/Marlin/thermistortables.h @@ -29,7 +29,7 @@ #define OVERSAMPLENR 16 #define OV(N) int16_t((N)*(OVERSAMPLENR)) -#define ANY_THERMISTOR_IS(n) (THERMISTORHEATER_0 == n || THERMISTORHEATER_1 == n || THERMISTORHEATER_2 == n || THERMISTORHEATER_3 == n || THERMISTORHEATER_4 == n || THERMISTORBED == n) +#define ANY_THERMISTOR_IS(n) (THERMISTORHEATER_0 == n || THERMISTORHEATER_1 == n || THERMISTORHEATER_2 == n || THERMISTORHEATER_3 == n || THERMISTORHEATER_4 == n || THERMISTORBED == n || THERMISTORCHAMBER == n) // Pt1000 and Pt100 handling // @@ -191,6 +191,15 @@ #endif #endif +#ifdef THERMISTORCHAMBER + #define CHAMBERTEMPTABLE TT_NAME(THERMISTORCHAMBER) + #define CHAMBERTEMPTABLE_LEN COUNT(CHAMBERTEMPTABLE) +#else + #ifdef CHAMBER_USES_THERMISTOR + #error "No chamber thermistor table specified" + #endif +#endif + // Set the high and low raw values for the heaters // For thermistors the highest temperature results in the lowest ADC value // For thermocouples the highest temperature results in the highest ADC value @@ -248,5 +257,14 @@ #define HEATER_BED_RAW_LO_TEMP 0 #endif #endif +#ifndef HEATER_CHAMBER_RAW_HI_TEMP + #ifdef CHAMBER_USES_THERMISTOR + #define HEATER_CHAMBER_RAW_HI_TEMP 0 + #define HEATER_CHAMBER_RAW_LO_TEMP 16383 + #else + #define HEATER_CHAMBER_RAW_HI_TEMP 16383 + #define HEATER_CHAMBER_RAW_LO_TEMP 0 + #endif +#endif #endif // THERMISTORTABLES_H_ diff --git a/Marlin/tmc_util.cpp b/Marlin/tmc_util.cpp index b154c3ea5d..edec89c134 100644 --- a/Marlin/tmc_util.cpp +++ b/Marlin/tmc_util.cpp @@ -215,14 +215,13 @@ bool report_tmc_status = false; #endif // MONITOR_DRIVER_STATUS void _tmc_say_axis(const TMC_AxisEnum axis) { - const static char ext_X[] PROGMEM = "X", ext_X2[] PROGMEM = "X2", - ext_Y[] PROGMEM = "Y", ext_Y2[] PROGMEM = "Y2", - ext_Z[] PROGMEM = "Z", ext_Z2[] PROGMEM = "Z2", + static const char ext_X[] PROGMEM = "X", ext_Y[] PROGMEM = "Y", ext_Z[] PROGMEM = "Z", + ext_X2[] PROGMEM = "X2", ext_Y2[] PROGMEM = "Y2", ext_Z2[] PROGMEM = "Z2", ext_E0[] PROGMEM = "E0", ext_E1[] PROGMEM = "E1", ext_E2[] PROGMEM = "E2", ext_E3[] PROGMEM = "E3", ext_E4[] PROGMEM = "E4"; - const static char* const tmc_axes[] PROGMEM = { ext_X, ext_X2, ext_Y, ext_Y2, ext_Z, ext_Z2, ext_E0, ext_E1, ext_E2, ext_E3, ext_E4 }; - serialprintPGM((char*)pgm_read_word(&tmc_axes[axis])); + static const char* const tmc_axes[] PROGMEM = { ext_X, ext_Y, ext_Z, ext_X2, ext_Y2, ext_Z2, ext_E0, ext_E1, ext_E2, ext_E3, ext_E4 }; + serialprintPGM((char*)pgm_read_ptr(&tmc_axes[axis])); } void _tmc_say_current(const TMC_AxisEnum axis, const uint16_t curr) { @@ -329,6 +328,7 @@ void _tmc_say_sgt(const TMC_AxisEnum axis, const int8_t sgt) { } } #endif + #if ENABLED(HAVE_TMC2208) static void tmc_status(TMC2208Stepper &st, const TMC_debug_enum i) { switch (i) { @@ -383,7 +383,10 @@ void _tmc_say_sgt(const TMC_AxisEnum axis, const int8_t sgt) { break; case TMC_TPWMTHRS_MMS: { uint32_t tpwmthrs_val = st.TPWMTHRS(); - tpwmthrs_val ? SERIAL_ECHO(12650000UL * st.microsteps() / (256 * tpwmthrs_val * spmm)) : (void)SERIAL_CHAR('-'); + if (tpwmthrs_val) + SERIAL_ECHO(12650000UL * st.microsteps() / (256 * tpwmthrs_val * spmm)); + else + SERIAL_CHAR('-'); } break; case TMC_OTPW: serialprintPGM(st.otpw() ? PSTR("true") : PSTR("false")); break; diff --git a/Marlin/tmc_util.h b/Marlin/tmc_util.h index 80699c2137..60134b72a2 100644 --- a/Marlin/tmc_util.h +++ b/Marlin/tmc_util.h @@ -35,7 +35,7 @@ extern bool report_tmc_status; -enum TMC_AxisEnum : char { TMC_X, TMC_X2, TMC_Y, TMC_Y2, TMC_Z, TMC_Z2, TMC_E0, TMC_E1, TMC_E2, TMC_E3, TMC_E4 }; +enum TMC_AxisEnum : char { TMC_X, TMC_Y, TMC_Z, TMC_X2, TMC_Y2, TMC_Z2, TMC_E0, TMC_E1, TMC_E2, TMC_E3, TMC_E4 }; constexpr uint32_t _tmc_thrs(const uint16_t msteps, const int32_t thrs, const uint32_t spmm) { return 12650000UL * msteps / (256 * thrs * spmm); @@ -55,7 +55,6 @@ void tmc_get_current(TMC &st, const TMC_AxisEnum axis) { template void tmc_set_current(TMC &st, const TMC_AxisEnum axis, const int mA) { st.setCurrent(mA, R_SENSE, HOLD_MULTIPLIER); - tmc_get_current(st, axis); } template void tmc_report_otpw(TMC &st, const TMC_AxisEnum axis) { @@ -73,7 +72,6 @@ void tmc_get_pwmthrs(TMC &st, const TMC_AxisEnum axis, const uint16_t spmm) { template void tmc_set_pwmthrs(TMC &st, const TMC_AxisEnum axis, const int32_t thrs, const uint32_t spmm) { st.TPWMTHRS(_tmc_thrs(st.microsteps(), thrs, spmm)); - tmc_get_pwmthrs(st, axis, spmm); } template void tmc_get_sgt(TMC &st, const TMC_AxisEnum axis) { @@ -82,7 +80,6 @@ void tmc_get_sgt(TMC &st, const TMC_AxisEnum axis) { template void tmc_set_sgt(TMC &st, const TMC_AxisEnum axis, const int8_t sgt_val) { st.sgt(sgt_val); - tmc_get_sgt(st, axis); } void monitor_tmc_driver(); diff --git a/Marlin/ubl.cpp b/Marlin/ubl.cpp index df3919a0d5..df9c212bbf 100644 --- a/Marlin/ubl.cpp +++ b/Marlin/ubl.cpp @@ -40,17 +40,15 @@ void unified_bed_leveling::report_current_mesh() { if (!leveling_is_valid()) return; SERIAL_ECHO_START(); - SERIAL_ECHOLNPGM(" G29 I 999"); + SERIAL_ECHOLNPGM(" G29 I999"); for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++) for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++) if (!isnan(z_values[x][y])) { SERIAL_ECHO_START(); - SERIAL_ECHOPAIR(" M421 I ", x); - SERIAL_ECHOPAIR(" J ", y); - SERIAL_ECHOPGM(" Z "); - SERIAL_ECHO_F(z_values[x][y], 6); - SERIAL_ECHOPAIR(" ; X ", LOGICAL_X_POSITION(mesh_index_to_xpos(x))); - SERIAL_ECHOPAIR(", Y ", LOGICAL_Y_POSITION(mesh_index_to_ypos(y))); + SERIAL_ECHOPAIR(" M421 I", x); + SERIAL_ECHOPAIR(" J", y); + SERIAL_ECHOPGM(" Z"); + SERIAL_ECHO_F(z_values[x][y], 2); SERIAL_EOL(); } } @@ -63,15 +61,6 @@ safe_delay(50); } - static void serial_echo_xy(const int16_t x, const int16_t y) { - SERIAL_CHAR('('); - SERIAL_ECHO(x); - SERIAL_CHAR(','); - SERIAL_ECHO(y); - SERIAL_CHAR(')'); - safe_delay(10); - } - #if ENABLED(UBL_DEVEL_DEBUGGING) static void debug_echo_axis(const AxisEnum axis) { @@ -169,85 +158,116 @@ } } - // display_map() currently produces three different mesh map types - // 0 : suitable for PronterFace and Repetier's serial console - // 1 : .CSV file suitable for importation into various spread sheets - // 2 : disply of the map data on a RepRap Graphical LCD Panel + static void serial_echo_xy(const uint8_t sp, const int16_t x, const int16_t y) { + SERIAL_ECHO_SP(sp); + SERIAL_CHAR('('); + if (x < 100) { SERIAL_CHAR(' '); if (x < 10) SERIAL_CHAR(' '); } + SERIAL_ECHO(x); + SERIAL_CHAR(','); + if (y < 100) { SERIAL_CHAR(' '); if (y < 10) SERIAL_CHAR(' '); } + SERIAL_ECHO(y); + SERIAL_CHAR(')'); + safe_delay(5); + } + static void serial_echo_column_labels(const uint8_t sp) { + SERIAL_ECHO_SP(7); + for (int8_t i = 0; i < GRID_MAX_POINTS_X; i++) { + if (i < 10) SERIAL_CHAR(' '); + SERIAL_ECHO(i); + SERIAL_ECHO_SP(sp); + } + safe_delay(10); + } + + /** + * Produce one of these mesh maps: + * 0: Human-readable + * 1: CSV format for spreadsheet import + * 2: TODO: Display on Graphical LCD + * 4: Compact Human-Readable + */ void unified_bed_leveling::display_map(const int map_type) { - #if HAS_AUTO_REPORTING + #if HAS_AUTO_REPORTING || ENABLED(HOST_KEEPALIVE_FEATURE) suspend_auto_report = true; #endif - constexpr uint8_t spaces = 8 * (GRID_MAX_POINTS_X - 2); + constexpr uint8_t eachsp = 1 + 6 + 1, // [-3.567] + twixt = eachsp * (GRID_MAX_POINTS_X) - 9 * 2; // Leading 4sp, Coordinates 9sp each - SERIAL_PROTOCOLPGM("\nBed Topography Report"); - if (map_type == 0) { - SERIAL_PROTOCOLPGM(":\n\n"); - serial_echo_xy(0, GRID_MAX_POINTS_Y - 1); - SERIAL_ECHO_SP(spaces + 3); - serial_echo_xy(GRID_MAX_POINTS_X - 1, GRID_MAX_POINTS_Y - 1); - SERIAL_EOL(); - serial_echo_xy(MESH_MIN_X, MESH_MAX_Y); - SERIAL_ECHO_SP(spaces); - serial_echo_xy(MESH_MAX_X, MESH_MAX_Y); + const bool human = !(map_type & 0x3), csv = map_type == 1, lcd = map_type == 2, comp = map_type & 0x4; + + SERIAL_ECHOPGM("\nBed Topography Report"); + if (human) { + SERIAL_ECHOPGM(":\n\n"); + serial_echo_xy(4, MESH_MIN_X, MESH_MAX_Y); + serial_echo_xy(twixt, MESH_MAX_X, MESH_MAX_Y); SERIAL_EOL(); + serial_echo_column_labels(eachsp - 2); } else { - SERIAL_PROTOCOLPGM(" for "); - serialprintPGM(map_type == 1 ? PSTR("CSV:\n\n") : PSTR("LCD:\n\n")); + SERIAL_ECHOPGM(" for "); + serialprintPGM(csv ? PSTR("CSV:\n") : PSTR("LCD:\n")); } const float current_xi = get_cell_index_x(current_position[X_AXIS] + (MESH_X_DIST) / 2.0), current_yi = get_cell_index_y(current_position[Y_AXIS] + (MESH_Y_DIST) / 2.0); + if (!lcd) SERIAL_EOL(); for (int8_t j = GRID_MAX_POINTS_Y - 1; j >= 0; j--) { + + // Row Label (J index) + if (human) { + if (j < 10) SERIAL_CHAR(' '); + SERIAL_ECHO(j); + SERIAL_ECHOPGM(" |"); + } + + // Row Values (I indexes) for (uint8_t i = 0; i < GRID_MAX_POINTS_X; i++) { - const bool is_current = i == current_xi && j == current_yi; - // is the nozzle here? then mark the number - if (map_type == 0) SERIAL_CHAR(is_current ? '[' : ' '); + // Opening Brace or Space + const bool is_current = i == current_xi && j == current_yi; + if (human) SERIAL_CHAR(is_current ? '[' : ' '); + // Z Value at current I, J const float f = z_values[i][j]; - if (isnan(f)) { - serialprintPGM(map_type == 0 ? PSTR(" . ") : PSTR("NAN")); + if (lcd) { + // TODO: Display on Graphical LCD } - else if (map_type <= 1) { - // if we don't do this, the columns won't line up nicely - if (map_type == 0 && f >= 0.0) SERIAL_CHAR(' '); - SERIAL_PROTOCOL_F(f, 3); + else if (isnan(f)) + serialprintPGM(human ? PSTR(" . ") : PSTR("NAN")); + else if (human || csv) { + if (human && f >= 0.0) SERIAL_CHAR(f > 0 ? '+' : ' '); // Space for positive ('-' for negative) + SERIAL_ECHO_F(f, 3); // Positive: 5 digits, Negative: 6 digits } idle(); - if (map_type == 1 && i < GRID_MAX_POINTS_X - 1) SERIAL_CHAR(','); + if (csv && i < GRID_MAX_POINTS_X - 1) SERIAL_CHAR('\t'); + + // Closing Brace or Space + if (human) SERIAL_CHAR(is_current ? ']' : ' '); #if TX_BUFFER_SIZE > 0 SERIAL_FLUSHTX(); #endif - safe_delay(15); - if (map_type == 0) { - SERIAL_CHAR(is_current ? ']' : ' '); - SERIAL_CHAR(' '); - } - } - SERIAL_EOL(); - if (j && map_type == 0) { // we want the (0,0) up tight against the block of numbers - SERIAL_CHAR(' '); - SERIAL_EOL(); + safe_delay(5); } + if (!lcd) SERIAL_EOL(); + + // A blank line between rows (unless compact) + if (j && human && !comp) SERIAL_ECHOLNPGM(" |"); } - if (map_type == 0) { - serial_echo_xy(MESH_MIN_X, MESH_MIN_Y); - SERIAL_ECHO_SP(spaces + 4); - serial_echo_xy(MESH_MAX_X, MESH_MIN_Y); + if (human) { + serial_echo_column_labels(eachsp - 2); + SERIAL_EOL(); + serial_echo_xy(4, MESH_MIN_X, MESH_MIN_Y); + serial_echo_xy(twixt, MESH_MAX_X, MESH_MIN_Y); SERIAL_EOL(); - serial_echo_xy(0, 0); - SERIAL_ECHO_SP(spaces + 5); - serial_echo_xy(GRID_MAX_POINTS_X - 1, 0); SERIAL_EOL(); } - #if HAS_AUTO_REPORTING + #if HAS_AUTO_REPORTING || ENABLED(HOST_KEEPALIVE_FEATURE) suspend_auto_report = false; #endif } diff --git a/Marlin/ubl_G29.cpp b/Marlin/ubl_G29.cpp index 3ea8632a64..10bffcfd4d 100644 --- a/Marlin/ubl_G29.cpp +++ b/Marlin/ubl_G29.cpp @@ -51,7 +51,6 @@ extern float meshedit_done; extern long babysteps_done; - float probe_pt(const float &rx, const float &ry, const bool, const uint8_t, const bool=true); #define SIZE_OF_LITTLE_RAISE 1 #define BIG_RAISE_NOT_NEEDED 0 @@ -206,8 +205,8 @@ * adhesion. * * P4 moves to the closest Mesh Point (and/or the given X Y), raises the nozzle above the mesh height - * by the given 'H' offset (or default Z_CLEARANCE_BETWEEN_PROBES), and waits while the controller is - * used to adjust the nozzle height. On click the displayed height is saved in the mesh. + * by the given 'H' offset (or default 0), and waits while the controller is used to adjust the nozzle + * height. On click the displayed height is saved in the mesh. * * Start Phase 4 at a specific location with X and Y. Adjust a specific number of Mesh Points with * the 'R' (Repeat) parameter. (If 'R' is left out, the whole matrix is assumed.) This command can be @@ -248,9 +247,7 @@ * for subsequent Load and Store operations. Valid storage slot numbers begin at 0 and * extend to a limit related to the available EEPROM storage. * - * S -1 Store Store the current Mesh as a print out that is suitable to be feed back into the system - * at a later date. The GCode output can be saved and later replayed by the host software - * to reconstruct the current mesh on another machine. + * S -1 Store Print the current Mesh as G-code that can be used to restore the mesh anytime. * * T Topology Display the Mesh Map Topology. * 'T' can be used alone (e.g., G29 T) or in combination with most of the other commands. @@ -508,7 +505,7 @@ } else { const float cvf = parser.value_float(); - switch((int)truncf(cvf * 10.0) - 30) { // 3.1 -> 1 + switch ((int)truncf(cvf * 10.0) - 30) { // 3.1 -> 1 #if ENABLED(UBL_G29_P31) case 1: { @@ -595,8 +592,8 @@ if (parser.seen('S')) { // Store (or Save) Current Mesh Data g29_storage_slot = parser.has_value() ? parser.value_int() : storage_slot; - if (g29_storage_slot == -1) // Special case, we are going to 'Export' the mesh to the - return report_current_mesh(); + if (g29_storage_slot == -1) // Special case, the user wants to 'Export' the mesh to the + return report_current_mesh(); // host program to be saved on the user's computer int16_t a = settings.calc_num_meshes(); @@ -624,8 +621,8 @@ #if ENABLED(NEWPANEL) lcd_reset_alert_level(); - LCD_MESSAGEPGM(""); lcd_quick_feedback(true); + lcd_reset_status(); lcd_external_control = false; #endif @@ -708,7 +705,7 @@ * Probe all invalidated locations of the mesh that can be reached by the probe. * This attempts to fill in locations closest to the nozzle's start location first. */ - void unified_bed_leveling::probe_entire_mesh(const float &rx, const float &ry, const bool do_ubl_mesh_map, const bool stow_probe, bool close_or_far) { + void unified_bed_leveling::probe_entire_mesh(const float &rx, const float &ry, const bool do_ubl_mesh_map, const bool stow_probe, const bool do_furthest) { mesh_index_pair location; #if ENABLED(NEWPANEL) @@ -718,7 +715,7 @@ save_ubl_active_state_and_disable(); // we don't do bed level correction because we want the raw data when we probe DEPLOY_PROBE(); - uint16_t max_iterations = GRID_MAX_POINTS; + uint16_t count = GRID_MAX_POINTS; do { if (do_ubl_mesh_map) display_map(g29_map_type); @@ -737,7 +734,7 @@ } #endif - if (close_or_far) + if (do_furthest) location = find_furthest_invalid_mesh_point(); else location = find_closest_mesh_point_of_type(INVALID, rx, ry, USE_PROBE_AS_REFERENCE, NULL); @@ -746,14 +743,17 @@ const float rawx = mesh_index_to_xpos(location.x_index), rawy = mesh_index_to_ypos(location.y_index); - const float measured_z = probe_pt(rawx, rawy, stow_probe, g29_verbose_level); // TODO: Needs error handling + const float measured_z = probe_pt(rawx, rawy, stow_probe ? PROBE_PT_STOW : PROBE_PT_RAISE, g29_verbose_level); // TODO: Needs error handling z_values[location.x_index][location.y_index] = measured_z; } SERIAL_FLUSH(); // Prevent host M105 buffer overrun. - } while (location.x_index >= 0 && --max_iterations); + } while (location.x_index >= 0 && --count); STOW_PROBE(); - move_z_after_probing(); + + #if Z_AFTER_PROBING + move_z_after_probing(); + #endif restore_ubl_active_state_and_leave(); @@ -772,7 +772,7 @@ wait_for_release(); while (!is_lcd_clicked()) { idle(); - refresh_cmd_timeout(); + reset_stepper_timeout(); // Keep steppers powered if (encoder_diff) { do_blocking_move_to_z(current_position[Z_AXIS] + float(encoder_diff) * multiplier); encoder_diff = 0; @@ -1344,9 +1344,8 @@ g29_repetition_cnt = 1; // do exactly one mesh location. Otherwise use what the parser decided. #if ENABLED(UBL_MESH_EDIT_MOVES_Z) - const bool is_offset = parser.seen('H'); - const float h_offset = is_offset ? parser.value_linear_units() : Z_CLEARANCE_BETWEEN_PROBES; - if (is_offset && !WITHIN(h_offset, 0, 10)) { + const float h_offset = parser.seenval('H') ? parser.value_linear_units() : 0; + if (!WITHIN(h_offset, 0, 10)) { SERIAL_PROTOCOLLNPGM("Offset out of bounds. (0 to 10mm)\n"); return; } @@ -1362,63 +1361,63 @@ save_ubl_active_state_and_disable(); LCD_MESSAGEPGM(MSG_UBL_FINE_TUNE_MESH); + lcd_external_control = true; // Take over control of the LCD encoder - do_blocking_move_to(rx, ry, Z_CLEARANCE_BETWEEN_PROBES); + do_blocking_move_to(rx, ry, Z_CLEARANCE_BETWEEN_PROBES); // Move to the given XY with probe clearance + + #if ENABLED(UBL_MESH_EDIT_MOVES_Z) + do_blocking_move_to_z(h_offset); // Move Z to the given 'H' offset + #endif uint16_t not_done[16]; memset(not_done, 0xFF, sizeof(not_done)); do { location = find_closest_mesh_point_of_type(SET_IN_BITMAP, rx, ry, USE_NOZZLE_AS_REFERENCE, not_done); - if (location.x_index < 0) break; // stop when we can't find any more reachable points. + if (location.x_index < 0) break; // Stop when there are no more reachable points - bitmap_clear(not_done, location.x_index, location.y_index); // Mark this location as 'adjusted' so we will find a - // different location the next time through the loop + bitmap_clear(not_done, location.x_index, location.y_index); // Mark this location as 'adjusted' so a new + // location is used on the next loop const float rawx = mesh_index_to_xpos(location.x_index), rawy = mesh_index_to_ypos(location.y_index); - if (!position_is_reachable(rawx, rawy)) // SHOULD NOT OCCUR because find_closest_mesh_point_of_type will only return reachable - break; + //if (!position_is_reachable(rawx, rawy)) break; // SHOULD NOT OCCUR because find_closest_mesh_point_of_type will only return reachable + + do_blocking_move_to(rawx, rawy, Z_CLEARANCE_BETWEEN_PROBES); // Move the nozzle to the edit point with probe clearance - do_blocking_move_to(rawx, rawy, Z_CLEARANCE_BETWEEN_PROBES); // Move the nozzle to the edit point + #if ENABLED(UBL_MESH_EDIT_MOVES_Z) + do_blocking_move_to_z(h_offset); // Move Z to the given 'H' offset before editing + #endif KEEPALIVE_STATE(PAUSED_FOR_USER); - lcd_external_control = true; - if (do_ubl_mesh_map) display_map(g29_map_type); // show the user which point is being adjusted + if (do_ubl_mesh_map) display_map(g29_map_type); // Display the current point lcd_refresh(); float new_z = z_values[location.x_index][location.y_index]; - if (isnan(new_z)) new_z = 0.0; // Set invalid mesh points to 0.0 so they can be edited - new_z = FLOOR(new_z * 1000.0) * 0.001; // Chop off digits after the 1000ths place + if (isnan(new_z)) new_z = 0.0; // Invalid points begin at 0 + new_z = FLOOR(new_z * 1000.0) * 0.001; // Chop off digits after the 1000ths place lcd_mesh_edit_setup(new_z); do { new_z = lcd_mesh_edit(); #if ENABLED(UBL_MESH_EDIT_MOVES_Z) - do_blocking_move_to_z(h_offset + new_z); // Move the nozzle as the point is edited + do_blocking_move_to_z(h_offset + new_z); // Move the nozzle as the point is edited #endif idle(); - SERIAL_FLUSH(); // Prevent host M105 buffer overrun. + SERIAL_FLUSH(); // Prevent host M105 buffer overrun. } while (!is_lcd_clicked()); - if (!lcd_map_control) lcd_return_to_status(); - - // The technique used here generates a race condition for the encoder click. - // It could get detected in lcd_mesh_edit (actually _lcd_mesh_fine_tune) or here. - // Let's work on specifying a proper API for the LCD ASAP, OK? - lcd_external_control = true; - - if (click_and_hold(abort_fine_tune)) - goto FINE_TUNE_EXIT; + if (!lcd_map_control) lcd_return_to_status(); // Just editing a single point? Return to status - safe_delay(20); // We don't want any switch noise. + if (click_and_hold(abort_fine_tune)) goto FINE_TUNE_EXIT; // If the click is held down, abort editing - z_values[location.x_index][location.y_index] = new_z; + z_values[location.x_index][location.y_index] = new_z; // Save the updated Z value + safe_delay(20); // No switch noise lcd_refresh(); } while (location.x_index >= 0 && --g29_repetition_cnt > 0); @@ -1515,7 +1514,7 @@ incremental_LSF_reset(&lsf_results); if (do_3_pt_leveling) { - measured_z = probe_pt(PROBE_PT_1_X, PROBE_PT_1_Y, false, g29_verbose_level); + measured_z = probe_pt(PROBE_PT_1_X, PROBE_PT_1_Y, PROBE_PT_RAISE, g29_verbose_level); if (isnan(measured_z)) abort_flag = true; else { @@ -1529,7 +1528,7 @@ } if (!abort_flag) { - measured_z = probe_pt(PROBE_PT_2_X, PROBE_PT_2_Y, false, g29_verbose_level); + measured_z = probe_pt(PROBE_PT_2_X, PROBE_PT_2_Y, PROBE_PT_RAISE, g29_verbose_level); //z2 = measured_z; if (isnan(measured_z)) abort_flag = true; @@ -1544,7 +1543,7 @@ } if (!abort_flag) { - measured_z = probe_pt(PROBE_PT_3_X, PROBE_PT_3_Y, true, g29_verbose_level); + measured_z = probe_pt(PROBE_PT_3_X, PROBE_PT_3_Y, PROBE_PT_STOW, g29_verbose_level); //z3 = measured_z; if (isnan(measured_z)) abort_flag = true; @@ -1572,7 +1571,7 @@ const float ry = float(y_min) + dy * (zig_zag ? g29_grid_size - 1 - iy : iy); if (!abort_flag) { - measured_z = probe_pt(rx, ry, parser.seen('E'), g29_verbose_level); // TODO: Needs error handling + measured_z = probe_pt(rx, ry, parser.seen('E') ? PROBE_PT_STOW : PROBE_PT_RAISE, g29_verbose_level); // TODO: Needs error handling abort_flag = isnan(measured_z); @@ -1603,14 +1602,17 @@ SERIAL_EOL(); } #endif - + if (g29_verbose_level > 3) { + serial_spaces(16); + SERIAL_ECHOLNPAIR("Corrected_Z=", measured_z); + } incremental_LSF(&lsf_results, rx, ry, measured_z); } } zig_zag ^= true; } - + STOW_PROBE(); } if (abort_flag || finish_incremental_LSF(&lsf_results)) { diff --git a/Marlin/ubl_motion.cpp b/Marlin/ubl_motion.cpp index 24bbc267d4..24a3b7dc46 100644 --- a/Marlin/ubl_motion.cpp +++ b/Marlin/ubl_motion.cpp @@ -70,12 +70,10 @@ debug_current_and_destination(PSTR("Start of ubl.line_to_destination_cartesian()")); } - if (cell_start_xi == cell_dest_xi && cell_start_yi == cell_dest_yi) { // if the whole move is within the same cell, - // we don't need to break up the move - /** - * If we are moving off the print bed, we are going to allow the move at this level. - * But we detect it and isolate it. For now, we just pass along the request. - */ + // A move within the same cell needs no splitting + if (cell_start_xi == cell_dest_xi && cell_start_yi == cell_dest_yi) { + + // For a move off the bed, use a constant Z raise if (!WITHIN(cell_dest_xi, 0, GRID_MAX_POINTS_X - 1) || !WITHIN(cell_dest_yi, 0, GRID_MAX_POINTS_Y - 1)) { // Note: There is no Z Correction in this case. We are off the grid and don't know what @@ -98,15 +96,7 @@ FINAL_MOVE: - /** - * Optimize some floating point operations here. We could call float get_z_correction(float x0, float y0) to - * generate the correction for us. But we can lighten the load on the CPU by doing a modified version of the function. - * We are going to only calculate the amount we are from the first mesh line towards the second mesh line once. - * We will use this fraction in both of the original two Z Height calculations for the bi-linear interpolation. And, - * instead of doing a generic divide of the distance, we know the distance is MESH_X_DIST so we can use the preprocessor - * to create a 1-over number for us. That will allow us to do a floating point multiply instead of a floating point divide. - */ - + // The distance is always MESH_X_DIST so multiply by the constant reciprocal. const float xratio = (end[X_AXIS] - mesh_index_to_xpos(cell_dest_xi)) * (1.0 / (MESH_X_DIST)); float z1 = z_values[cell_dest_xi ][cell_dest_yi ] + xratio * @@ -116,22 +106,13 @@ if (cell_dest_xi >= GRID_MAX_POINTS_X - 1) z1 = z2 = 0.0; - // we are done with the fractional X distance into the cell. Now with the two Z-Heights we have calculated, we - // are going to apply the Y-Distance into the cell to interpolate the final Z correction. - - const float yratio = (end[Y_AXIS] - mesh_index_to_ypos(cell_dest_yi)) * (1.0 / (MESH_Y_DIST)); - float z0 = cell_dest_yi < GRID_MAX_POINTS_Y - 1 ? (z1 + (z2 - z1) * yratio) * planner.fade_scaling_factor_for_z(end[Z_AXIS]) : 0.0; - - /** - * If part of the Mesh is undefined, it will show up as NAN - * in z_values[][] and propagate through the - * calculations. If our correction is NAN, we throw it out - * because part of the Mesh is undefined and we don't have the - * information we need to complete the height correction. - */ - if (isnan(z0)) z0 = 0.0; + // X cell-fraction done. Interpolate the two Z offsets with the Y fraction for the final Z offset. + const float yratio = (end[Y_AXIS] - mesh_index_to_ypos(cell_dest_yi)) * (1.0 / (MESH_Y_DIST)), + z0 = cell_dest_yi < GRID_MAX_POINTS_Y - 1 ? (z1 + (z2 - z1) * yratio) * planner.fade_scaling_factor_for_z(end[Z_AXIS]) : 0.0; - planner.buffer_segment(end[X_AXIS], end[Y_AXIS], end[Z_AXIS] + z0, end[E_AXIS], feed_rate, extruder); + // Undefined parts of the Mesh in z_values[][] are NAN. + // Replace NAN corrections with 0.0 to prevent NAN propagation. + planner.buffer_segment(end[X_AXIS], end[Y_AXIS], end[Z_AXIS] + (isnan(z0) ? 0.0 : z0), end[E_AXIS], feed_rate, extruder); if (g26_debug_flag) debug_current_and_destination(PSTR("FINAL_MOVE in ubl.line_to_destination_cartesian()")); @@ -141,11 +122,8 @@ } /** - * If we get here, we are processing a move that crosses at least one Mesh Line. We will check - * for the simple case of just crossing X or just crossing Y Mesh Lines after we get all the details - * of the move figured out. We can process the easy case of just crossing an X or Y Mesh Line with less - * computation and in fact most lines are of this nature. We will check for that in the following - * blocks of code: + * Past this point the move is known to cross one or more mesh lines. Check for the most common + * case - crossing only one X or Y line - after details are worked out to reduce computation. */ const float dx = end[X_AXIS] - start[X_AXIS], @@ -161,12 +139,11 @@ dyi = cell_start_yi == cell_dest_yi ? 0 : down_flag ? -1 : 1; /** - * Compute the scaling factor for the extruder for each partial move. - * We need to watch out for zero length moves because it will cause us to - * have an infinate scaling factor. We are stuck doing a floating point - * divide to get our scaling factor, but after that, we just multiply by this - * number. We also pick our scaling factor based on whether the X or Y - * component is larger. We use the biggest of the two to preserve precision. + * Compute the extruder scaling factor for each partial move, checking for + * zero-length moves that would result in an infinite scaling factor. + * A float divide is required for this, but then it just multiplies. + * Also select a scaling factor based on the larger of the X and Y + * components. The larger of the two is used to preserve precision. */ const bool use_x_dist = adx > ady; @@ -186,43 +163,37 @@ const bool inf_normalized_flag = (isinf(e_normalized_dist) != 0), inf_m_flag = (isinf(m) != 0); + /** - * This block handles vertical lines. These are lines that stay within the same - * X Cell column. They do not need to be perfectly vertical. They just can - * not cross into another X Cell column. + * Handle vertical lines that stay within one column. + * These need not be perfectly vertical. */ - if (dxi == 0) { // Check for a vertical line - current_yi += down_flag; // Line is heading down, we just want to go to the bottom + if (dxi == 0) { // Vertical line? + current_yi += down_flag; // Line going down? Just go to the bottom. while (current_yi != cell_dest_yi + down_flag) { current_yi += dyi; const float next_mesh_line_y = mesh_index_to_ypos(current_yi); /** - * if the slope of the line is infinite, we won't do the calculations - * else, we know the next X is the same so we can recover and continue! - * Calculate X at the next Y mesh line + * Skip the calculations for an infinite slope. + * For others the next X is the same so this can continue. + * Calculate X at the next Y mesh line. */ const float rx = inf_m_flag ? start[X_AXIS] : (next_mesh_line_y - c) / m; float z0 = z_correction_for_x_on_horizontal_mesh_line(rx, current_xi, current_yi) * planner.fade_scaling_factor_for_z(end[Z_AXIS]); - /** - * If part of the Mesh is undefined, it will show up as NAN - * in z_values[][] and propagate through the - * calculations. If our correction is NAN, we throw it out - * because part of the Mesh is undefined and we don't have the - * information we need to complete the height correction. - */ + // Undefined parts of the Mesh in z_values[][] are NAN. + // Replace NAN corrections with 0.0 to prevent NAN propagation. if (isnan(z0)) z0 = 0.0; const float ry = mesh_index_to_ypos(current_yi); /** - * Without this check, it is possible for the algorithm to generate a zero length move in the case - * where the line is heading down and it is starting right on a Mesh Line boundary. For how often that - * happens, it might be best to remove the check and always 'schedule' the move because - * the planner.buffer_segment() routine will filter it if that happens. + * Without this check, it's possible to generate a zero length move, as in the case where + * the line is heading down, starting exactly on a mesh line boundary. Since this is rare + * it might be fine to remove this check and let planner.buffer_segment() filter it out. */ if (ry != start[Y_AXIS]) { if (!inf_normalized_flag) { @@ -242,9 +213,7 @@ if (g26_debug_flag) debug_current_and_destination(PSTR("vertical move done in ubl.line_to_destination_cartesian()")); - // - // Check if we are at the final destination. Usually, we won't be, but if it is on a Y Mesh Line, we are done. - // + // At the final destination? Usually not, but when on a Y Mesh Line it's completed. if (current_position[X_AXIS] != end[X_AXIS] || current_position[Y_AXIS] != end[Y_AXIS]) goto FINAL_MOVE; @@ -253,16 +222,11 @@ } /** - * - * This block handles horizontal lines. These are lines that stay within the same - * Y Cell row. They do not need to be perfectly horizontal. They just can - * not cross into another Y Cell row. - * + * Handle horizontal lines that stay within one row. + * These need not be perfectly horizontal. */ - - if (dyi == 0) { // Check for a horizontal line - current_xi += left_flag; // Line is heading left, we just want to go to the left - // edge of this cell for the first move. + if (dyi == 0) { // Horizontal line? + current_xi += left_flag; // Heading left? Just go to the left edge of the cell for the first move. while (current_xi != cell_dest_xi + left_flag) { current_xi += dxi; const float next_mesh_line_x = mesh_index_to_xpos(current_xi), @@ -271,22 +235,16 @@ float z0 = z_correction_for_y_on_vertical_mesh_line(ry, current_xi, current_yi) * planner.fade_scaling_factor_for_z(end[Z_AXIS]); - /** - * If part of the Mesh is undefined, it will show up as NAN - * in z_values[][] and propagate through the - * calculations. If our correction is NAN, we throw it out - * because part of the Mesh is undefined and we don't have the - * information we need to complete the height correction. - */ + // Undefined parts of the Mesh in z_values[][] are NAN. + // Replace NAN corrections with 0.0 to prevent NAN propagation. if (isnan(z0)) z0 = 0.0; const float rx = mesh_index_to_xpos(current_xi); /** - * Without this check, it is possible for the algorithm to generate a zero length move in the case - * where the line is heading left and it is starting right on a Mesh Line boundary. For how often - * that happens, it might be best to remove the check and always 'schedule' the move because - * the planner.buffer_segment() routine will filter it if that happens. + * Without this check, it's possible to generate a zero length move, as in the case where + * the line is heading left, starting exactly on a mesh line boundary. Since this is rare + * it might be fine to remove this check and let planner.buffer_segment() filter it out. */ if (rx != start[X_AXIS]) { if (!inf_normalized_flag) { @@ -315,7 +273,7 @@ /** * - * This block handles the generic case of a line crossing both X and Y Mesh lines. + * Handle the generic case of a line crossing both X and Y Mesh lines. * */ @@ -328,7 +286,7 @@ current_xi += left_flag; current_yi += down_flag; - while (xi_cnt > 0 || yi_cnt > 0) { + while (xi_cnt || yi_cnt) { const float next_mesh_line_x = mesh_index_to_xpos(current_xi + dxi), next_mesh_line_y = mesh_index_to_ypos(current_yi + dyi), @@ -343,13 +301,8 @@ float z0 = z_correction_for_x_on_horizontal_mesh_line(rx, current_xi - left_flag, current_yi + dyi) * planner.fade_scaling_factor_for_z(end[Z_AXIS]); - /** - * If part of the Mesh is undefined, it will show up as NAN - * in z_values[][] and propagate through the - * calculations. If our correction is NAN, we throw it out - * because part of the Mesh is undefined and we don't have the - * information we need to complete the height correction. - */ + // Undefined parts of the Mesh in z_values[][] are NAN. + // Replace NAN corrections with 0.0 to prevent NAN propagation. if (isnan(z0)) z0 = 0.0; if (!inf_normalized_flag) { @@ -370,13 +323,8 @@ float z0 = z_correction_for_y_on_vertical_mesh_line(ry, current_xi + dxi, current_yi - down_flag) * planner.fade_scaling_factor_for_z(end[Z_AXIS]); - /** - * If part of the Mesh is undefined, it will show up as NAN - * in z_values[][] and propagate through the - * calculations. If our correction is NAN, we throw it out - * because part of the Mesh is undefined and we don't have the - * information we need to complete the height correction. - */ + // Undefined parts of the Mesh in z_values[][] are NAN. + // Replace NAN corrections with 0.0 to prevent NAN propagation. if (isnan(z0)) z0 = 0.0; if (!inf_normalized_flag) { @@ -394,7 +342,7 @@ xi_cnt--; } - if (xi_cnt < 0 || yi_cnt < 0) break; // we've gone too far, so exit the loop and move on to FINAL_MOVE + if (xi_cnt < 0 || yi_cnt < 0) break; // Too far! Exit the loop and go to FINAL_MOVE } if (g26_debug_flag) @@ -535,7 +483,7 @@ // increment to first segment destination LOOP_XYZE(i) raw[i] += diff[i]; - for(;;) { // for each mesh cell encountered during the move + for (;;) { // for each mesh cell encountered during the move // Compute mesh cell invariants that remain constant for all segments within cell. // Note for cell index, if point is outside the mesh grid (in MESH_INSET perimeter) @@ -585,7 +533,7 @@ const float z_sxy0 = z_xmy0 * diff[X_AXIS], // per-segment adjustment to z_cxy0 z_sxym = (z_xmy1 - z_xmy0) * (1.0 / (MESH_Y_DIST)) * diff[X_AXIS]; // per-segment adjustment to z_cxym - for(;;) { // for all segments within this mesh cell + for (;;) { // for all segments within this mesh cell if (--segments == 0) // if this is last segment, use rtarget for exact COPY(raw, rtarget); diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index e061fc81dc..eaa90a1a1f 100644 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -65,6 +65,10 @@ bool lcd_external_control; // = false #endif +#if ENABLED(POWER_LOSS_RECOVERY) + #include "power_loss_recovery.h" +#endif + // Initialized by settings.load() int16_t lcd_preheat_hotend_temp[2], lcd_preheat_bed_temp[2], lcd_preheat_fan_speed[2]; @@ -168,10 +172,6 @@ uint16_t max_display_update_time = 0; #define TALL_FONT_CORRECTION 0 #endif - #if HAS_POWER_SWITCH - extern bool powersupply_on; - #endif - bool no_reentry = false; constexpr int8_t menu_bottom = LCD_HEIGHT - (TALL_FONT_CORRECTION); @@ -216,14 +216,6 @@ uint16_t max_display_update_time = 0; #else void lcd_temp_menu_e0_filament_change(); #endif - void lcd_advanced_pause_option_menu(); - void lcd_advanced_pause_init_message(); - void lcd_advanced_pause_unload_message(); - void lcd_advanced_pause_insert_message(); - void lcd_advanced_pause_load_message(); - void lcd_advanced_pause_heat_nozzle(); - void lcd_advanced_pause_purge_message(); - void lcd_advanced_pause_resume_message(); #endif #if ENABLED(DAC_STEPPER_CURRENT) @@ -755,7 +747,27 @@ void lcd_status_screen() { lcd_implementation_status_screen(); } -void lcd_reset_status() { lcd_setstatusPGM(PSTR(""), -1); } +/** + * Reset the status message + */ +void lcd_reset_status() { + static const char paused[] PROGMEM = MSG_PRINT_PAUSED; + static const char printing[] PROGMEM = MSG_PRINTING; + static const char welcome[] PROGMEM = WELCOME_MSG; + const char *msg; + if (print_job_timer.isPaused()) + msg = paused; + #if ENABLED(SDSUPPORT) + else if (card.sdprinting) + return lcd_setstatus(card.longFilename[0] ? card.longFilename : card.filename, true); + #endif + else if (print_job_timer.isRunning()) + msg = printing; + else + msg = welcome; + + lcd_setstatusPGM(msg, -1); +} /** * @@ -786,7 +798,7 @@ void kill_screen(const char* lcd_msg) { } void lcd_quick_feedback(const bool clear_buttons) { - lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; + lcd_refresh(); if (clear_buttons) buttons = 0; next_button_update_ms = millis() + 500; @@ -824,7 +836,7 @@ void kill_screen(const char* lcd_msg) { #if ENABLED(PARK_HEAD_ON_PAUSE) enqueue_and_echo_commands_P(PSTR("M125")); #endif - lcd_setstatusPGM(PSTR(MSG_PRINT_PAUSED), -1); + lcd_reset_status(); } void lcd_sdcard_resume() { @@ -837,26 +849,76 @@ void kill_screen(const char* lcd_msg) { lcd_reset_status(); } + bool abort_sd_printing; // =false + void lcd_sdcard_stop() { - card.stopSDPrint( - #if SD_RESORT - true - #endif - ); - clear_command_queue(); - quickstop_stepper(); - print_job_timer.stop(); - thermalManager.disable_all_heaters(); - #if FAN_COUNT > 0 - for (uint8_t i = 0; i < FAN_COUNT; i++) fanSpeeds[i] = 0; - #endif - wait_for_heatup = false; + abort_sd_printing = true; lcd_setstatusPGM(PSTR(MSG_PRINT_ABORTED), -1); lcd_return_to_status(); + + #if ENABLED(POWER_LOSS_RECOVERY) + card.openJobRecoveryFile(false); + job_recovery_info.valid_head = job_recovery_info.valid_foot = 0; + (void)card.saveJobRecoveryInfo(); + card.closeJobRecoveryFile(); + job_recovery_commands_count = 0; + #endif } #endif // SDSUPPORT + #if ENABLED(POWER_LOSS_RECOVERY) + + static void lcd_sdcard_recover_job() { + char cmd[20]; + + // Return to status now + lcd_return_to_status(); + + // Turn leveling off and home + enqueue_and_echo_commands_P(PSTR("M420 S0\nG28" + #if !IS_KINEMATIC + " X Y" + #endif + )); + + // Restore the bed temperature + sprintf_P(cmd, PSTR("M190 S%i"), job_recovery_info.target_temperature_bed); + enqueue_and_echo_command(cmd); + + // Restore all hotend temperatures + HOTEND_LOOP() { + sprintf_P(cmd, PSTR("M109 S%i"), job_recovery_info.target_temperature[e]); + enqueue_and_echo_command(cmd); + } + + // Restore print cooling fan speeds + for (uint8_t i = 0; i < FAN_COUNT; i++) { + sprintf_P(cmd, PSTR("M106 P%i S%i"), i, job_recovery_info.fanSpeeds[i]); + enqueue_and_echo_command(cmd); + } + + // Start draining the job recovery command queue + job_recovery_phase = JOB_RECOVERY_YES; + + // Resume the print job timer + if (job_recovery_info.print_job_elapsed) + print_job_timer.resume(job_recovery_info.print_job_elapsed); + + // Start getting commands from SD + card.startFileprint(); + } + + static void lcd_job_recovery_menu() { + defer_return_to_status = true; + START_MENU(); + MENU_ITEM(function, MSG_RESUME_PRINT, lcd_sdcard_recover_job); + MENU_ITEM(function, MSG_STOP_PRINT, lcd_sdcard_stop); + END_MENU(); + } + + #endif + #if ENABLED(MENU_ITEM_CASE_LIGHT) extern uint8_t case_light_brightness; @@ -888,10 +950,10 @@ void kill_screen(const char* lcd_msg) { // ^ Main // MENU_BACK(MSG_MAIN); - MENU_ITEM(gcode, MSG_BLTOUCH_RESET, PSTR("M280 P" STRINGIFY(Z_ENDSTOP_SERVO_NR) " S" STRINGIFY(BLTOUCH_RESET))); - MENU_ITEM(gcode, MSG_BLTOUCH_SELFTEST, PSTR("M280 P" STRINGIFY(Z_ENDSTOP_SERVO_NR) " S" STRINGIFY(BLTOUCH_SELFTEST))); - MENU_ITEM(gcode, MSG_BLTOUCH_DEPLOY, PSTR("M280 P" STRINGIFY(Z_ENDSTOP_SERVO_NR) " S" STRINGIFY(BLTOUCH_DEPLOY))); - MENU_ITEM(gcode, MSG_BLTOUCH_STOW, PSTR("M280 P" STRINGIFY(Z_ENDSTOP_SERVO_NR) " S" STRINGIFY(BLTOUCH_STOW))); + MENU_ITEM(gcode, MSG_BLTOUCH_RESET, PSTR("M280 P" STRINGIFY(Z_PROBE_SERVO_NR) " S" STRINGIFY(BLTOUCH_RESET))); + MENU_ITEM(gcode, MSG_BLTOUCH_SELFTEST, PSTR("M280 P" STRINGIFY(Z_PROBE_SERVO_NR) " S" STRINGIFY(BLTOUCH_SELFTEST))); + MENU_ITEM(gcode, MSG_BLTOUCH_DEPLOY, PSTR("M280 P" STRINGIFY(Z_PROBE_SERVO_NR) " S" STRINGIFY(BLTOUCH_DEPLOY))); + MENU_ITEM(gcode, MSG_BLTOUCH_STOW, PSTR("M280 P" STRINGIFY(Z_PROBE_SERVO_NR) " S" STRINGIFY(BLTOUCH_STOW))); END_MENU(); } @@ -1335,7 +1397,7 @@ void kill_screen(const char* lcd_msg) { MENU_ITEM_EDIT(float43, MSG_BED_Z, &mbl.z_offset, -1, 1); #endif #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) - MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float3, MSG_Z_FADE_HEIGHT, &new_z_fade_height, 0.0, 100.0, _lcd_set_z_fade_height); + MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float62, MSG_Z_FADE_HEIGHT, &new_z_fade_height, 0.0, 100.0, _lcd_set_z_fade_height); #endif // // Nozzle: @@ -1732,7 +1794,7 @@ void kill_screen(const char* lcd_msg) { void lcd_enqueue_commands_P(const char * const cmd) { no_reentry = true; - enqueue_and_echo_commands_P_now(cmd); + enqueue_and_echo_commands_now_P(cmd); no_reentry = false; } @@ -1763,27 +1825,43 @@ void kill_screen(const char* lcd_msg) { line_to_z(4.0); switch (bed_corner) { case 0: - current_position[X_AXIS] = X_MIN_BED + 10; - current_position[Y_AXIS] = Y_MIN_BED + 10; + current_position[X_AXIS] = X_MIN_BED + LEVEL_CORNERS_INSET; + current_position[Y_AXIS] = Y_MIN_BED + LEVEL_CORNERS_INSET; break; case 1: - current_position[X_AXIS] = X_MAX_BED - 10; + current_position[X_AXIS] = X_MAX_BED - LEVEL_CORNERS_INSET; break; case 2: - current_position[Y_AXIS] = Y_MAX_BED - 10; + current_position[Y_AXIS] = Y_MAX_BED - LEVEL_CORNERS_INSET; break; case 3: - current_position[X_AXIS] = X_MIN_BED + 10; + current_position[X_AXIS] = X_MIN_BED + LEVEL_CORNERS_INSET; break; + #if ENABLED(LEVEL_CENTER_TOO) + case 4: + current_position[X_AXIS] = X_CENTER; + current_position[Y_AXIS] = Y_CENTER; + break; + #endif } planner.buffer_line_kinematic(current_position, MMM_TO_MMS(manual_feedrate_mm_m[X_AXIS]), active_extruder); line_to_z(0.0); - if (++bed_corner > 3) bed_corner = 0; + if (++bed_corner > 3 + #if ENABLED(LEVEL_CENTER_TOO) + + 1 + #endif + ) bed_corner = 0; } void _lcd_corner_submenu() { START_MENU(); - MENU_ITEM(function, MSG_NEXT_CORNER, _lcd_goto_next_corner); + MENU_ITEM(function, + #if ENABLED(LEVEL_CENTER_TOO) + MSG_LEVEL_BED_NEXT_POINT + #else + MSG_NEXT_CORNER + #endif + , _lcd_goto_next_corner); MENU_ITEM(function, MSG_BACK, lcd_goto_previous_menu_no_defer); END_MENU(); } @@ -1833,7 +1911,7 @@ void kill_screen(const char* lcd_msg) { if (!lcd_wait_for_move) { #if MANUAL_PROBE_HEIGHT > 0 && DISABLED(MESH_BED_LEVELING) // Display "Done" screen and wait for moves to complete - line_to_z(Z_MIN_POS + MANUAL_PROBE_HEIGHT); + line_to_z(MANUAL_PROBE_HEIGHT); lcd_synchronize(PSTR(MSG_LEVEL_BED_DONE)); #endif lcd_goto_previous_menu_no_defer(); @@ -1864,10 +1942,10 @@ void kill_screen(const char* lcd_msg) { // lcd_wait_for_move = true; lcd_goto_screen(_lcd_level_bed_done); - #if ENABLED(PROBE_MANUALLY) - enqueue_and_echo_commands_P(PSTR("G29 V1")); - #elif ENABLED(MESH_BED_LEVELING) + #if ENABLED(MESH_BED_LEVELING) enqueue_and_echo_commands_P(PSTR("G29 S2")); + #elif ENABLED(PROBE_MANUALLY) + enqueue_and_echo_commands_P(PSTR("G29 V1")); #endif } else @@ -1880,7 +1958,6 @@ void kill_screen(const char* lcd_msg) { // Encoder knob or keypad buttons adjust the Z position // if (encoderPosition) { - refresh_cmd_timeout(); const float z = current_position[Z_AXIS] + float((int32_t)encoderPosition) * (MBL_Z_STEP); line_to_z(constrain(z, -(LCD_PROBE_Z_RANGE) * 0.5, (LCD_PROBE_Z_RANGE) * 0.5)); lcdDrawUpdate = LCDVIEW_CALL_REDRAW_NEXT; @@ -1917,10 +1994,10 @@ void kill_screen(const char* lcd_msg) { // G29 Records Z, moves, and signals when it pauses lcd_wait_for_move = true; - #if ENABLED(PROBE_MANUALLY) - enqueue_and_echo_commands_P(PSTR("G29 V1")); - #elif ENABLED(MESH_BED_LEVELING) + #if ENABLED(MESH_BED_LEVELING) enqueue_and_echo_commands_P(manual_probe_index ? PSTR("G29 S2") : PSTR("G29 S1")); + #elif ENABLED(PROBE_MANUALLY) + enqueue_and_echo_commands_P(PSTR("G29 V1")); #endif } @@ -2403,7 +2480,6 @@ void kill_screen(const char* lcd_msg) { stepper.cleaning_buffer_counter = 0; set_current_from_steppers_for_axis(ALL_AXES); sync_plan_position(); - refresh_cmd_timeout(); } void _lcd_ubl_output_map_lcd() { @@ -2418,10 +2494,7 @@ void kill_screen(const char* lcd_msg) { if (encoderPosition) { step_scaler += (int32_t)encoderPosition; x_plot += step_scaler / (ENCODER_STEPS_PER_MENU_ITEM); - if (abs(step_scaler) >= ENCODER_STEPS_PER_MENU_ITEM) - step_scaler = 0; - refresh_cmd_timeout(); - + if (abs(step_scaler) >= ENCODER_STEPS_PER_MENU_ITEM) step_scaler = 0; encoderPosition = 0; lcdDrawUpdate = LCDVIEW_REDRAW_NOW; } @@ -2558,7 +2631,7 @@ void kill_screen(const char* lcd_msg) { MENU_ITEM(submenu, MSG_UBL_TOOLS, _lcd_ubl_tools_menu); MENU_ITEM(gcode, MSG_UBL_INFO_UBL, PSTR("G29 W")); #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) - MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float3, MSG_Z_FADE_HEIGHT, &new_z_fade_height, 0.0, 100.0, _lcd_set_z_fade_height); + MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float62, MSG_Z_FADE_HEIGHT, &new_z_fade_height, 0.0, 100.0, _lcd_set_z_fade_height); #endif END_MENU(); } @@ -2685,9 +2758,9 @@ void kill_screen(const char* lcd_msg) { // BLTouch Self-Test and Reset // #if ENABLED(BLTOUCH) - MENU_ITEM(gcode, MSG_BLTOUCH_SELFTEST, PSTR("M280 P" STRINGIFY(Z_ENDSTOP_SERVO_NR) " S" STRINGIFY(BLTOUCH_SELFTEST))); + MENU_ITEM(gcode, MSG_BLTOUCH_SELFTEST, PSTR("M280 P" STRINGIFY(Z_PROBE_SERVO_NR) " S" STRINGIFY(BLTOUCH_SELFTEST))); if (!endstops.z_probe_enabled && TEST_BLTOUCH()) - MENU_ITEM(gcode, MSG_BLTOUCH_RESET, PSTR("M280 P" STRINGIFY(Z_ENDSTOP_SERVO_NR) " S" STRINGIFY(BLTOUCH_RESET))); + MENU_ITEM(gcode, MSG_BLTOUCH_RESET, PSTR("M280 P" STRINGIFY(Z_PROBE_SERVO_NR) " S" STRINGIFY(BLTOUCH_RESET))); #endif // @@ -2719,29 +2792,22 @@ void kill_screen(const char* lcd_msg) { float move_menu_scale; - #if ENABLED(DELTA_CALIBRATION_MENU) || (ENABLED(DELTA_AUTO_CALIBRATION) && !HAS_BED_PROBE) + #if ENABLED(DELTA_CALIBRATION_MENU) || ENABLED(DELTA_AUTO_CALIBRATION) void lcd_move_z(); void _man_probe_pt(const float &rx, const float &ry) { - #if HAS_LEVELING - reset_bed_level(); // After calibration bed-level data is no longer valid - #endif - - line_to_z((Z_CLEARANCE_BETWEEN_PROBES) + (DELTA_PRINTABLE_RADIUS) / 5); - current_position[X_AXIS] = rx; - current_position[Y_AXIS] = ry; - line_to_current_z(); - line_to_z(Z_CLEARANCE_BETWEEN_PROBES); + do_blocking_move_to_z(Z_CLEARANCE_BETWEEN_PROBES); + do_blocking_move_to_xy(rx, ry); lcd_synchronize(); - move_menu_scale = PROBE_MANUALLY_STEP; + move_menu_scale = max(PROBE_MANUALLY_STEP, MIN_STEPS_PER_SEGMENT / float(DEFAULT_XYZ_STEPS_PER_UNIT)); lcd_goto_screen(lcd_move_z); } - #endif // DELTA_CALIBRATION_MENU || (DELTA_AUTO_CALIBRATION && !HAS_BED_PROBE) + #endif // DELTA_CALIBRATION_MENU || DELTA_AUTO_CALIBRATION - #if ENABLED(DELTA_AUTO_CALIBRATION) && !HAS_BED_PROBE + #if ENABLED(DELTA_AUTO_CALIBRATION) float lcd_probe_pt(const float &rx, const float &ry) { _man_probe_pt(rx, ry); @@ -2754,7 +2820,7 @@ void kill_screen(const char* lcd_msg) { return current_position[Z_AXIS]; } - #endif // DELTA_AUTO_CALIBRATION && !HAS_BED_PROBE + #endif // DELTA_AUTO_CALIBRATION #if ENABLED(DELTA_CALIBRATION_MENU) @@ -2766,10 +2832,6 @@ void kill_screen(const char* lcd_msg) { } void _lcd_delta_calibrate_home() { - #if HAS_LEVELING - reset_bed_level(); // After calibration bed-level data is no longer valid - #endif - enqueue_and_echo_commands_P(PSTR("G28")); lcd_goto_screen(_lcd_calibrate_homing); } @@ -2783,18 +2845,25 @@ void kill_screen(const char* lcd_msg) { #if ENABLED(DELTA_CALIBRATION_MENU) || ENABLED(DELTA_AUTO_CALIBRATION) + void _recalc_delta_settings() { + #if HAS_LEVELING + reset_bed_level(); // After changing kinematics bed-level data is no longer valid + #endif + recalc_delta_settings(); + } + void lcd_delta_settings() { START_MENU(); MENU_BACK(MSG_DELTA_CALIBRATE); - MENU_ITEM_EDIT_CALLBACK(float52, MSG_DELTA_DIAG_ROD, &delta_diagonal_rod, delta_diagonal_rod - 5.0, delta_diagonal_rod + 5.0, recalc_delta_settings); - MENU_ITEM_EDIT_CALLBACK(float52, MSG_DELTA_HEIGHT, &delta_height, delta_height - 10.0, delta_height + 10.0, recalc_delta_settings); - MENU_ITEM_EDIT_CALLBACK(float43, "Ex", &delta_endstop_adj[A_AXIS], -5.0, 5.0, recalc_delta_settings); - MENU_ITEM_EDIT_CALLBACK(float43, "Ey", &delta_endstop_adj[B_AXIS], -5.0, 5.0, recalc_delta_settings); - MENU_ITEM_EDIT_CALLBACK(float43, "Ez", &delta_endstop_adj[C_AXIS], -5.0, 5.0, recalc_delta_settings); - MENU_ITEM_EDIT_CALLBACK(float52, MSG_DELTA_RADIUS, &delta_radius, delta_radius - 5.0, delta_radius + 5.0, recalc_delta_settings); - MENU_ITEM_EDIT_CALLBACK(float43, "Tx", &delta_tower_angle_trim[A_AXIS], -5.0, 5.0, recalc_delta_settings); - MENU_ITEM_EDIT_CALLBACK(float43, "Ty", &delta_tower_angle_trim[B_AXIS], -5.0, 5.0, recalc_delta_settings); - MENU_ITEM_EDIT_CALLBACK(float43, "Tz", &delta_tower_angle_trim[C_AXIS], -5.0, 5.0, recalc_delta_settings); + MENU_ITEM_EDIT_CALLBACK(float52, MSG_DELTA_HEIGHT, &delta_height, delta_height - 10.0, delta_height + 10.0, _recalc_delta_settings); + MENU_ITEM_EDIT_CALLBACK(float43, "Ex", &delta_endstop_adj[A_AXIS], -5.0, 5.0, _recalc_delta_settings); + MENU_ITEM_EDIT_CALLBACK(float43, "Ey", &delta_endstop_adj[B_AXIS], -5.0, 5.0, _recalc_delta_settings); + MENU_ITEM_EDIT_CALLBACK(float43, "Ez", &delta_endstop_adj[C_AXIS], -5.0, 5.0, _recalc_delta_settings); + MENU_ITEM_EDIT_CALLBACK(float52, MSG_DELTA_RADIUS, &delta_radius, delta_radius - 5.0, delta_radius + 5.0, _recalc_delta_settings); + MENU_ITEM_EDIT_CALLBACK(float43, "Tx", &delta_tower_angle_trim[A_AXIS], -5.0, 5.0, _recalc_delta_settings); + MENU_ITEM_EDIT_CALLBACK(float43, "Ty", &delta_tower_angle_trim[B_AXIS], -5.0, 5.0, _recalc_delta_settings); + MENU_ITEM_EDIT_CALLBACK(float43, "Tz", &delta_tower_angle_trim[C_AXIS], -5.0, 5.0, _recalc_delta_settings); + MENU_ITEM_EDIT_CALLBACK(float52, MSG_DELTA_DIAG_ROD, &delta_diagonal_rod, delta_diagonal_rod - 5.0, delta_diagonal_rod + 5.0, _recalc_delta_settings); END_MENU(); } @@ -2804,6 +2873,7 @@ void kill_screen(const char* lcd_msg) { #if ENABLED(DELTA_AUTO_CALIBRATION) MENU_ITEM(gcode, MSG_DELTA_AUTO_CALIBRATE, PSTR("G33")); MENU_ITEM(gcode, MSG_DELTA_HEIGHT_CALIBRATE, PSTR("G33 P1")); + MENU_ITEM(gcode, MSG_DELTA_Z_OFFSET_CALIBRATE, PSTR("G33 P-1")); #if ENABLED(EEPROM_SETTINGS) MENU_ITEM(function, MSG_STORE_EEPROM, lcd_store_settings); MENU_ITEM(function, MSG_LOAD_EEPROM, lcd_load_settings); @@ -2903,7 +2973,6 @@ void kill_screen(const char* lcd_msg) { if (use_click()) { return lcd_goto_previous_menu_no_defer(); } ENCODER_DIRECTION_NORMAL(); if (encoderPosition && !processing_manual_move) { - refresh_cmd_timeout(); // Start with no limits to movement float min = current_position[axis] - 1000, @@ -2952,14 +3021,16 @@ void kill_screen(const char* lcd_msg) { const float diff = float((int32_t)encoderPosition) * move_menu_scale; #if IS_KINEMATIC manual_move_offset += diff; - // Limit only when trying to move towards the limit - if ((int32_t)encoderPosition < 0) NOLESS(manual_move_offset, min - current_position[axis]); - if ((int32_t)encoderPosition > 0) NOMORE(manual_move_offset, max - current_position[axis]); + if ((int32_t)encoderPosition < 0) + NOLESS(manual_move_offset, min - current_position[axis]); + else + NOMORE(manual_move_offset, max - current_position[axis]); #else current_position[axis] += diff; - // Limit only when trying to move towards the limit - if ((int32_t)encoderPosition < 0) NOLESS(current_position[axis], min); - if ((int32_t)encoderPosition > 0) NOMORE(current_position[axis], max); + if ((int32_t)encoderPosition < 0) + NOLESS(current_position[axis], min); + else + NOMORE(current_position[axis], max); #endif manual_move_to_current(axis); @@ -3126,6 +3197,10 @@ void kill_screen(const char* lcd_msg) { START_MENU(); MENU_BACK(MSG_PREPARE); + #if HAS_SOFTWARE_ENDSTOPS && ENABLED(SOFT_ENDSTOPS_MENU_ITEM) + MENU_ITEM_EDIT(bool, MSG_LCD_SOFT_ENDSTOPS, &soft_endstops_enabled); + #endif + if (_MOVE_XYZ_ALLOWED) { if (_MOVE_XY_ALLOWED) { MENU_ITEM(submenu, MSG_MOVE_X, lcd_move_get_x_amount); @@ -3861,7 +3936,7 @@ void kill_screen(const char* lcd_msg) { encoderPosition = card.updir() ? ENCODER_STEPS_PER_MENU_ITEM : 0; encoderTopLine = 0; screen_changed = true; - lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; + lcd_refresh(); } /** @@ -4602,6 +4677,31 @@ void kill_screen(const char* lcd_msg) { END_SCREEN(); } + #if ENABLED(ADVANCED_PAUSE_CONTINUOUS_PURGE) + void lcd_advanced_pause_continuous_purge_menu() { + START_SCREEN(); + STATIC_ITEM(MSG_FILAMENT_CHANGE_PURGE_1); + #ifdef MSG_FILAMENT_CHANGE_PURGE_2 + STATIC_ITEM(MSG_FILAMENT_CHANGE_PURGE_2); + #define __FC_LINES_G 3 + #else + #define __FC_LINES_G 2 + #endif + #ifdef MSG_FILAMENT_CHANGE_PURGE_3 + STATIC_ITEM(MSG_FILAMENT_CHANGE_PURGE_3); + #define _FC_LINES_G (__FC_LINES_G + 1) + #else + #define _FC_LINES_G __FC_LINES_G + #endif + #if LCD_HEIGHT > _FC_LINES_G + 1 + STATIC_ITEM(" "); + #endif + HOTEND_STATUS_ITEM(); + STATIC_ITEM(MSG_USERWAIT); + END_SCREEN(); + } + #endif + void lcd_advanced_pause_resume_message() { START_SCREEN(); STATIC_ITEM_P(advanced_pause_header(), true, true); @@ -4627,6 +4727,9 @@ void kill_screen(const char* lcd_msg) { case ADVANCED_PAUSE_MESSAGE_WAIT_FOR_NOZZLES_TO_HEAT: return lcd_advanced_pause_wait_for_nozzles_to_heat; case ADVANCED_PAUSE_MESSAGE_OPTION: advanced_pause_menu_response = ADVANCED_PAUSE_RESPONSE_WAIT_FOR; return lcd_advanced_pause_option_menu; + #if ENABLED(ADVANCED_PAUSE_CONTINUOUS_PURGE) + case ADVANCED_PAUSE_MESSAGE_CONTINUOUS_PURGE: return lcd_advanced_pause_continuous_purge_menu; + #endif case ADVANCED_PAUSE_MESSAGE_STATUS: default: break; } @@ -4694,8 +4797,7 @@ void kill_screen(const char* lcd_msg) { void menu_edit_callback_ ## _name() { if (_menu_edit_ ## _name()) (*callbackFunc)(); } \ void _menu_action_setting_edit_ ## _name(const char * const pstr, _type* const ptr, const _type minValue, const _type maxValue) { \ lcd_save_previous_screen(); \ - \ - lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; \ + lcd_refresh(); \ \ editLabel = pstr; \ editValue = ptr; \ @@ -4835,6 +4937,7 @@ void kill_screen(const char* lcd_msg) { UNUSED(longFilename); card.openAndPrintFile(filename); lcd_return_to_status(); + lcd_reset_status(); } void menu_action_sddirectory(const char* filename, char* longFilename) { @@ -4846,12 +4949,12 @@ void kill_screen(const char* lcd_msg) { #if ENABLED(DOGLCD) drawing_screen = false; #endif - lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; + lcd_refresh(); } #endif // SDSUPPORT - void menu_action_setting_edit_bool(const char* pstr, bool* ptr) { UNUSED(pstr); *ptr ^= true; lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; } + void menu_action_setting_edit_bool(const char* pstr, bool* ptr) { UNUSED(pstr); *ptr ^= true; lcd_refresh(); } void menu_action_setting_edit_callback_bool(const char* pstr, bool* ptr, screenFunc_t callback) { menu_action_setting_edit_bool(pstr, ptr); (*callback)(); @@ -5022,7 +5125,7 @@ void lcd_update() { } #endif - #endif + #endif // ULTIPANEL #if ENABLED(SDSUPPORT) && PIN_EXISTS(SD_DETECT) @@ -5042,7 +5145,7 @@ void lcd_update() { if (old_sd_status != 2) LCD_MESSAGEPGM(MSG_SD_REMOVED); } - lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; + lcd_refresh(); lcd_implementation_init( // to maybe revive the LCD if static electricity killed it. #if ENABLED(LCD_PROGRESS_BAR) currentScreen == lcd_status_screen ? CHARSET_INFO : CHARSET_MENU @@ -5052,6 +5155,13 @@ void lcd_update() { #endif // SDSUPPORT && SD_DETECT_PIN + #if ENABLED(POWER_LOSS_RECOVERY) + if (job_recovery_commands_count && job_recovery_phase == JOB_RECOVERY_IDLE) { + lcd_goto_screen(lcd_job_recovery_menu); + job_recovery_phase = JOB_RECOVERY_MAYBE; // Waiting for a response + } + #endif + const millis_t ms = millis(); if (ELAPSED(ms, next_lcd_update_ms) #if ENABLED(DOGLCD) @@ -5287,7 +5397,7 @@ void lcd_finishstatus(const bool persist=false) { expire_status_ms = persist ? 0 : progress_bar_ms + PROGRESS_MSG_EXPIRE; #endif #endif - lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; + lcd_refresh(); #if ENABLED(FILAMENT_LCD_DISPLAY) && ENABLED(SDSUPPORT) previous_lcd_status_ms = millis(); //get status message to show up for a while diff --git a/Marlin/ultralcd.h b/Marlin/ultralcd.h index e8aa9dc488..f443875bed 100644 --- a/Marlin/ultralcd.h +++ b/Marlin/ultralcd.h @@ -56,6 +56,7 @@ void lcd_setstatusPGM(const char* message, const int8_t level=0); void lcd_setalertstatusPGM(const char* message); void lcd_reset_alert_level(); + void lcd_reset_status(); void lcd_status_printf_P(const uint8_t level, const char * const fmt, ...); void lcd_kill_screen(); void kill_screen(const char* lcd_msg); @@ -144,10 +145,6 @@ float lcd_z_offset_edit(); #endif - #if ENABLED(DELTA_AUTO_CALIBRATION) && !HAS_BED_PROBE - float lcd_probe_pt(const float &rx, const float &ry); - #endif - #else inline void lcd_buttons_update() {} @@ -246,16 +243,21 @@ inline void lcd_status_printf_P(const uint8_t level, const char * const fmt, ...) { UNUSED(level); UNUSED(fmt); } inline void lcd_setalertstatusPGM(const char* message) { UNUSED(message); } inline void lcd_reset_alert_level() {} + inline void lcd_reset_status() {} #endif // ULTRA_LCD #define LCD_MESSAGEPGM(x) lcd_setstatusPGM(PSTR(x)) #define LCD_ALERTMESSAGEPGM(x) lcd_setalertstatusPGM(PSTR(x)) -void lcd_reset_status(); - #if ENABLED(SD_REPRINT_LAST_SELECTED_FILE) void lcd_reselect_last_file(); #endif +#if ENABLED(ULTIPANEL) && ENABLED(SDSUPPORT) + extern bool abort_sd_printing; +#else + constexpr bool abort_sd_printing = false; +#endif + #endif // ULTRALCD_H diff --git a/Marlin/ultralcd_impl_DOGM.h b/Marlin/ultralcd_impl_DOGM.h index 0a217f0302..0094b2da53 100644 --- a/Marlin/ultralcd_impl_DOGM.h +++ b/Marlin/ultralcd_impl_DOGM.h @@ -71,8 +71,10 @@ #if ENABLED(USE_SMALL_INFOFONT) #include "dogm_font_data_6x9_marlin.h" #define FONT_STATUSMENU_NAME u8g_font_6x9 + #define INFO_FONT_HEIGHT 7 #else #define FONT_STATUSMENU_NAME FONT_MENU_NAME + #define INFO_FONT_HEIGHT 8 #endif #include "dogm_font_data_Marlin_symbols.h" // The Marlin special symbols @@ -396,9 +398,9 @@ void lcd_kill_screen() { u8g.setPrintPos(0, h4 * 1); lcd_print_utf(lcd_status_message); u8g.setPrintPos(0, h4 * 2); - lcd_printPGM(PSTR(MSG_HALTED)); + lcd_printPGM_utf(PSTR(MSG_HALTED)); u8g.setPrintPos(0, h4 * 3); - lcd_printPGM(PSTR(MSG_PLEASE_RESET)); + lcd_printPGM_utf(PSTR(MSG_PLEASE_RESET)); } while (u8g.nextPage()); } @@ -565,7 +567,7 @@ void lcd_implementation_clear() { } // Automatically cleared by Picture Loop bool onpage = PAGE_CONTAINS(baseline + 1 - (DOG_CHAR_HEIGHT_EDIT), baseline); if (onpage) { u8g.setPrintPos(0, baseline); - lcd_printPGM(pstr); + lcd_printPGM_utf(pstr); } if (value != NULL) { diff --git a/Marlin/ultralcd_impl_HD44780.h b/Marlin/ultralcd_impl_HD44780.h index 3004a791bb..cf8e7dfdf5 100644 --- a/Marlin/ultralcd_impl_HD44780.h +++ b/Marlin/ultralcd_impl_HD44780.h @@ -520,7 +520,7 @@ void lcd_printPGM_utf(const char *str, uint8_t n=LCD_WIDTH) { lcd_erase_line(3); \ if (strlen(STRING) <= LCD_WIDTH) { \ lcd.setCursor((LCD_WIDTH - lcd_strlen_P(PSTR(STRING))) / 2, 3); \ - lcd_printPGM(PSTR(STRING)); \ + lcd_printPGM_utf(PSTR(STRING)); \ safe_delay(DELAY); \ } \ else { \ @@ -593,10 +593,10 @@ void lcd_kill_screen() { lcd.setCursor(0, 2); #else lcd.setCursor(0, 2); - lcd_printPGM(PSTR(MSG_HALTED)); + lcd_printPGM_utf(PSTR(MSG_HALTED)); lcd.setCursor(0, 3); #endif - lcd_printPGM(PSTR(MSG_PLEASE_RESET)); + lcd_printPGM_utf(PSTR(MSG_PLEASE_RESET)); } FORCE_INLINE void _draw_axis_label(const AxisEnum axis, const char* const pstr, const bool blink) { @@ -1009,7 +1009,7 @@ static void lcd_implementation_status_screen() { void lcd_implementation_drawedit(const char* pstr, const char* const value=NULL) { lcd.setCursor(1, 1); - lcd_printPGM(pstr); + lcd_printPGM_utf(pstr); if (value != NULL) { lcd.write(':'); const uint8_t valrow = (lcd_strlen_P(pstr) + 1 + lcd_strlen(value) + 1) > (LCD_WIDTH - 2) ? 2 : 1; // Value on the next row if it won't fit diff --git a/buildroot/share/git/mfnew b/buildroot/share/git/mfnew index 0fb869435a..a33c3f081a 100755 --- a/buildroot/share/git/mfnew +++ b/buildroot/share/git/mfnew @@ -31,4 +31,4 @@ case "$#" in esac git fetch upstream -git checkout upstream/$TARG -b $BRANCH +git checkout --no-track upstream/$TARG -b $BRANCH