diff --git a/.travis.yml b/.travis.yml index d869c01f7ae7..4516857c730d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -95,7 +95,7 @@ script: - opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT EEPROM_SETTINGS - opt_enable BLINKM PCA9632 RGB_LED NEOPIXEL_LED AUTO_POWER_CONTROL NOZZLE_PARK_FEATURE FILAMENT_RUNOUT_SENSOR - opt_enable AUTO_BED_LEVELING_LINEAR Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE SKEW_CORRECTION SKEW_CORRECTION_FOR_Z SKEW_CORRECTION_GCODE - - opt_enable_adv ARC_P_CIRCLES ADVANCED_PAUSE_FEATURE CNC_WORKSPACE_PLANES CNC_COORDINATE_SYSTEMS + - opt_enable_adv ARC_P_CIRCLES ADVANCED_PAUSE_FEATURE CNC_WORKSPACE_PLANES CNC_COORDINATE_SYSTEMS POWER_LOSS_RECOVERY - opt_enable_adv FWRETRACT MAX7219_DEBUG LED_CONTROL_MENU CASE_LIGHT_ENABLE CASE_LIGHT_USE_NEOPIXEL CODEPENDENT_XY_HOMING - opt_set GRID_MAX_POINTS_X 16 - opt_set_adv FANMUX0_PIN 53 diff --git a/Marlin/Conditionals_post.h b/Marlin/Conditionals_post.h index c934d74f47f0..2bef5300bbbc 100644 --- a/Marlin/Conditionals_post.h +++ b/Marlin/Conditionals_post.h @@ -696,7 +696,6 @@ #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_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)) @@ -706,8 +705,11 @@ #define HAS_HEATER_4 (PIN_EXISTS(HEATER_4)) #define HAS_HEATER_BED (PIN_EXISTS(HEATER_BED)) + #define HAS_HEATED_BED (HAS_TEMP_BED && HAS_HEATER_BED) + #define HAS_TEMP_SENSOR (HAS_TEMP_HOTEND || HAS_HEATED_BED || HAS_TEMP_CHAMBER) + // Thermal protection - #define HAS_THERMALLY_PROTECTED_BED (ENABLED(THERMAL_PROTECTION_BED) && HAS_TEMP_BED && HAS_HEATER_BED) + #define HAS_THERMALLY_PROTECTED_BED (HAS_HEATED_BED && ENABLED(THERMAL_PROTECTION_BED)) #define WATCH_HOTENDS (ENABLED(THERMAL_PROTECTION_HOTENDS) && WATCH_TEMP_PERIOD > 0) #define WATCH_THE_BED (HAS_THERMALLY_PROTECTED_BED && WATCH_BED_TEMP_PERIOD > 0) @@ -804,7 +806,7 @@ /** * Heated bed requires settings */ - #if HAS_HEATER_BED + #if HAS_HEATED_BED #ifndef MAX_BED_POWER #define MAX_BED_POWER 255 #endif @@ -946,6 +948,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 */ @@ -1221,7 +1227,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 0a2e11895e28..810d28681a8c 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -708,8 +708,13 @@ * 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 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 // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -1092,6 +1097,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 d79c460a989b..527aeff04193 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -554,6 +554,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. * diff --git a/Marlin/G26_Mesh_Validation_Tool.cpp b/Marlin/G26_Mesh_Validation_Tool.cpp index 46689c89b832..4497eedd4044 100644 --- a/Marlin/G26_Mesh_Validation_Tool.cpp +++ b/Marlin/G26_Mesh_Validation_Tool.cpp @@ -481,7 +481,7 @@ */ inline bool turn_on_heaters() { millis_t next = millis() + 5000UL; - #if HAS_TEMP_BED + #if HAS_HEATED_BED #if ENABLED(ULTRA_LCD) if (g26_bed_temp > 25) { lcd_setstatusPGM(PSTR("G26 Heating Bed."), 99); @@ -841,7 +841,7 @@ #endif if (!g26_keep_heaters_on) { - #if HAS_TEMP_BED + #if HAS_HEATED_BED thermalManager.setTargetBed(0); #endif thermalManager.setTargetHotend(0, 0); diff --git a/Marlin/M100_Free_Mem_Chk.cpp b/Marlin/M100_Free_Mem_Chk.cpp index 9a455aba93bc..9680908dc5ee 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 454c2823d00a..dfa65b760185 100644 --- a/Marlin/Makefile +++ b/Marlin/Makefile @@ -96,319 +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 -#RAMPS equivalents -else ifeq ($(HARDWARE_MOTHERBOARD),143) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),144) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),145) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),146) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),148) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),77) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),78) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),79) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),401) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),402) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),40) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),41) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),47) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),53) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),504) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),37) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),42) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),52) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),49) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),72) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),80) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),503) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),431) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),343) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),243) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 +# +# RAMPS 1.3 / 1.4 - ATmega1280, ATmega2560 +# -#Other ATmega1280, ATmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),111) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),112) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),2) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),21) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),200) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),70) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),701) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),703) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),704) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),302) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),303) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),304) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),305) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),21) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),999) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),310) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),321) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),74) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),75) -HARDWARE_VARIANT ?= arduino -MCU ?= 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) -#Gen6 -else ifeq ($(HARDWARE_MOTHERBOARD),5) -HARDWARE_VARIANT ?= Gen6 -MCU ?= atmega644p -else ifeq ($(HARDWARE_MOTHERBOARD),51) -HARDWARE_VARIANT ?= Gen6 -MCU ?= atmega644p +# +# 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) -#Sanguinololu -else ifeq ($(HARDWARE_MOTHERBOARD),6) +# +# 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 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),64) +# Melzi with ATmega1284 (MaKr3d version) +else ifeq ($(HARDWARE_MOTHERBOARD),66) HARDWARE_VARIANT ?= Sanguino MCU ?= atmega1284p -else ifeq ($(HARDWARE_MOTHERBOARD),65) +# Melzi Creality3D board (for CR-10 etc) +else ifeq ($(HARDWARE_MOTHERBOARD),89) HARDWARE_VARIANT ?= Sanguino MCU ?= atmega1284p -else ifeq ($(HARDWARE_MOTHERBOARD),66) +# Melzi Malyan M150 board +else ifeq ($(HARDWARE_MOTHERBOARD),92) HARDWARE_VARIANT ?= Sanguino MCU ?= atmega1284p -else ifeq ($(HARDWARE_MOTHERBOARD),69) +# Tronxy X5S +else ifeq ($(HARDWARE_MOTHERBOARD),505) HARDWARE_VARIANT ?= Sanguino MCU ?= atmega1284p -else ifeq ($(HARDWARE_MOTHERBOARD),89) +# STB V1.1 +else ifeq ($(HARDWARE_MOTHERBOARD),64) HARDWARE_VARIANT ?= Sanguino MCU ?= atmega1284p -else ifeq ($(HARDWARE_MOTHERBOARD),92) +# Azteeg X1 +else ifeq ($(HARDWARE_MOTHERBOARD),65) HARDWARE_VARIANT ?= Sanguino MCU ?= atmega1284p -else ifeq ($(HARDWARE_MOTHERBOARD),505) +# Anet 1.0 (Melzi clone) +else ifeq ($(HARDWARE_MOTHERBOARD),69) HARDWARE_VARIANT ?= Sanguino MCU ?= atmega1284p -else ifeq ($(HARDWARE_MOTHERBOARD),601) + +# +# Other ATmega644P, ATmega644, ATmega1284P +# + +# 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 -#Ultimaker -else ifeq ($(HARDWARE_MOTHERBOARD),7) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),71) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega1280 - -#ATmega1281, ATmega2561 -else ifeq ($(HARDWARE_MOTHERBOARD),702) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega1281 -else ifeq ($(HARDWARE_MOTHERBOARD),25) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega1281 +# +# Teensyduino - AT90USB1286, AT90USB1286P +# -#Teensylu -else ifeq ($(HARDWARE_MOTHERBOARD),8) +# 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 -else ifeq ($(HARDWARE_MOTHERBOARD),88) +# 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 - -#Sethi 3D_1 -else ifeq ($(HARDWARE_MOTHERBOARD),20) -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 @@ -417,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 74b8e6785ae1..aadbbdaf244a 100644 --- a/Marlin/Marlin.h +++ b/Marlin/Marlin.h @@ -197,13 +197,17 @@ 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 diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 7981b2620925..b7331ce75c49 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -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. @@ -571,6 +572,10 @@ uint8_t target_extruder; #define ADJUST_DELTA(V) NOOP #endif +#if HAS_HEATED_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() @@ -586,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() @@ -897,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(); } @@ -1227,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 @@ -2186,6 +2213,16 @@ void clean_up_after_endstop_or_probe_move() { if (DEBUGGING(LEVELING)) DEBUG_POS(">>> do_probe_move", current_position); #endif + #if HAS_HEATED_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; @@ -2461,7 +2498,21 @@ 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 @@ -2885,6 +2936,16 @@ static void do_homing_move(const AxisEnum axis, const float distance, const floa SERIAL_EOL(); } #endif + + #if HOMING_Z_WITH_PROBE && HAS_HEATED_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 // Only do some things when moving towards an endstop const int8_t axis_home_dir = @@ -3956,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 @@ -4030,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) @@ -4223,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; @@ -4244,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) { @@ -4259,10 +4326,10 @@ void home_all_axes() { gcode_G28(true); } enable_soft_endstops = soft_endstops_enabled; #endif // Move close to the bed before the first point - do_blocking_move_to_z(Z_MIN_POS); + 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; @@ -4281,7 +4348,7 @@ void home_all_axes() { gcode_G28(true); } } 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(); @@ -4295,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(); @@ -4355,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)); } @@ -4794,7 +4861,7 @@ void home_all_axes() { gcode_G28(true); } enable_soft_endstops = soft_endstops_enabled; #endif // Move close to the bed before the first point - do_blocking_move_to_z(Z_MIN_POS); + do_blocking_move_to_z(0); } else { @@ -5786,7 +5853,7 @@ void home_all_axes() { gcode_G28(true); } _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; - const static char save_message[] PROGMEM = "Save with M500 and/or copy to Configuration.h"; + 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 @@ -6298,12 +6365,9 @@ inline void gcode_G92() { ms += millis(); // wait until this time for a click while (PENDING(millis(), ms) && wait_for_user) idle(); } - else { - #if ENABLED(ULTIPANEL) - if (lcd_detected()) - #endif - while (wait_for_user) idle(); - } + else + while (wait_for_user) idle(); + #if ENABLED(PRINTER_EVENT_LEDS) && ENABLED(SDSUPPORT) if (lights_off_after_print) { @@ -6312,11 +6376,7 @@ inline void gcode_G92() { } #endif - #if ENABLED(ULTIPANEL) - if (lcd_detected()) { - print_job_timer.isPaused() ? LCD_MESSAGEPGM(WELCOME_MSG) : LCD_MESSAGEPGM(MSG_RESUMING); - } - #endif + lcd_reset_status(); wait_for_user = false; KEEPALIVE_STATE(IN_HANDLER); @@ -6973,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 @@ -7827,7 +7891,7 @@ inline void gcode_M105() { #if HAS_TEMP_SENSOR SERIAL_PROTOCOLPGM(MSG_OK); thermalManager.print_heaterstates(); - #else // !HAS_TEMP_HOTEND && !HAS_TEMP_BED + #else // !HAS_TEMP_SENSOR SERIAL_ERROR_START(); SERIAL_ERRORLNPGM(MSG_ERR_NO_THERMISTORS); #endif @@ -8080,7 +8144,7 @@ inline void gcode_M109() { } while (wait_for_heatup && TEMP_CONDITIONS); if (wait_for_heatup) { - lcd_setstatusPGM(wants_to_cool ? PSTR(MSG_COOLING_COMPLETE) : PSTR(MSG_HEATING_COMPLETE)); + lcd_reset_status(); #if ENABLED(PRINTER_EVENT_LEDS) leds.set_white(); #endif @@ -8091,7 +8155,15 @@ inline void gcode_M109() { #endif } -#if HAS_TEMP_BED +#if HAS_HEATED_BED + + /** + * M140: Set bed temperature + */ + inline void gcode_M140() { + if (DEBUGGING(DRYRUN)) return; + if (parser.seenval('S')) thermalManager.setTargetBed(parser.value_celsius()); + } #ifndef MIN_COOLING_SLOPE_DEG_BED #define MIN_COOLING_SLOPE_DEG_BED 1.50 @@ -8217,13 +8289,13 @@ 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 } -#endif // HAS_TEMP_BED +#endif // HAS_HEATED_BED /** * M110: Set Current Line Number @@ -8238,7 +8310,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, @@ -8248,7 +8320,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 @@ -8318,14 +8390,6 @@ inline void gcode_M111() { #endif // BARICUDA -/** - * M140: Set bed temperature - */ -inline void gcode_M140() { - if (DEBUGGING(DRYRUN)) return; - if (parser.seenval('S')) thermalManager.setTargetBed(parser.value_celsius()); -} - #if ENABLED(ULTIPANEL) /** @@ -8766,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. @@ -9327,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(); + } } /** @@ -9904,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() { @@ -9942,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); } @@ -10073,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 */ @@ -10081,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'); @@ -10090,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); } @@ -10099,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 @@ -10541,7 +10628,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 @@ -10614,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 @@ -11978,8 +12065,6 @@ void process_parsed_command() { case 113: gcode_M113(); break; // M113: Set Host Keepalive Interval #endif - case 140: gcode_M140(); break; // M140: Set Bed Temperature - case 105: gcode_M105(); KEEPALIVE_STATE(NOT_BUSY); return; // M105: Report Temperatures (and say "ok") #if ENABLED(AUTO_REPORT_TEMPERATURES) @@ -11988,7 +12073,8 @@ void process_parsed_command() { case 109: gcode_M109(); break; // M109: Set Hotend Temperature. Wait for target. - #if HAS_TEMP_BED + #if HAS_HEATED_BED + case 140: gcode_M140(); break; // M140: Set Bed Temperature case 190: gcode_M190(); break; // M190: Set Bed Temperature. Wait for target. #endif @@ -13601,7 +13687,7 @@ void prepare_move_to_destination() { if (ELAPSED(millis(), next_status_led_update_ms)) { next_status_led_update_ms += 500; // Update every 0.5s float max_temp = 0.0; - #if HAS_TEMP_BED + #if HAS_HEATED_BED max_temp = MAX3(max_temp, thermalManager.degTargetBed(), thermalManager.degBed()); #endif HOTEND_LOOP() @@ -14212,6 +14298,10 @@ void setup() { #endif #endif + #if ENABLED(POWER_LOSS_RECOVERY) + do_print_job_recovery(); + #endif + #if ENABLED(USE_WATCHDOG) watchdog_init(); #endif @@ -14289,8 +14379,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/SanityCheck.h b/Marlin/SanityCheck.h index c4b7a9271021..33c2e1609331 100644 --- a/Marlin/SanityCheck.h +++ b/Marlin/SanityCheck.h @@ -270,6 +270,16 @@ #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 /** @@ -427,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 @@ -1448,14 +1458,18 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE, // clearing the stallGuard activated status is found. #if ENABLED(DELTA) && !ENABLED(STEALTHCHOP) #error "SENSORLESS_HOMING on DELTA currently requires STEALTHCHOP." - #elif X_HOME_DIR == -1 && DISABLED(X_MIN_ENDSTOP_INVERTING) - #error "SENSORLESS_HOMING requires X_MIN_ENDSTOP_INVERTING when homing to X_MIN." - #elif X_HOME_DIR == 1 && DISABLED(X_MAX_ENDSTOP_INVERTING) - #error "SENSORLESS_HOMING requires X_MAX_ENDSTOP_INVERTING when homing to X_MAX." - #elif Y_HOME_DIR == -1 && DISABLED(Y_MIN_ENDSTOP_INVERTING) - #error "SENSORLESS_HOMING requires Y_MIN_ENDSTOP_INVERTING when homing to Y_MIN." - #elif Y_HOME_DIR == 1 && DISABLED(Y_MAX_ENDSTOP_INVERTING) - #error "SENSORLESS_HOMING requires Y_MAX_ENDSTOP_INVERTING when homing to Y_MAX." + #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 @@ -1731,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 9551a6c9cd23..a7aceff081ff 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,8 @@ #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 // @@ -95,7 +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 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 @@ -123,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 @@ -139,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 0b5b8e04433f..581e0ec5af03 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 @@ -959,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 d9c068e4df0d..a7bb1cd46fca 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/dogm_bitmaps.h b/Marlin/dogm_bitmaps.h index c3833bdde72f..78cff28dbd1b 100644 --- a/Marlin/dogm_bitmaps.h +++ b/Marlin/dogm_bitmaps.h @@ -134,7 +134,7 @@ // STATUS_SCREEN_HOTEND_TEXT_X(i) to modify draw locations. #include "_Statusscreen.h" -#elif HAS_TEMP_BED +#elif HAS_HEATED_BED #define STATUS_SCREEN_X ( 8 + (HOTENDS ? 0 : 64)) #define STATUS_SCREENWIDTH (120 - (HOTENDS ? 0 : 64)) @@ -319,7 +319,7 @@ }; #endif // HOTENDS -#else // !HAS_TEMP_BED +#else // !HAS_HEATED_BED #define STATUS_SCREEN_X ( 8 + (HOTENDS ? 0 : 96)) #define STATUS_SCREENWIDTH (120 - (HOTENDS ? 0 : 96)) @@ -505,7 +505,7 @@ #endif // HOTENDS -#endif // !HAS_TEMP_BED +#endif // !HAS_HEATED_BED #if ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY) || ENABLED(MESH_EDIT_GFX_OVERLAY) diff --git a/Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h b/Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h index a9ed733b205a..aad12e7d4dc0 100644 --- a/Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h +++ b/Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h @@ -692,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 @@ -1060,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 bc9ebefe33c4..41671fbe986c 100644 --- a/Marlin/example_configurations/AlephObjects/TAZ4/Configuration_adv.h +++ b/Marlin/example_configurations/AlephObjects/TAZ4/Configuration_adv.h @@ -555,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. * diff --git a/Marlin/example_configurations/AliExpress/CL-260/Configuration.h b/Marlin/example_configurations/AliExpress/CL-260/Configuration.h index 086638ed5dea..70739cf1a10b 100644 --- a/Marlin/example_configurations/AliExpress/CL-260/Configuration.h +++ b/Marlin/example_configurations/AliExpress/CL-260/Configuration.h @@ -672,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 @@ -1040,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 6a68b7b994f5..e926b2d5fae4 100644 --- a/Marlin/example_configurations/Anet/A6/Configuration.h +++ b/Marlin/example_configurations/Anet/A6/Configuration.h @@ -720,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 @@ -1178,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 b014877f2813..cce73e7d3432 100644 --- a/Marlin/example_configurations/Anet/A6/Configuration_adv.h +++ b/Marlin/example_configurations/Anet/A6/Configuration_adv.h @@ -555,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. * diff --git a/Marlin/example_configurations/Anet/A8/Configuration.h b/Marlin/example_configurations/Anet/A8/Configuration.h index e8af90fedac0..493156d6bf73 100644 --- a/Marlin/example_configurations/Anet/A8/Configuration.h +++ b/Marlin/example_configurations/Anet/A8/Configuration.h @@ -679,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 @@ -1058,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 d973e5117671..a354adffdac9 100644 --- a/Marlin/example_configurations/Anet/A8/Configuration_adv.h +++ b/Marlin/example_configurations/Anet/A8/Configuration_adv.h @@ -555,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. * diff --git a/Marlin/example_configurations/BIBO/TouchX/Cyclops/Configuration.h b/Marlin/example_configurations/BIBO/TouchX/Cyclops/Configuration.h index eda1cece3b31..a138ef53149e 100644 --- a/Marlin/example_configurations/BIBO/TouchX/Cyclops/Configuration.h +++ b/Marlin/example_configurations/BIBO/TouchX/Cyclops/Configuration.h @@ -672,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 @@ -1040,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 5d8f2c122b8e..4f2768826216 100644 --- a/Marlin/example_configurations/BIBO/TouchX/Cyclops/Configuration_adv.h +++ b/Marlin/example_configurations/BIBO/TouchX/Cyclops/Configuration_adv.h @@ -555,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. * diff --git a/Marlin/example_configurations/BIBO/TouchX/default/Configuration.h b/Marlin/example_configurations/BIBO/TouchX/default/Configuration.h index 7a6d49624193..8bdc832ff549 100644 --- a/Marlin/example_configurations/BIBO/TouchX/default/Configuration.h +++ b/Marlin/example_configurations/BIBO/TouchX/default/Configuration.h @@ -672,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 @@ -1040,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 f005fe263a82..6fc096c17d8d 100644 --- a/Marlin/example_configurations/BIBO/TouchX/default/Configuration_adv.h +++ b/Marlin/example_configurations/BIBO/TouchX/default/Configuration_adv.h @@ -555,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. * diff --git a/Marlin/example_configurations/BQ/Hephestos/Configuration.h b/Marlin/example_configurations/BQ/Hephestos/Configuration.h index 81c5ae950d92..ba9844c5a8e5 100644 --- a/Marlin/example_configurations/BQ/Hephestos/Configuration.h +++ b/Marlin/example_configurations/BQ/Hephestos/Configuration.h @@ -660,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 @@ -1028,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 b51fd52a19e3..888485096210 100644 --- a/Marlin/example_configurations/BQ/Hephestos/Configuration_adv.h +++ b/Marlin/example_configurations/BQ/Hephestos/Configuration_adv.h @@ -555,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. * diff --git a/Marlin/example_configurations/BQ/Hephestos_2/Configuration.h b/Marlin/example_configurations/BQ/Hephestos_2/Configuration.h index a804263f1288..3ab40ebf81fb 100644 --- a/Marlin/example_configurations/BQ/Hephestos_2/Configuration.h +++ b/Marlin/example_configurations/BQ/Hephestos_2/Configuration.h @@ -673,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 @@ -1052,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 9e07afe258b4..6d6c30a0b358 100644 --- a/Marlin/example_configurations/BQ/Hephestos_2/Configuration_adv.h +++ b/Marlin/example_configurations/BQ/Hephestos_2/Configuration_adv.h @@ -555,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. * diff --git a/Marlin/example_configurations/BQ/WITBOX/Configuration.h b/Marlin/example_configurations/BQ/WITBOX/Configuration.h index 3bef690c0bf2..59aed8021486 100644 --- a/Marlin/example_configurations/BQ/WITBOX/Configuration.h +++ b/Marlin/example_configurations/BQ/WITBOX/Configuration.h @@ -660,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 @@ -1028,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 b51fd52a19e3..888485096210 100644 --- a/Marlin/example_configurations/BQ/WITBOX/Configuration_adv.h +++ b/Marlin/example_configurations/BQ/WITBOX/Configuration_adv.h @@ -555,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. * diff --git a/Marlin/example_configurations/Cartesio/Configuration.h b/Marlin/example_configurations/Cartesio/Configuration.h index 4f843f2ce81b..6cced178b9d4 100644 --- a/Marlin/example_configurations/Cartesio/Configuration.h +++ b/Marlin/example_configurations/Cartesio/Configuration.h @@ -671,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 @@ -1039,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 c743e42c4dfc..691903576584 100644 --- a/Marlin/example_configurations/Cartesio/Configuration_adv.h +++ b/Marlin/example_configurations/Cartesio/Configuration_adv.h @@ -555,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. * diff --git a/Marlin/example_configurations/Creality/CR-10/Configuration.h b/Marlin/example_configurations/Creality/CR-10/Configuration.h index 944af2d6aa97..f92ac558d057 100755 --- a/Marlin/example_configurations/Creality/CR-10/Configuration.h +++ b/Marlin/example_configurations/Creality/CR-10/Configuration.h @@ -682,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 @@ -1050,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 a0290a880efa..4b98513a682c 100755 --- a/Marlin/example_configurations/Creality/CR-10/Configuration_adv.h +++ b/Marlin/example_configurations/Creality/CR-10/Configuration_adv.h @@ -555,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. * diff --git a/Marlin/example_configurations/Creality/CR-10S/Configuration.h b/Marlin/example_configurations/Creality/CR-10S/Configuration.h index 5b58e10342c2..937dad189646 100644 --- a/Marlin/example_configurations/Creality/CR-10S/Configuration.h +++ b/Marlin/example_configurations/Creality/CR-10S/Configuration.h @@ -672,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 @@ -1041,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 978d54c98951..a24d470f605f 100644 --- a/Marlin/example_configurations/Creality/CR-10S/Configuration_adv.h +++ b/Marlin/example_configurations/Creality/CR-10S/Configuration_adv.h @@ -555,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. * diff --git a/Marlin/example_configurations/Creality/CR-10mini/Configuration.h b/Marlin/example_configurations/Creality/CR-10mini/Configuration.h index 16ef96b49e56..5478a8b87e9e 100644 --- a/Marlin/example_configurations/Creality/CR-10mini/Configuration.h +++ b/Marlin/example_configurations/Creality/CR-10mini/Configuration.h @@ -691,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 @@ -1059,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 95663e98b9de..92caf1767089 100644 --- a/Marlin/example_configurations/Creality/CR-10mini/Configuration_adv.h +++ b/Marlin/example_configurations/Creality/CR-10mini/Configuration_adv.h @@ -555,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. * diff --git a/Marlin/example_configurations/Creality/CR-8/Configuration.h b/Marlin/example_configurations/Creality/CR-8/Configuration.h index 0d2dbf3366ae..7685e36fa3fa 100644 --- a/Marlin/example_configurations/Creality/CR-8/Configuration.h +++ b/Marlin/example_configurations/Creality/CR-8/Configuration.h @@ -1049,6 +1049,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-8/Configuration_adv.h b/Marlin/example_configurations/Creality/CR-8/Configuration_adv.h index e2491c4da6a3..e183551f3bf6 100644 --- a/Marlin/example_configurations/Creality/CR-8/Configuration_adv.h +++ b/Marlin/example_configurations/Creality/CR-8/Configuration_adv.h @@ -554,6 +554,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. * diff --git a/Marlin/example_configurations/Creality/Ender-2/Configuration.h b/Marlin/example_configurations/Creality/Ender-2/Configuration.h index 6a3acbaea65b..d0dd4d785b8a 100644 --- a/Marlin/example_configurations/Creality/Ender-2/Configuration.h +++ b/Marlin/example_configurations/Creality/Ender-2/Configuration.h @@ -676,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 @@ -1044,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 516b421f4e78..87e54ed3efe9 100644 --- a/Marlin/example_configurations/Creality/Ender-2/Configuration_adv.h +++ b/Marlin/example_configurations/Creality/Ender-2/Configuration_adv.h @@ -555,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. * diff --git a/Marlin/example_configurations/Creality/Ender-4/Configuration.h b/Marlin/example_configurations/Creality/Ender-4/Configuration.h index 4e6b598bfbec..07de60699089 100644 --- a/Marlin/example_configurations/Creality/Ender-4/Configuration.h +++ b/Marlin/example_configurations/Creality/Ender-4/Configuration.h @@ -682,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 @@ -1050,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 90d7b6874a03..cc6fe60f68ab 100644 --- a/Marlin/example_configurations/Creality/Ender-4/Configuration_adv.h +++ b/Marlin/example_configurations/Creality/Ender-4/Configuration_adv.h @@ -555,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. * diff --git a/Marlin/example_configurations/Felix/Configuration.h b/Marlin/example_configurations/Felix/Configuration.h index a5a080969d39..a0816de20362 100644 --- a/Marlin/example_configurations/Felix/Configuration.h +++ b/Marlin/example_configurations/Felix/Configuration.h @@ -654,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 @@ -1022,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 f23f86b0fe9b..1ee976214899 100644 --- a/Marlin/example_configurations/Felix/Configuration_adv.h +++ b/Marlin/example_configurations/Felix/Configuration_adv.h @@ -555,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. * diff --git a/Marlin/example_configurations/Felix/DUAL/Configuration.h b/Marlin/example_configurations/Felix/DUAL/Configuration.h index 3cdac71fdcec..140a6d074a36 100644 --- a/Marlin/example_configurations/Felix/DUAL/Configuration.h +++ b/Marlin/example_configurations/Felix/DUAL/Configuration.h @@ -654,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 @@ -1022,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 efba48ce30a4..75cae43727e4 100644 --- a/Marlin/example_configurations/FolgerTech/i3-2020/Configuration.h +++ b/Marlin/example_configurations/FolgerTech/i3-2020/Configuration.h @@ -678,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 @@ -1064,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 40f495e6a379..4b73b737ea47 100644 --- a/Marlin/example_configurations/FolgerTech/i3-2020/Configuration_adv.h +++ b/Marlin/example_configurations/FolgerTech/i3-2020/Configuration_adv.h @@ -555,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. * diff --git a/Marlin/example_configurations/Geeetech/GT2560/Configuration.h b/Marlin/example_configurations/Geeetech/GT2560/Configuration.h index 8beeac71ee1f..f497d01bdc3e 100644 --- a/Marlin/example_configurations/Geeetech/GT2560/Configuration.h +++ b/Marlin/example_configurations/Geeetech/GT2560/Configuration.h @@ -687,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 @@ -1055,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 fe9b69cb746f..90bc590ab30f 100644 --- a/Marlin/example_configurations/Geeetech/I3_Pro_X-GT2560/Configuration.h +++ b/Marlin/example_configurations/Geeetech/I3_Pro_X-GT2560/Configuration.h @@ -672,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 @@ -1040,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 a152698e7c6f..419bf4d2547c 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 @@ -688,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 @@ -1056,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 4a4e73df9eeb..10ba539c243f 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 @@ -686,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 @@ -1055,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 40231e9437b1..ea7fd542acbc 100644 --- a/Marlin/example_configurations/Infitary/i3-M508/Configuration.h +++ b/Marlin/example_configurations/Infitary/i3-M508/Configuration.h @@ -676,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 @@ -1044,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 1e219ab70f81..c39369942894 100644 --- a/Marlin/example_configurations/Infitary/i3-M508/Configuration_adv.h +++ b/Marlin/example_configurations/Infitary/i3-M508/Configuration_adv.h @@ -555,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. * diff --git a/Marlin/example_configurations/JGAurora/A5/Configuration.h b/Marlin/example_configurations/JGAurora/A5/Configuration.h index fb885e819ad9..14d3923bbc68 100644 --- a/Marlin/example_configurations/JGAurora/A5/Configuration.h +++ b/Marlin/example_configurations/JGAurora/A5/Configuration.h @@ -684,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 @@ -1051,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 cc881e8b54f8..eb7446c92d88 100644 --- a/Marlin/example_configurations/JGAurora/A5/Configuration_adv.h +++ b/Marlin/example_configurations/JGAurora/A5/Configuration_adv.h @@ -555,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. * diff --git a/Marlin/example_configurations/Malyan/M150/Configuration.h b/Marlin/example_configurations/Malyan/M150/Configuration.h index aa4128ba76fd..f5dbe14fb836 100644 --- a/Marlin/example_configurations/Malyan/M150/Configuration.h +++ b/Marlin/example_configurations/Malyan/M150/Configuration.h @@ -692,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 @@ -1079,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 8fe27f9a85e0..57f3f6993fab 100644 --- a/Marlin/example_configurations/Malyan/M150/Configuration_adv.h +++ b/Marlin/example_configurations/Malyan/M150/Configuration_adv.h @@ -555,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. * diff --git a/Marlin/example_configurations/Micromake/C1/basic/Configuration.h b/Marlin/example_configurations/Micromake/C1/basic/Configuration.h index ca4eac965338..a9c245d4e309 100644 --- a/Marlin/example_configurations/Micromake/C1/basic/Configuration.h +++ b/Marlin/example_configurations/Micromake/C1/basic/Configuration.h @@ -676,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 @@ -1044,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 9936de3838af..c8858dbc16d1 100644 --- a/Marlin/example_configurations/Micromake/C1/enhanced/Configuration.h +++ b/Marlin/example_configurations/Micromake/C1/enhanced/Configuration.h @@ -676,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 @@ -1044,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 79f2736a6aa2..c7ad569b8ead 100644 --- a/Marlin/example_configurations/Micromake/C1/enhanced/Configuration_adv.h +++ b/Marlin/example_configurations/Micromake/C1/enhanced/Configuration_adv.h @@ -555,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. * diff --git a/Marlin/example_configurations/RepRapPro/Huxley/Configuration.h b/Marlin/example_configurations/RepRapPro/Huxley/Configuration.h index 3bc855a2fc1b..2cfb8444917e 100644 --- a/Marlin/example_configurations/RepRapPro/Huxley/Configuration.h +++ b/Marlin/example_configurations/RepRapPro/Huxley/Configuration.h @@ -1089,6 +1089,11 @@ Black rubber belt(MXL), 18 - tooth aluminium pulley : 87.489 step per mm (Huxley // 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/RepRapWorld/Megatronics/Configuration.h b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h index 63df2f1d0189..17ada4f86b53 100644 --- a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h +++ b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h @@ -672,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 @@ -1040,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 7130eb5d4c10..70fb32c493c2 100644 --- a/Marlin/example_configurations/RigidBot/Configuration.h +++ b/Marlin/example_configurations/RigidBot/Configuration.h @@ -670,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 @@ -1038,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 66111058a240..e6a44267bb1e 100644 --- a/Marlin/example_configurations/RigidBot/Configuration_adv.h +++ b/Marlin/example_configurations/RigidBot/Configuration_adv.h @@ -555,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. * diff --git a/Marlin/example_configurations/SCARA/Configuration.h b/Marlin/example_configurations/SCARA/Configuration.h index 761d26a844b7..699aabecfa73 100644 --- a/Marlin/example_configurations/SCARA/Configuration.h +++ b/Marlin/example_configurations/SCARA/Configuration.h @@ -505,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 @@ -684,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 @@ -1052,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 cfe2dcf54f4e..a203253afec1 100644 --- a/Marlin/example_configurations/SCARA/Configuration_adv.h +++ b/Marlin/example_configurations/SCARA/Configuration_adv.h @@ -555,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. * diff --git a/Marlin/example_configurations/Sanguinololu/Configuration.h b/Marlin/example_configurations/Sanguinololu/Configuration.h index da469aa21979..5a3a1a60106c 100644 --- a/Marlin/example_configurations/Sanguinololu/Configuration.h +++ b/Marlin/example_configurations/Sanguinololu/Configuration.h @@ -703,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 @@ -1071,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 2c323847660e..e3d4ccbc5a3f 100644 --- a/Marlin/example_configurations/Sanguinololu/Configuration_adv.h +++ b/Marlin/example_configurations/Sanguinololu/Configuration_adv.h @@ -555,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. * diff --git a/Marlin/example_configurations/TinyBoy2/Configuration.h b/Marlin/example_configurations/TinyBoy2/Configuration.h index 7308bf56c280..0302db901227 100644 --- a/Marlin/example_configurations/TinyBoy2/Configuration.h +++ b/Marlin/example_configurations/TinyBoy2/Configuration.h @@ -723,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 @@ -1096,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 42bb0c4ceef8..62adf41fa16e 100644 --- a/Marlin/example_configurations/TinyBoy2/Configuration_adv.h +++ b/Marlin/example_configurations/TinyBoy2/Configuration_adv.h @@ -555,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. * diff --git a/Marlin/example_configurations/Tronxy/X1/Configuration.h b/Marlin/example_configurations/Tronxy/X1/Configuration.h index 564b3ee03152..befd0e2b680a 100644 --- a/Marlin/example_configurations/Tronxy/X1/Configuration.h +++ b/Marlin/example_configurations/Tronxy/X1/Configuration.h @@ -672,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 @@ -1040,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 bc35bf72cbd7..0f7777ca5b7b 100644 --- a/Marlin/example_configurations/Tronxy/X5S/Configuration.h +++ b/Marlin/example_configurations/Tronxy/X5S/Configuration.h @@ -672,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 @@ -1040,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 7f5ca67dd711..fa7c86d3b072 100644 --- a/Marlin/example_configurations/Tronxy/XY100/Configuration.h +++ b/Marlin/example_configurations/Tronxy/XY100/Configuration.h @@ -683,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 @@ -1051,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 046e8425d803..0ad48766e750 100644 --- a/Marlin/example_configurations/Velleman/K8200/Configuration.h +++ b/Marlin/example_configurations/Velleman/K8200/Configuration.h @@ -701,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 @@ -1070,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 ca2ce10ed008..2cad50b81666 100644 --- a/Marlin/example_configurations/Velleman/K8200/Configuration_adv.h +++ b/Marlin/example_configurations/Velleman/K8200/Configuration_adv.h @@ -568,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. * diff --git a/Marlin/example_configurations/Velleman/K8400/Configuration.h b/Marlin/example_configurations/Velleman/K8400/Configuration.h index edcdc544c6c3..35bdceb7ba51 100644 --- a/Marlin/example_configurations/Velleman/K8400/Configuration.h +++ b/Marlin/example_configurations/Velleman/K8400/Configuration.h @@ -672,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 @@ -1040,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 d7b3a87892bc..da991c774814 100644 --- a/Marlin/example_configurations/Velleman/K8400/Configuration_adv.h +++ b/Marlin/example_configurations/Velleman/K8400/Configuration_adv.h @@ -555,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. * diff --git a/Marlin/example_configurations/Velleman/K8400/Dual-head/Configuration.h b/Marlin/example_configurations/Velleman/K8400/Dual-head/Configuration.h index 1bc383ae1929..f05fdc2ffd86 100644 --- a/Marlin/example_configurations/Velleman/K8400/Dual-head/Configuration.h +++ b/Marlin/example_configurations/Velleman/K8400/Dual-head/Configuration.h @@ -672,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 @@ -1040,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 d806f2369e6d..996ec6b202ca 100644 --- a/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration.h +++ b/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration.h @@ -682,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 @@ -1047,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 36b7e227d0fb..02dc090188aa 100644 --- a/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration_adv.h +++ b/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration_adv.h @@ -557,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. * diff --git a/Marlin/example_configurations/adafruit/ST7565/Configuration.h b/Marlin/example_configurations/adafruit/ST7565/Configuration.h index 2e3463e30a1a..517df712b4b2 100644 --- a/Marlin/example_configurations/adafruit/ST7565/Configuration.h +++ b/Marlin/example_configurations/adafruit/ST7565/Configuration.h @@ -672,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 @@ -1040,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 f21d6c4d47ce..af833e68b4b2 100644 --- a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h +++ b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h @@ -754,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 @@ -1191,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 4428ea59e189..2d2f2fe87fb5 100644 --- a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h +++ b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h @@ -557,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. * diff --git a/Marlin/example_configurations/delta/FLSUN/kossel/Configuration.h b/Marlin/example_configurations/delta/FLSUN/kossel/Configuration.h index 3af9d850149f..7775ccbfbd76 100644 --- a/Marlin/example_configurations/delta/FLSUN/kossel/Configuration.h +++ b/Marlin/example_configurations/delta/FLSUN/kossel/Configuration.h @@ -754,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 @@ -1173,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 60f64aeae7bc..0371e86d49ab 100644 --- a/Marlin/example_configurations/delta/FLSUN/kossel/Configuration_adv.h +++ b/Marlin/example_configurations/delta/FLSUN/kossel/Configuration_adv.h @@ -557,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. * diff --git a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h index e7204273930e..2c8161af83ca 100644 --- a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h @@ -754,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 @@ -1172,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 902ceced8517..58867486dc76 100644 --- a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h +++ b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h @@ -557,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. * diff --git a/Marlin/example_configurations/delta/Hatchbox_Alpha/Configuration.h b/Marlin/example_configurations/delta/Hatchbox_Alpha/Configuration.h index 2f3d75748616..17d2551298dd 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 @@ -759,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 @@ -1186,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 69f2284f721b..b4d8bc79b8c2 100644 --- a/Marlin/example_configurations/delta/generic/Configuration.h +++ b/Marlin/example_configurations/delta/generic/Configuration.h @@ -744,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 @@ -1160,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 902ceced8517..58867486dc76 100644 --- a/Marlin/example_configurations/delta/generic/Configuration_adv.h +++ b/Marlin/example_configurations/delta/generic/Configuration_adv.h @@ -557,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. * diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/kossel_mini/Configuration.h index fae532d30ed3..f8274283ed10 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration.h @@ -744,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 @@ -1163,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 902ceced8517..58867486dc76 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h @@ -557,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. * diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration.h b/Marlin/example_configurations/delta/kossel_pro/Configuration.h index a8172a4d7e0f..bfa1eb558a41 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration.h @@ -729,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 @@ -1154,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 0a75a29b4987..a3bc22677f26 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h @@ -562,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. * diff --git a/Marlin/example_configurations/delta/kossel_xl/Configuration.h b/Marlin/example_configurations/delta/kossel_xl/Configuration.h index 8a96e78d8069..d37868e373b6 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration.h @@ -747,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 @@ -1163,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 d3aae3cca5d8..01fd89753d16 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h @@ -557,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. * diff --git a/Marlin/example_configurations/gCreate/gMax1.5+/Configuration.h b/Marlin/example_configurations/gCreate/gMax1.5+/Configuration.h index 1459d466236b..0b9542cb2a31 100644 --- a/Marlin/example_configurations/gCreate/gMax1.5+/Configuration.h +++ b/Marlin/example_configurations/gCreate/gMax1.5+/Configuration.h @@ -685,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 @@ -1061,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 a70137c46fbd..03f40bb29327 100644 --- a/Marlin/example_configurations/gCreate/gMax1.5+/Configuration_adv.h +++ b/Marlin/example_configurations/gCreate/gMax1.5+/Configuration_adv.h @@ -555,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. * diff --git a/Marlin/example_configurations/makibox/Configuration.h b/Marlin/example_configurations/makibox/Configuration.h index e08650ce661a..5ce9ad5746e2 100644 --- a/Marlin/example_configurations/makibox/Configuration.h +++ b/Marlin/example_configurations/makibox/Configuration.h @@ -675,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 @@ -1043,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 555fc0f55c3d..04de024b5ef6 100644 --- a/Marlin/example_configurations/makibox/Configuration_adv.h +++ b/Marlin/example_configurations/makibox/Configuration_adv.h @@ -555,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. * diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration.h b/Marlin/example_configurations/tvrrug/Round2/Configuration.h index 4b8fdad2626e..74f3ab7c8f95 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration.h @@ -667,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 @@ -1035,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 fb5cf13f887e..28baaaa1e269 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h @@ -555,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. * diff --git a/Marlin/example_configurations/wt150/Configuration.h b/Marlin/example_configurations/wt150/Configuration.h index 45591dd8e28e..9fd1916e7e16 100644 --- a/Marlin/example_configurations/wt150/Configuration.h +++ b/Marlin/example_configurations/wt150/Configuration.h @@ -677,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 @@ -1045,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 97f2186ef75b..5acc34536c52 100644 --- a/Marlin/example_configurations/wt150/Configuration_adv.h +++ b/Marlin/example_configurations/wt150/Configuration_adv.h @@ -556,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. * diff --git a/Marlin/fastio.h b/Marlin/fastio.h index c7e1a20bc610..4b6ec4e495f0 100644 --- a/Marlin/fastio.h +++ b/Marlin/fastio.h @@ -21,17 +21,16 @@ */ /** - * 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 @@ -68,49 +67,43 @@ typedef int8_t pin_t; * Why double up on these macros? see http://gcc.gnu.org/onlinedocs/cpp/Stringification.html */ -#define _READ(IO) ((bool)(DIO ## IO ## _RPORT & _BV(DIO ## IO ## _PIN))) - -// On some boards pins > 0x100 are used. These are not converted to atomic actions. A critical section is needed. +#define _READ(IO) TEST(DIO ## IO ## _RPORT, DIO ## IO ## _PIN) -#define _WRITE_NC(IO, v) do { if (v) {DIO ## IO ## _WPORT |= _BV(DIO ## IO ## _PIN); } else {DIO ## IO ## _WPORT &= ~_BV(DIO ## IO ## _PIN); }; } while (0) +#define _WRITE_NC(IO,V) do{ \ + if (V) SBI(DIO ## IO ## _WPORT, DIO ## IO ## _PIN); \ + else CBI(DIO ## IO ## _WPORT, DIO ## IO ## _PIN); \ +}while(0) -#define _WRITE_C(IO, v) do { if (v) { \ - CRITICAL_SECTION_START; \ - {DIO ## IO ## _WPORT |= _BV(DIO ## IO ## _PIN); } \ - CRITICAL_SECTION_END; \ - } \ - else { \ - CRITICAL_SECTION_START; \ - {DIO ## IO ## _WPORT &= ~_BV(DIO ## IO ## _PIN); } \ - CRITICAL_SECTION_END; \ - } \ - } \ - while (0) +#define _WRITE_C(IO,V) do{ \ + uint8_t port_bits = DIO ## IO ## _WPORT; /* Get a mask from the current port bits */ \ + if (V) port_bits = ~port_bits; /* For setting bits, invert the mask */ \ + DIO ## IO ## _RPORT = port_bits & _BV(DIO ## IO ## _PIN); /* Atomically toggle the output port bits */ \ +}while(0) -#define _WRITE(IO, v) do { if (&(DIO ## IO ## _RPORT) >= (uint8_t *)0x100) {_WRITE_C(IO, v); } else {_WRITE_NC(IO, v); }; } while (0) +#define _WRITE(IO,V) do{ if (&(DIO ## IO ## _RPORT) < (uint8_t*)0x100) _WRITE_NC(IO,V); else _WRITE_C(IO,V); }while(0) -#define _TOGGLE(IO) do {DIO ## IO ## _RPORT ^= _BV(DIO ## IO ## _PIN); } while (0) +#define _TOGGLE(IO) (DIO ## IO ## _RPORT = _BV(DIO ## IO ## _PIN)) -#define _SET_INPUT(IO) do {DIO ## IO ## _DDR &= ~_BV(DIO ## IO ## _PIN); } while (0) -#define _SET_OUTPUT(IO) do {DIO ## IO ## _DDR |= _BV(DIO ## IO ## _PIN); } while (0) +#define _SET_INPUT(IO) CBI(DIO ## IO ## _DDR, DIO ## IO ## _PIN) +#define _SET_OUTPUT(IO) SBI(DIO ## IO ## _DDR, DIO ## IO ## _PIN) -#define _GET_INPUT(IO) ((DIO ## IO ## _DDR & _BV(DIO ## IO ## _PIN)) == 0) -#define _GET_OUTPUT(IO) ((DIO ## IO ## _DDR & _BV(DIO ## IO ## _PIN)) != 0) -#define _GET_TIMER(IO) (DIO ## IO ## _PWM) +#define _GET_INPUT(IO) !TEST(DIO ## IO ## _DDR, DIO ## IO ## _PIN) +#define _GET_OUTPUT(IO) TEST(DIO ## IO ## _DDR, DIO ## IO ## _PIN) +#define _GET_TIMER(IO) DIO ## IO ## _PWM -#define READ(IO) _READ(IO) -#define WRITE(IO,V) _WRITE(IO,V) -#define TOGGLE(IO) _TOGGLE(IO) +#define READ(IO) _READ(IO) +#define WRITE(IO,V) _WRITE(IO,V) +#define TOGGLE(IO) _TOGGLE(IO) -#define SET_INPUT(IO) _SET_INPUT(IO) -#define SET_INPUT_PULLUP(IO) do{ _SET_INPUT(IO); _WRITE(IO, HIGH); }while(0) -#define SET_OUTPUT(IO) _SET_OUTPUT(IO) +#define SET_INPUT(IO) _SET_INPUT(IO) +#define SET_INPUT_PULLUP(IO) do{ _SET_INPUT(IO); _WRITE(IO, HIGH); }while(0) +#define SET_OUTPUT(IO) _SET_OUTPUT(IO) -#define GET_INPUT(IO) _GET_INPUT(IO) -#define GET_OUTPUT(IO) _GET_OUTPUT(IO) -#define GET_TIMER(IO) _GET_TIMER(IO) +#define GET_INPUT(IO) _GET_INPUT(IO) +#define GET_OUTPUT(IO) _GET_OUTPUT(IO) +#define GET_TIMER(IO) _GET_TIMER(IO) -#define OUT_WRITE(IO, v) do{ SET_OUTPUT(IO); WRITE(IO, v); }while(0) +#define OUT_WRITE(IO,V) do{ SET_OUTPUT(IO); WRITE(IO,V); }while(0) /** * Timer and Interrupt Control @@ -169,6 +162,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 +177,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 +185,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 +210,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 +219,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) @@ -251,7 +251,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 +269,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 +301,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 +317,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 6700c3fe8d97..a913c364c376 100644 --- a/Marlin/fwretract.cpp +++ b/Marlin/fwretract.cpp @@ -123,6 +123,7 @@ void FWRetract::retract(const bool retracting #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); //*/ @@ -139,7 +140,7 @@ 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 @@ -149,7 +150,7 @@ void FWRetract::retract(const bool retracting 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 + 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(); } @@ -160,17 +161,17 @@ void FWRetract::retract(const bool retracting 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 Z and update current_position + 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 @@ -195,6 +196,7 @@ void FWRetract::retract(const bool retracting #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 d34ed5ac67ca..fe766d1211de 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.") @@ -189,9 +188,7 @@ #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 5c25f3ea03b2..8edeed405f84 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 b13c79140815..7aa5f0029836 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.") @@ -192,9 +191,7 @@ #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 40c330d1a557..96c6f666d5f0 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 f99e82ac0a2b..95f3cdfba05a 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. ") @@ -304,9 +303,7 @@ #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 51eb2d14c3ec..49ea9bd17e28 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. ") @@ -307,9 +306,7 @@ #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 8d443e161ae0..1bd2b02df6c7 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. ") @@ -190,9 +189,7 @@ #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 8660bf969967..e2d11f6fc9c3 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") @@ -220,9 +219,7 @@ #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 ad2895cfdb12..89ac76eb0346 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 5211fbe576cb..8cfda5a171de 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 cc47320b2d81..3654e704fcbe 100644 --- a/Marlin/language_en.h +++ b/Marlin/language_en.h @@ -681,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") @@ -831,23 +831,14 @@ #ifndef MSG_HEATING #define MSG_HEATING _UxGT("Heating...") #endif -#ifndef MSG_HEATING_COMPLETE - #define MSG_HEATING_COMPLETE _UxGT("Heating done.") -#endif #ifndef MSG_COOLING #define MSG_COOLING _UxGT("Cooling...") #endif -#ifndef MSG_COOLING_COMPLETE - #define MSG_COOLING_COMPLETE _UxGT("Cooling done.") -#endif #ifndef MSG_BED_HEATING - #define MSG_BED_HEATING _UxGT("Bed heating.") + #define MSG_BED_HEATING _UxGT("Bed heating...") #endif #ifndef MSG_BED_COOLING - #define MSG_BED_COOLING _UxGT("Bed cooling.") -#endif -#ifndef MSG_BED_DONE - #define MSG_BED_DONE _UxGT("Bed done.") + #define MSG_BED_COOLING _UxGT("Bed cooling...") #endif #ifndef MSG_DELTA_CALIBRATE #define MSG_DELTA_CALIBRATE _UxGT("Delta Calibration") diff --git a/Marlin/language_es.h b/Marlin/language_es.h index bec1394b6648..cbff5ee08eef 100644 --- a/Marlin/language_es.h +++ b/Marlin/language_es.h @@ -166,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") @@ -206,9 +205,7 @@ #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 c47f96217b7e..57ac43b82ff1 100644 --- a/Marlin/language_es_utf8.h +++ b/Marlin/language_es_utf8.h @@ -156,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") @@ -196,9 +195,7 @@ #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 bfe489309df2..d6e51bc250c9 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. ") @@ -297,9 +296,7 @@ #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 aa5013f94949..70ef4cf90a44 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 884c65cd3555..5da908416941 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.") @@ -302,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 3b53e9077b65..a54fb76c2323 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.") @@ -303,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 87ae72e7d8fa..b97a414417cb 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") @@ -189,9 +188,7 @@ #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 7395718beba3..3b8fdd7433ee 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. ") @@ -188,9 +187,7 @@ #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 9f1874c1be65..1439d3e5c6dc 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. ") @@ -301,12 +300,9 @@ #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_COOLING _UxGT("Raffreddamento..") -#define MSG_COOLING_COMPLETE _UxGT("Raff.completato.") #define MSG_BED_HEATING _UxGT("Risc. piatto...") #define MSG_BED_COOLING _UxGT("Raffr. piatto...") -#define MSG_BED_DONE _UxGT("Piatto pronto") #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 76a88be533e9..4989ebf1bcde 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 eaa970a2896e..f33432532fe0 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 42f32baac459..0a2726294dc1 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. ") @@ -196,9 +195,7 @@ #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 b8ce0338ebbb..8210fe51f211 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. ") @@ -185,9 +184,7 @@ #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 6e2a69edf0dd..6968fc8a3785 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. ") @@ -186,9 +185,7 @@ #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 1a93d32a8d71..8793202517eb 100644 --- a/Marlin/language_pt-br.h +++ b/Marlin/language_pt-br.h @@ -256,7 +256,6 @@ #define MSG_NO_CARD _UxGT("Sem cartao SD") #define MSG_DWELL _UxGT("ZzZzZz...") #define MSG_USERWAIT _UxGT("Clique para retomar") -#define MSG_RESUMING _UxGT("Resumindo Impressao") #define MSG_PRINT_ABORTED _UxGT("Impressao Abortada") #define MSG_NO_MOVE _UxGT("Sem movimento") #define MSG_KILLED _UxGT("PARADA DE EMERGENCIA") @@ -295,9 +294,7 @@ #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_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") diff --git a/Marlin/language_pt-br_utf8.h b/Marlin/language_pt-br_utf8.h index e4d8ee45c44f..2e481e48101a 100644 --- a/Marlin/language_pt-br_utf8.h +++ b/Marlin/language_pt-br_utf8.h @@ -258,7 +258,6 @@ #define MSG_NO_CARD _UxGT("Sem cartão SD") #define MSG_DWELL _UxGT("ZzZzZz...") #define MSG_USERWAIT _UxGT("Clique para retomar") -#define MSG_RESUMING _UxGT("Resumindo Impressão") #define MSG_PRINT_ABORTED _UxGT("Impressão Abortada") #define MSG_NO_MOVE _UxGT("Sem movimento") #define MSG_KILLED _UxGT("PARADA DE EMERGÊNCIA") @@ -297,9 +296,7 @@ #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") diff --git a/Marlin/language_pt.h b/Marlin/language_pt.h index b14a290d14fa..c314cc80da9e 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 5933bcba77ae..df402884fad5 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 cdb0380f5bea..b7235ebb1d6a 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("УБИТО. ") @@ -302,12 +303,9 @@ #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_COOLING _UxGT("Охлаждение...") -#define MSG_COOLING_COMPLETE _UxGT("Охлаждение выполнено") -#define MSG_BED_HEATING _UxGT("Нагрев стола") -#define MSG_BED_COOLING _UxGT("Охлаждение стола") -#define MSG_BED_DONE _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") @@ -316,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 e8c3f8c5edba..a7ce610c5604 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É. ") @@ -308,12 +307,9 @@ #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_COOLING _UxGT("Ochladzovanie...") -#define MSG_COOLING_COMPLETE _UxGT("Ochladzovanie prebehlo.") -#define MSG_BED_HEATING _UxGT("Ohrev podl.") -#define MSG_BED_COOLING _UxGT("Ochladzovanie podl.") -#define MSG_BED_DONE _UxGT("Podložka hotová.") +#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 c0a01aaeee53..9df9f323967b 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. @@ -201,9 +200,7 @@ #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 ea316187fa76..3e3227d867e2 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("ПЕРЕРВАНО. ") @@ -176,9 +175,7 @@ #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 432bd75c0824..c62bbc77b2ab 100644 --- a/Marlin/language_zh_CN.h +++ b/Marlin/language_zh_CN.h @@ -249,7 +249,6 @@ #define MSG_DWELL _UxGT("休眠中 ...") //"Sleep..." #define MSG_USERWAIT _UxGT("点击继续 ...") //"Click to resume..." #define MSG_PRINT_PAUSED _UxGT("暫停打印") // "Print paused" -#define MSG_RESUMING _UxGT("恢复打印中") //"Resuming print" #define MSG_PRINT_ABORTED _UxGT("已取消打印") //"Print aborted" #define MSG_NO_MOVE _UxGT("无移动") //"No move." #define MSG_KILLED _UxGT("已杀掉") //"KILLED. " @@ -297,9 +296,7 @@ #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" diff --git a/Marlin/language_zh_TW.h b/Marlin/language_zh_TW.h index 39af29450e42..4eb420f42351 100644 --- a/Marlin/language_zh_TW.h +++ b/Marlin/language_zh_TW.h @@ -249,7 +249,6 @@ #define MSG_DWELL _UxGT("休眠 ...") //"Sleep..." #define MSG_USERWAIT _UxGT("點擊繼續 ...") //"Click to resume..." #define MSG_PRINT_PAUSED _UxGT("列印已暫停") // "Print paused" -#define MSG_RESUMING _UxGT("恢復列印中") //"Resuming print" #define MSG_PRINT_ABORTED _UxGT("已取消列印") //"Print aborted" #define MSG_NO_MOVE _UxGT("無移動") //"No move." #define MSG_KILLED _UxGT("已砍掉") //"KILLED. " @@ -297,9 +296,7 @@ #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" diff --git a/Marlin/macros.h b/Marlin/macros.h index 75f32e852ceb..b09812ad2e42 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 29177deefbd2..894b8ae64264 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/pins.h b/Marlin/pins.h index ede431b55a6e..9cad2557afe2 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 @@ -175,8 +181,6 @@ #include "pins_GT2560_REV_A.h" // ATmega1280, ATmega2560 #elif MB(GT2560_REV_A_PLUS) #include "pins_GT2560_REV_A_PLUS.h" // ATmega1280, ATmega2560 -#elif MB(RAMPS_ENDER_4) - #include "pins_RAMPS_ENDER_4.h" // ATmega2560 // // ATmega1281, ATmega2561 @@ -203,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) diff --git a/Marlin/pins_MKS_BASE_15.h b/Marlin/pins_MKS_BASE_15.h new file mode 100644 index 000000000000..e9f7050a1b43 --- /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 4145327fc7d3..84f7280dfa91 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 07aa6581167f..70228e2f1f81 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_SANGUINOLOLU_11.h b/Marlin/pins_SANGUINOLOLU_11.h index b7f3e0d13765..c27eab1c8afe 100644 --- a/Marlin/pins_SANGUINOLOLU_11.h +++ b/Marlin/pins_SANGUINOLOLU_11.h @@ -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 // @@ -187,7 +187,7 @@ #define DOGLCD_CS 17 #define LCD_BACKLIGHT_PIN 28 // PA3 - #elif MB(CREALITY_ENDER) + #elif ENABLED(IS_MELZI) #define BEEPER_PIN 27 #define DOGLCD_CS 28 diff --git a/Marlin/pins_TRIGORILLA_13.h b/Marlin/pins_TRIGORILLA_13.h new file mode 100644 index 000000000000..e876da4671a9 --- /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 527c166c58fa..3903e1dba5d8 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_ZRIB_V20.h b/Marlin/pins_ZRIB_V20.h index 1437c71840c4..94a083dd4021 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 93dbb18f9276..6e2ecb04e523 100644 --- a/Marlin/planner.cpp +++ b/Marlin/planner.cpp @@ -1436,7 +1436,7 @@ void Planner::_buffer_steps(const int32_t (&target)[XYZE] const float v_allowable = max_allowable_speed(-block->acceleration, MINIMUM_PLANNER_SPEED, block->millimeters); // If stepper ISR is disabled, this indicates buffer_segment wants to add a split block. // In this case start with the max. allowed speed to avoid an interrupted first move. - block->entry_speed = TEST(TIMSK1, OCIE1A) ? MINIMUM_PLANNER_SPEED : min(vmax_junction, v_allowable); + block->entry_speed = STEPPER_ISR_ENABLED() ? MINIMUM_PLANNER_SPEED : min(vmax_junction, v_allowable); // Initialize planner efficiency flags // Set flag if block will always reach maximum junction speed regardless of entry/exit speeds. diff --git a/Marlin/power.cpp b/Marlin/power.cpp index 6eac58db2690..dbe2ff1dc247 100644 --- a/Marlin/power.cpp +++ b/Marlin/power.cpp @@ -86,16 +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 + #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 000000000000..5b5948b924ce --- /dev/null +++ b/Marlin/power_loss_recovery.cpp @@ -0,0 +1,241 @@ +/** + * 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 + #if HAS_HEATED_BED + SERIAL_PROTOCOLLNPAIR("target_temperature_bed: ", job_recovery_info.target_temperature_bed); + #endif + 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); + #if HAS_HEATED_BED + job_recovery_info.target_temperature_bed = thermalManager.target_temperature_bed; + #endif + 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 000000000000..f693b5f9ba0b --- /dev/null +++ b/Marlin/power_loss_recovery.h @@ -0,0 +1,89 @@ +/** + * 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], + fanSpeeds[FAN_COUNT]; + + #if HAS_HEATED_BED + int16_t target_temperature_bed; + #endif + + #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/status_screen_DOGM.h b/Marlin/status_screen_DOGM.h index d4856fb8edad..98431feda874 100644 --- a/Marlin/status_screen_DOGM.h +++ b/Marlin/status_screen_DOGM.h @@ -45,7 +45,7 @@ FORCE_INLINE void _draw_heater_status(const uint8_t x, const int8_t heater, cons UNUSED(blink); #endif - #if HAS_TEMP_BED + #if HAS_HEATED_BED const bool isBed = heater < 0; #else constexpr bool isBed = false; @@ -53,32 +53,48 @@ FORCE_INLINE void _draw_heater_status(const uint8_t x, const int8_t heater, cons if (PAGE_UNDER(7)) { #if HEATER_IDLE_HANDLER - const bool is_idle = (!isBed ? thermalManager.is_heater_idle(heater) : - #if HAS_TEMP_BED - thermalManager.is_bed_idle() - #else - false + const bool is_idle = ( + #if HAS_HEATED_BED + isBed ? thermalManager.is_bed_idle() : #endif + thermalManager.is_heater_idle(heater) ); if (blink || !is_idle) #endif - _draw_centered_temp((isBed ? thermalManager.degTargetBed() : thermalManager.degTargetHotend(heater)) + 0.5, x, 7); } + _draw_centered_temp(0.5 + ( + #if HAS_HEATED_BED + isBed ? thermalManager.degTargetBed() : + #endif + thermalManager.degTargetHotend(heater) + ), x, 7 + ); + } if (PAGE_CONTAINS(21, 28)) - _draw_centered_temp((isBed ? thermalManager.degBed() : thermalManager.degHotend(heater)) + 0.5, x, 28); + _draw_centered_temp(0.5 + ( + #if HAS_HEATED_BED + isBed ? thermalManager.degBed() : + #endif + thermalManager.degHotend(heater) + ), x, 28 + ); if (PAGE_CONTAINS(17, 20)) { const uint8_t h = isBed ? 7 : HEAT_INDICATOR_X, y = isBed ? 18 : 17; - if (isBed ? thermalManager.isHeatingBed() : thermalManager.isHeatingHotend(heater)) { + if ( + #if HAS_HEATED_BED + isBed ? thermalManager.isHeatingBed() : + #endif + thermalManager.isHeatingHotend(heater) + ) { u8g.setColorIndex(0); // white on black u8g.drawBox(x + h, y, 2, 2); u8g.setColorIndex(1); // black on white } - else { + else u8g.drawBox(x + h, y, 2, 2); - } } } @@ -199,7 +215,7 @@ static void lcd_implementation_status_screen() { HOTEND_LOOP() _draw_heater_status(STATUS_SCREEN_HOTEND_TEXT_X(e), e, blink); // Heated bed - #if HOTENDS < 4 && HAS_TEMP_BED + #if HOTENDS < 4 && HAS_HEATED_BED _draw_heater_status(STATUS_SCREEN_BED_TEXT_X, -1, blink); #endif diff --git a/Marlin/status_screen_lite_ST7920.h b/Marlin/status_screen_lite_ST7920.h index 428a436bf57d..987aba4f76d9 100644 --- a/Marlin/status_screen_lite_ST7920.h +++ b/Marlin/status_screen_lite_ST7920.h @@ -525,12 +525,12 @@ void ST7920_Lite_Status_Screen::draw_heat_icon(const bool whichIcon, const bool static struct { bool E1_show_target : 1; bool E2_show_target : 1; - #if HAS_HEATER_BED + #if HAS_HEATED_BED bool bed_show_target : 1; #endif } display_state = { true, true - #if HAS_HEATER_BED + #if HAS_HEATED_BED , true #endif }; @@ -569,7 +569,7 @@ void ST7920_Lite_Status_Screen::draw_extruder_2_temp(const int16_t temp, const i display_state.E2_show_target = show_target; } -#if HAS_HEATER_BED +#if HAS_HEATED_BED void ST7920_Lite_Status_Screen::draw_bed_temp(const int16_t temp, const int16_t target, bool forceUpdate) { const bool show_target = target && FAR(temp, target); draw_temps(2 @@ -680,7 +680,7 @@ bool ST7920_Lite_Status_Screen::indicators_changed() { #if EXTRUDERS == 2 const int16_t extruder_2_target = thermalManager.degTargetHotend(1); #endif - #if HAS_HEATER_BED + #if HAS_HEATED_BED const int16_t bed_target = thermalManager.degTargetBed(); #endif static uint16_t last_checksum = 0; @@ -688,7 +688,7 @@ bool ST7920_Lite_Status_Screen::indicators_changed() { #if EXTRUDERS == 2 ^ extruder_2_target #endif - #if HAS_HEATER_BED + #if HAS_HEATED_BED ^ bed_target #endif ; @@ -709,7 +709,7 @@ void ST7920_Lite_Status_Screen::update_indicators(const bool forceUpdate) { const int16_t extruder_2_temp = thermalManager.degHotend(1), extruder_2_target = thermalManager.degTargetHotend(1); #endif - #if HAS_HEATER_BED + #if HAS_HEATED_BED const int16_t bed_temp = thermalManager.degBed(), bed_target = thermalManager.degTargetBed(); #endif @@ -718,7 +718,7 @@ void ST7920_Lite_Status_Screen::update_indicators(const bool forceUpdate) { #if EXTRUDERS == 2 draw_extruder_2_temp(extruder_2_temp, extruder_2_target, forceUpdate); #endif - #if HAS_HEATER_BED + #if HAS_HEATED_BED draw_bed_temp(bed_temp, bed_target, forceUpdate); #endif draw_fan_speed(fan_speed); @@ -727,7 +727,7 @@ void ST7920_Lite_Status_Screen::update_indicators(const bool forceUpdate) { // Update the fan and bed animations if (fan_speed > 0) draw_fan_icon(blink); - #if HAS_HEATER_BED + #if HAS_HEATED_BED if (bed_target > 0) draw_heat_icon(blink, true); else diff --git a/Marlin/stepper.cpp b/Marlin/stepper.cpp index 809cc54a9d84..92ad80700e59 100644 --- a/Marlin/stepper.cpp +++ b/Marlin/stepper.cpp @@ -360,14 +360,33 @@ void Stepper::set_directions() { * 4000 500 Hz - init rate */ ISR(TIMER1_COMPA_vect) { + /** + * On AVR there is no hardware prioritization and preemption of + * interrupts, so this emulates it. The UART has first priority + * (otherwise, characters will be lost due to UART overflow). + * Then: Stepper, Endstops, Temperature, and -finally- all others. + * + * This ISR needs to run with as little preemption as possible, so + * the Temperature ISR is disabled here. Now only the UART, Endstops, + * and Arduino-defined interrupts can preempt. + */ + const bool temp_isr_was_enabled = TEMPERATURE_ISR_ENABLED(); + DISABLE_TEMPERATURE_INTERRUPT(); + DISABLE_STEPPER_DRIVER_INTERRUPT(); + sei(); + #if ENABLED(LIN_ADVANCE) Stepper::advance_isr_scheduler(); #else Stepper::isr(); #endif -} -#define _ENABLE_ISRs() do { cli(); if (thermalManager.in_temp_isr) CBI(TIMSK0, OCIE0B); else SBI(TIMSK0, OCIE0B); ENABLE_STEPPER_DRIVER_INTERRUPT(); } while(0) + // Disable global interrupts and reenable this ISR + cli(); + ENABLE_STEPPER_DRIVER_INTERRUPT(); + // Reenable the temperature ISR (if it was enabled) + if (temp_isr_was_enabled) ENABLE_TEMPERATURE_INTERRUPT(); +} void Stepper::isr() { @@ -376,13 +395,6 @@ void Stepper::isr() { #define ENDSTOP_NOMINAL_OCR_VAL 3000 // Check endstops every 1.5ms to guarantee two stepper ISRs within 5ms for BLTouch #define OCR_VAL_TOLERANCE 1000 // First max delay is 2.0ms, last min delay is 0.5ms, all others 1.5ms - #if DISABLED(LIN_ADVANCE) - // Disable Timer0 ISRs and enable global ISR again to capture UART events (incoming chars) - CBI(TIMSK0, OCIE0B); // Temperature ISR - DISABLE_STEPPER_DRIVER_INTERRUPT(); - sei(); - #endif - #define _SPLIT(L) (ocr_val = (uint16_t)L) #if ENABLED(ENDSTOP_INTERRUPTS_FEATURE) @@ -409,7 +421,6 @@ void Stepper::isr() { step_remaining -= ocr_val; _NEXT_ISR(ocr_val); NOLESS(OCR1A, TCNT1 + 16); - _ENABLE_ISRs(); // re-enable ISRs return; } @@ -433,7 +444,6 @@ void Stepper::isr() { } current_block = NULL; // Prep to get a new block after cleaning _NEXT_ISR(200); // Run at max speed - 10 KHz - _ENABLE_ISRs(); return; } @@ -462,14 +472,12 @@ void Stepper::isr() { if (current_block->steps[Z_AXIS] > 0) { enable_Z(); _NEXT_ISR(2000); // Run at slow speed - 1 KHz - _ENABLE_ISRs(); // re-enable ISRs return; } #endif } else { _NEXT_ISR(2000); // Run at slow speed - 1 KHz - _ENABLE_ISRs(); // re-enable ISRs return; } } @@ -773,9 +781,6 @@ void Stepper::isr() { current_block = NULL; planner.discard_current_block(); } - #if DISABLED(LIN_ADVANCE) - _ENABLE_ISRs(); // re-enable ISRs - #endif } #if ENABLED(LIN_ADVANCE) @@ -897,11 +902,6 @@ void Stepper::isr() { } void Stepper::advance_isr_scheduler() { - // Disable Timer0 ISRs and enable global ISR again to capture UART events (incoming chars) - CBI(TIMSK0, OCIE0B); // Temperature ISR - DISABLE_STEPPER_DRIVER_INTERRUPT(); - sei(); - // Run main stepping ISR if flagged if (!nextMainISR) isr(); @@ -929,9 +929,6 @@ void Stepper::isr() { // Don't run the ISR faster than possible NOLESS(OCR1A, TCNT1 + 16); - - // Restore original ISR settings - _ENABLE_ISRs(); } #endif // LIN_ADVANCE diff --git a/Marlin/stepper.h b/Marlin/stepper.h index a0bb0302343c..f0b95ac06cbe 100644 --- a/Marlin/stepper.h +++ b/Marlin/stepper.h @@ -54,6 +54,7 @@ extern Stepper stepper; #define ENABLE_STEPPER_DRIVER_INTERRUPT() SBI(TIMSK1, OCIE1A) #define DISABLE_STEPPER_DRIVER_INTERRUPT() CBI(TIMSK1, OCIE1A) +#define STEPPER_ISR_ENABLED() TEST(TIMSK1, OCIE1A) // intRes = intIn1 * intIn2 >> 16 // uses: diff --git a/Marlin/stopwatch.cpp b/Marlin/stopwatch.cpp index e918265cd551..e5bc01590422 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 f5ac78bfae38..f5e04bbde8df 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 8db4a1209f7e..e1e845164e3b 100644 --- a/Marlin/temperature.cpp +++ b/Marlin/temperature.cpp @@ -62,7 +62,7 @@ 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 +#if HAS_HEATED_BED #define TEMP_ERR_PSTR(MSG, E) \ (E) == -1 ? PSTR(MSG ## _BED) : \ (HOTENDS > 1 && (E) == 1) ? PSTR(MSG_E2 " " MSG) : \ @@ -81,21 +81,51 @@ Temperature thermalManager; // public: -float Temperature::current_temperature[HOTENDS] = { 0.0 }, - Temperature::current_temperature_chamber = 0.0, - Temperature::current_temperature_bed = 0.0; - +float Temperature::current_temperature[HOTENDS] = { 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; + Temperature::target_temperature[HOTENDS] = { 0 }; #if ENABLED(AUTO_POWER_E_FANS) int16_t Temperature::autofan_speed[HOTENDS] = { 0 }; #endif -#if HAS_HEATER_BED - int16_t Temperature::target_temperature_bed = 0; +#if HAS_HEATED_BED + float Temperature::current_temperature_bed = 0.0; + int16_t Temperature::current_temperature_bed_raw = 0, + Temperature::target_temperature_bed = 0; + uint8_t Temperature::soft_pwm_amount_bed; + #ifdef BED_MINTEMP + int16_t Temperature::bed_minttemp_raw = HEATER_BED_RAW_LO_TEMP; + #endif + #ifdef BED_MAXTEMP + int16_t Temperature::bed_maxttemp_raw = HEATER_BED_RAW_HI_TEMP; + #endif + #if WATCH_THE_BED + uint16_t Temperature::watch_target_bed_temp = 0; + millis_t Temperature::watch_bed_next_ms = 0; + #endif + #if ENABLED(PIDTEMPBED) + float Temperature::bedKp, Temperature::bedKi, Temperature::bedKd, // Initialized by settings.load() + Temperature::temp_iState_bed = { 0 }, + Temperature::temp_dState_bed = { 0 }, + Temperature::pTerm_bed, + Temperature::iTerm_bed, + Temperature::dTerm_bed, + Temperature::pid_error_bed; + #else + millis_t Temperature::next_bed_check_ms; + #endif + uint16_t Temperature::raw_temp_bed_value = 0; + #if HEATER_IDLE_HANDLER + millis_t Temperature::bed_idle_timeout_ms = 0; + bool Temperature::bed_idle_timeout_exceeded = false; + #endif +#endif // HAS_HEATED_BED + +#if HAS_TEMP_CHAMBER + float Temperature::current_temperature_chamber = 0.0; + int16_t Temperature::current_temperature_chamber_raw = 0; + uint16_t Temperature::raw_temp_chamber_value = 0; #endif // Initialized by settings.load() @@ -113,11 +143,6 @@ int16_t Temperature::current_temperature_raw[HOTENDS] = { 0 }, #endif #endif -// Initialized by settings.load() -#if ENABLED(PIDTEMPBED) - float Temperature::bedKp, Temperature::bedKi, Temperature::bedKd; -#endif - #if ENABLED(BABYSTEPPING) volatile int Temperature::babystepsTodo[XYZ] = { 0 }; #endif @@ -127,18 +152,11 @@ int16_t Temperature::current_temperature_raw[HOTENDS] = { 0 }, millis_t Temperature::watch_heater_next_ms[HOTENDS] = { 0 }; #endif -#if WATCH_THE_BED - uint16_t Temperature::watch_target_bed_temp = 0; - millis_t Temperature::watch_bed_next_ms = 0; -#endif - #if ENABLED(PREVENT_COLD_EXTRUSION) bool Temperature::allow_cold_extrude = false; int16_t Temperature::extrude_min_temp = EXTRUDE_MINTEMP; #endif -// private: - #if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT) uint16_t Temperature::redundant_temperature_raw = 0; float Temperature::redundant_temperature = 0.0; @@ -164,20 +182,7 @@ volatile bool Temperature::temp_meas_ready = false; bool Temperature::pid_reset[HOTENDS]; #endif -#if ENABLED(PIDTEMPBED) - float Temperature::temp_iState_bed = { 0 }, - Temperature::temp_dState_bed = { 0 }, - Temperature::pTerm_bed, - Temperature::iTerm_bed, - Temperature::dTerm_bed, - Temperature::pid_error_bed; -#else - millis_t Temperature::next_bed_check_ms; -#endif - -uint16_t Temperature::raw_temp_value[MAX_EXTRUDERS] = { 0 }, - Temperature::raw_temp_chamber_value = 0, - Temperature::raw_temp_bed_value = 0; +uint16_t Temperature::raw_temp_value[MAX_EXTRUDERS] = { 0 }; // Init min and max temp with extreme values to prevent false errors during startup int16_t Temperature::minttemp_raw[HOTENDS] = ARRAY_BY_HOTENDS(HEATER_0_RAW_LO_TEMP , HEATER_1_RAW_LO_TEMP , HEATER_2_RAW_LO_TEMP, HEATER_3_RAW_LO_TEMP, HEATER_4_RAW_LO_TEMP), @@ -193,14 +198,6 @@ int16_t Temperature::minttemp_raw[HOTENDS] = ARRAY_BY_HOTENDS(HEATER_0_RAW_LO_TE millis_t Temperature::preheat_end_time[HOTENDS] = { 0 }; #endif -#ifdef BED_MINTEMP - int16_t Temperature::bed_minttemp_raw = HEATER_BED_RAW_LO_TEMP; -#endif - -#ifdef BED_MAXTEMP - int16_t Temperature::bed_maxttemp_raw = HEATER_BED_RAW_HI_TEMP; -#endif - #if ENABLED(FILAMENT_WIDTH_SENSOR) int8_t Temperature::meas_shift_index; // Index of a delayed sample in buffer #endif @@ -209,8 +206,7 @@ int16_t Temperature::minttemp_raw[HOTENDS] = ARRAY_BY_HOTENDS(HEATER_0_RAW_LO_TE millis_t Temperature::next_auto_fan_check_ms = 0; #endif -uint8_t Temperature::soft_pwm_amount[HOTENDS], - Temperature::soft_pwm_amount_bed; +uint8_t Temperature::soft_pwm_amount[HOTENDS]; #if ENABLED(FAN_SOFT_PWM) uint8_t Temperature::soft_pwm_amount_fan[FAN_COUNT], @@ -228,10 +224,6 @@ uint8_t Temperature::soft_pwm_amount[HOTENDS], #if HEATER_IDLE_HANDLER millis_t Temperature::heater_idle_timeout_ms[HOTENDS] = { 0 }; bool Temperature::heater_idle_timeout_exceeded[HOTENDS] = { false }; - #if HAS_TEMP_BED - millis_t Temperature::bed_idle_timeout_ms = 0; - bool Temperature::bed_idle_timeout_exceeded = false; - #endif #endif #if ENABLED(ADC_KEYPAD) @@ -541,8 +533,13 @@ uint8_t Temperature::soft_pwm_amount[HOTENDS], Temperature::Temperature() { } -int Temperature::getHeaterPower(int heater) { - return heater < 0 ? soft_pwm_amount_bed : soft_pwm_amount[heater]; +int Temperature::getHeaterPower(const int heater) { + return ( + #if HAS_HEATED_BED + heater < 0 ? soft_pwm_amount_bed : + #endif + soft_pwm_amount[heater] + ); } #if HAS_AUTO_FAN @@ -562,8 +559,11 @@ int Temperature::getHeaterPower(int heater) { 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])); + + #if HAS_TEMP_CHAMBER + if (current_temperature_chamber > EXTRUDER_AUTO_FAN_TEMPERATURE) + SBI(fanState, pgm_read_byte(&fanBit[5])); + #endif uint8_t fanDone = 0; for (uint8_t f = 0; f < COUNT(fanPin); f++) { @@ -841,29 +841,29 @@ void Temperature::manage_heater() { } #endif // FILAMENT_WIDTH_SENSOR - #if WATCH_THE_BED - // 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), TEMP_ERR_PSTR(MSG_HEATING_FAILED_LCD, -1)); - else // Start again if the target is still far off - start_watching_bed(); - } - #endif // WATCH_THE_BED + #if HAS_HEATED_BED - #if DISABLED(PIDTEMPBED) - if (PENDING(ms, next_bed_check_ms) + #if WATCH_THE_BED + // 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), TEMP_ERR_PSTR(MSG_HEATING_FAILED_LCD, -1)); + else // Start again if the target is still far off + start_watching_bed(); + } + #endif // WATCH_THE_BED + + #if DISABLED(PIDTEMPBED) + if (PENDING(ms, next_bed_check_ms) + #if ENABLED(PROBING_HEATERS_OFF) && ENABLED(BED_LIMIT_SWITCHING) + && paused == last_pause_state + #endif + ) return; + next_bed_check_ms = ms + BED_CHECK_INTERVAL; #if ENABLED(PROBING_HEATERS_OFF) && ENABLED(BED_LIMIT_SWITCHING) - && paused == last_pause_state + last_pause_state = paused; #endif - ) return; - next_bed_check_ms = ms + BED_CHECK_INTERVAL; - #if ENABLED(PROBING_HEATERS_OFF) && ENABLED(BED_LIMIT_SWITCHING) - last_pause_state = paused; #endif - #endif - - #if HAS_TEMP_BED #if HEATER_IDLE_HANDLER if (!bed_idle_timeout_exceeded && bed_idle_timeout_ms && ELAPSED(ms, bed_idle_timeout_ms)) @@ -904,7 +904,7 @@ void Temperature::manage_heater() { } #endif } - #endif // HAS_TEMP_BED + #endif // HAS_HEATED_BED } #define PGM_RD_W(x) (short)pgm_read_word(&x) @@ -952,7 +952,7 @@ float Temperature::analog2temp(const int raw, const uint8_t e) { return ((raw * ((5.0 * 100.0) / 1024.0) / OVERSAMPLENR) * (TEMP_SENSOR_AD595_GAIN)) + TEMP_SENSOR_AD595_OFFSET; } -#if HAS_TEMP_BED +#if HAS_HEATED_BED // Derived from RepRap FiveD extruder::getTemperature() // For bed temperature measurement. float Temperature::analog2tempBed(const int raw) { @@ -986,7 +986,7 @@ float Temperature::analog2temp(const int raw, const uint8_t e) { #endif } -#endif // HAS_TEMP_BED +#endif // HAS_HEATED_BED #if HAS_TEMP_CHAMBER // Derived from RepRap FiveD extruder::getTemperature() @@ -1036,7 +1036,7 @@ void Temperature::updateTemperaturesFromRawValues() { #endif HOTEND_LOOP() current_temperature[e] = Temperature::analog2temp(current_temperature_raw[e], e); - #if HAS_TEMP_BED + #if HAS_HEATED_BED current_temperature_bed = Temperature::analog2tempBed(current_temperature_bed_raw); #endif #if HAS_TEMP_CHAMBER @@ -1127,7 +1127,7 @@ void Temperature::init() { #if HAS_HEATER_4 SET_OUTPUT(HEATER_3_PIN); #endif - #if HAS_HEATER_BED + #if HAS_HEATED_BED SET_OUTPUT(HEATER_BED_PIN); #endif @@ -1192,7 +1192,7 @@ void Temperature::init() { #if HAS_TEMP_4 ANALOG_SELECT(TEMP_4_PIN); #endif - #if HAS_TEMP_BED + #if HAS_HEATED_BED ANALOG_SELECT(TEMP_BED_PIN); #endif #if HAS_TEMP_CHAMBER @@ -1266,7 +1266,7 @@ void Temperature::init() { // Use timer0 for temperature measurement // Interleave temperature interrupt with millies interrupt OCR0B = 128; - SBI(TIMSK0, OCIE0B); + ENABLE_TEMPERATURE_INTERRUPT(); // Wait for temperature measurement to settle delay(250); @@ -1327,7 +1327,7 @@ void Temperature::init() { #endif // HOTENDS > 2 #endif // HOTENDS > 1 - #if HAS_TEMP_BED + #if HAS_HEATED_BED #ifdef BED_MINTEMP while (analog2tempBed(bed_minttemp_raw) < BED_MINTEMP) { #if HEATER_BED_RAW_LO_TEMP < HEATER_BED_RAW_HI_TEMP @@ -1346,7 +1346,7 @@ void Temperature::init() { #endif } #endif // BED_MAXTEMP - #endif // HAS_TEMP_BED + #endif // HAS_HEATED_BED #if ENABLED(PROBING_HEATERS_OFF) paused = false; @@ -1463,7 +1463,7 @@ void Temperature::init() { #if HEATER_IDLE_HANDLER // If the heater idle timeout expires, restart if ((heater_id >= 0 && heater_idle_timeout_exceeded[heater_id]) - #if HAS_TEMP_BED + #if HAS_HEATED_BED || (heater_id < 0 && bed_idle_timeout_exceeded) #endif ) { @@ -1509,7 +1509,10 @@ void Temperature::disable_all_heaters() { #endif HOTEND_LOOP() setTargetHotend(0, e); - setTargetBed(0); + + #if HAS_HEATED_BED + setTargetBed(0); + #endif // Unpause and reset everything #if ENABLED(PROBING_HEATERS_OFF) @@ -1541,10 +1544,10 @@ void Temperature::disable_all_heaters() { #endif // HOTENDS > 1 #endif - #if HAS_TEMP_BED + #if HAS_HEATED_BED target_temperature_bed = 0; soft_pwm_amount_bed = 0; - #if HAS_HEATER_BED + #if HAS_HEATED_BED WRITE_HEATER_BED(LOW); #endif #endif @@ -1557,13 +1560,13 @@ void Temperature::disable_all_heaters() { paused = p; if (p) { HOTEND_LOOP() start_heater_idle_timer(e, 0); // timeout immediately - #if HAS_TEMP_BED + #if HAS_HEATED_BED start_bed_idle_timer(0); // timeout immediately #endif } else { HOTEND_LOOP() reset_heater_idle_timer(e); - #if HAS_TEMP_BED + #if HAS_HEATED_BED reset_bed_idle_timer(); #endif } @@ -1673,8 +1676,13 @@ void Temperature::set_current_temp_raw() { #endif #endif #endif - current_temperature_bed_raw = raw_temp_bed_value; - current_temperature_chamber_raw = raw_temp_chamber_value; + + #if HAS_HEATED_BED + current_temperature_bed_raw = raw_temp_bed_value; + #endif + #if HAS_TEMP_CHAMBER + current_temperature_chamber_raw = raw_temp_chamber_value; + #endif temp_meas_ready = true; } @@ -1773,20 +1781,26 @@ void Temperature::set_current_temp_raw() { * - For PINS_DEBUGGING, monitor and report endstop pins * - For ENDSTOP_INTERRUPTS_FEATURE check endstops if flagged */ -ISR(TIMER0_COMPB_vect) { Temperature::isr(); } - -volatile bool Temperature::in_temp_isr = false; +ISR(TIMER0_COMPB_vect) { + /** + * AVR has no hardware interrupt preemption, so emulate priorization + * and preemption of this ISR by all others by disabling the timer + * interrupt generation capability and reenabling global interrupts. + * Any interrupt can then interrupt this handler and preempt it. + * This ISR becomes the lowest priority one so the UART, Endstops + * and Stepper ISRs can all preempt it. + */ + DISABLE_TEMPERATURE_INTERRUPT(); + sei(); -void Temperature::isr() { - // The stepper ISR can interrupt this ISR. When it does it re-enables this ISR - // at the end of its run, potentially causing re-entry. This flag prevents it. - if (in_temp_isr) return; - in_temp_isr = true; + Temperature::isr(); - // Allow UART and stepper ISRs - CBI(TIMSK0, OCIE0B); //Disable Temperature ISR - sei(); + // Disable global interrupts and reenable this ISR + cli(); + ENABLE_TEMPERATURE_INTERRUPT(); +} +void Temperature::isr() { static int8_t temp_count = -1; static ADCSensorState adc_sensor_state = StartupDelay; static uint8_t pwm_count = _BV(SOFT_PWM_SCALE); @@ -1821,7 +1835,7 @@ void Temperature::isr() { #endif // HOTENDS > 3 #endif // HOTENDS > 2 #endif // HOTENDS > 1 - #if HAS_HEATER_BED + #if HAS_HEATED_BED ISR_STATICS(BED); #endif @@ -1862,7 +1876,7 @@ void Temperature::isr() { #endif // HOTENDS > 2 #endif // HOTENDS > 1 - #if HAS_HEATER_BED + #if HAS_HEATED_BED soft_pwm_count_BED = (soft_pwm_count_BED & pwm_mask) + soft_pwm_amount_bed; WRITE_HEATER_BED(soft_pwm_count_BED > pwm_mask ? HIGH : LOW); #endif @@ -1897,7 +1911,7 @@ void Temperature::isr() { #endif // HOTENDS > 2 #endif // HOTENDS > 1 - #if HAS_HEATER_BED + #if HAS_HEATED_BED if (soft_pwm_count_BED <= pwm_count_tmp) WRITE_HEATER_BED(LOW); #endif @@ -1978,7 +1992,7 @@ void Temperature::isr() { #endif // HOTENDS > 3 #endif // HOTENDS > 2 #endif // HOTENDS > 1 - #if HAS_HEATER_BED + #if HAS_HEATED_BED _SLOW_PWM_ROUTINE(BED, soft_pwm_amount_bed); // BED #endif @@ -1997,7 +2011,7 @@ void Temperature::isr() { #endif // HOTENDS > 3 #endif // HOTENDS > 2 #endif // HOTENDS > 1 - #if HAS_HEATER_BED + #if HAS_HEATED_BED PWM_OFF_ROUTINE(BED); // BED #endif @@ -2057,7 +2071,7 @@ void Temperature::isr() { #endif // HOTENDS > 3 #endif // HOTENDS > 2 #endif // HOTENDS > 1 - #if HAS_HEATER_BED + #if HAS_HEATED_BED if (state_timer_heater_BED > 0) state_timer_heater_BED--; #endif } // ((pwm_count >> SOFT_PWM_SCALE) & 0x3F) == 0 @@ -2113,7 +2127,7 @@ void Temperature::isr() { break; #endif - #if HAS_TEMP_BED + #if HAS_HEATED_BED case PrepareTemp_BED: START_ADC(TEMP_BED_PIN); break; @@ -2216,8 +2230,14 @@ void Temperature::isr() { #endif ZERO(raw_temp_value); - raw_temp_bed_value = 0; - raw_temp_chamber_value = 0; + + #if HAS_HEATED_BED + raw_temp_bed_value = 0; + #endif + + #if HAS_TEMP_CHAMBER + raw_temp_chamber_value = 0; + #endif #define TEMPDIR(N) ((HEATER_##N##_RAW_LO_TEMP) > (HEATER_##N##_RAW_HI_TEMP) ? -1 : 1) @@ -2263,7 +2283,7 @@ void Temperature::isr() { #endif } - #if HAS_TEMP_BED + #if HAS_HEATED_BED #if HEATER_BED_RAW_LO_TEMP > HEATER_BED_RAW_HI_TEMP #define GEBED <= #else @@ -2317,10 +2337,6 @@ void Temperature::isr() { e_hit--; } #endif - - cli(); - in_temp_isr = false; - SBI(TIMSK0, OCIE0B); //re-enable Temperature ISR } #if HAS_TEMP_SENSOR @@ -2331,15 +2347,15 @@ void Temperature::isr() { #endif const int8_t e=-3 ) { - #if !(HAS_TEMP_BED && HAS_TEMP_HOTEND && HAS_TEMP_CHAMBER) && HOTENDS <= 1 + #if !(HAS_HEATED_BED && HAS_TEMP_HOTEND && HAS_TEMP_CHAMBER) && HOTENDS <= 1 UNUSED(e); #endif SERIAL_PROTOCOLCHAR(' '); SERIAL_PROTOCOLCHAR( - #if HAS_TEMP_CHAMBER && HAS_TEMP_BED && HAS_TEMP_HOTEND + #if HAS_TEMP_CHAMBER && HAS_HEATED_BED && HAS_TEMP_HOTEND e == -2 ? 'C' : e == -1 ? 'B' : 'T' - #elif HAS_TEMP_BED && HAS_TEMP_HOTEND + #elif HAS_HEATED_BED && HAS_TEMP_HOTEND e == -1 ? 'B' : 'T' #elif HAS_TEMP_HOTEND 'T' @@ -2370,7 +2386,7 @@ void Temperature::isr() { #endif ); #endif - #if HAS_TEMP_BED + #if HAS_HEATED_BED print_heater_state(degBed(), degTargetBed() #if ENABLED(SHOW_TEMP_ADC_VALUES) , rawBedTemp() @@ -2396,7 +2412,7 @@ void Temperature::isr() { #endif SERIAL_PROTOCOLPGM(" @:"); SERIAL_PROTOCOL(getHeaterPower(target_extruder)); - #if HAS_TEMP_BED + #if HAS_HEATED_BED SERIAL_PROTOCOLPGM(" B@:"); SERIAL_PROTOCOL(getHeaterPower(-1)); #endif diff --git a/Marlin/temperature.h b/Marlin/temperature.h index 195a567964ad..128007a83180 100644 --- a/Marlin/temperature.h +++ b/Marlin/temperature.h @@ -43,6 +43,10 @@ #define SOFT_PWM_SCALE 0 #endif +#define ENABLE_TEMPERATURE_INTERRUPT() SBI(TIMSK0, OCIE0B) +#define DISABLE_TEMPERATURE_INTERRUPT() CBI(TIMSK0, OCIE0B) +#define TEMPERATURE_ISR_ENABLED() TEST(TIMSK0, OCIE0B) + #define HOTEND_LOOP() for (int8_t e = 0; e < HOTENDS; e++) #if HOTENDS == 1 @@ -77,7 +81,7 @@ enum ADCSensorState : char { PrepareTemp_4, MeasureTemp_4, #endif - #if HAS_TEMP_BED + #if HAS_HEATED_BED PrepareTemp_BED, MeasureTemp_BED, #endif @@ -115,35 +119,19 @@ enum ADCSensorState : char { #define unscalePID_d(d) ( (d) * PID_dT ) #endif -#if !HAS_HEATER_BED - constexpr int16_t target_temperature_bed = 0; -#endif - class Temperature { public: - static float current_temperature[HOTENDS], - current_temperature_chamber, - current_temperature_bed; + static float current_temperature[HOTENDS]; static int16_t current_temperature_raw[HOTENDS], - target_temperature[HOTENDS], - current_temperature_chamber_raw, - current_temperature_bed_raw; + target_temperature[HOTENDS]; + static uint8_t soft_pwm_amount[HOTENDS]; #if ENABLED(AUTO_POWER_E_FANS) static int16_t autofan_speed[HOTENDS]; #endif - #if HAS_HEATER_BED - static int16_t target_temperature_bed; - #endif - - static volatile bool in_temp_isr; - - static uint8_t soft_pwm_amount[HOTENDS], - soft_pwm_amount_bed; - #if ENABLED(FAN_SOFT_PWM) static uint8_t soft_pwm_amount_fan[FAN_COUNT], soft_pwm_count_fan[FAN_COUNT]; @@ -171,24 +159,19 @@ class Temperature { #endif - #if ENABLED(PIDTEMPBED) - static float bedKp, bedKi, bedKd; + #if HAS_HEATED_BED + static float current_temperature_bed; + static int16_t current_temperature_bed_raw, target_temperature_bed; + static uint8_t soft_pwm_amount_bed; + #if ENABLED(PIDTEMPBED) + static float bedKp, bedKi, bedKd; + #endif #endif #if ENABLED(BABYSTEPPING) static volatile int babystepsTodo[3]; #endif - #if WATCH_HOTENDS - static uint16_t watch_target_temp[HOTENDS]; - static millis_t watch_heater_next_ms[HOTENDS]; - #endif - - #if WATCH_THE_BED - static uint16_t watch_target_bed_temp; - static millis_t watch_bed_next_ms; - #endif - #if ENABLED(PREVENT_COLD_EXTRUSION) static bool allow_cold_extrude; static int16_t extrude_min_temp; @@ -213,15 +196,21 @@ class Temperature { FORCE_INLINE static bool hotEnoughToExtrude(const uint8_t e) { return !tooColdToExtrude(e); } FORCE_INLINE static bool targetHotEnoughToExtrude(const uint8_t e) { return !targetTooColdToExtrude(e); } - private: + private: + + static volatile bool temp_meas_ready; + static uint16_t raw_temp_value[MAX_EXTRUDERS]; + + #if WATCH_HOTENDS + static uint16_t watch_target_temp[HOTENDS]; + static millis_t watch_heater_next_ms[HOTENDS]; + #endif #if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT) static uint16_t redundant_temperature_raw; static float redundant_temperature; #endif - static volatile bool temp_meas_ready; - #if ENABLED(PIDTEMP) static float temp_iState[HOTENDS], temp_dState[HOTENDS], @@ -240,41 +229,52 @@ class Temperature { static bool pid_reset[HOTENDS]; #endif - #if ENABLED(PIDTEMPBED) - static float temp_iState_bed, - temp_dState_bed, - pTerm_bed, - iTerm_bed, - dTerm_bed, - pid_error_bed; - #else - static millis_t next_bed_check_ms; - #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 static int16_t minttemp_raw[HOTENDS], maxttemp_raw[HOTENDS], minttemp[HOTENDS], maxttemp[HOTENDS]; - #ifdef MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED - static uint8_t consecutive_low_temperature_error[HOTENDS]; + #if HAS_HEATED_BED + static uint16_t raw_temp_bed_value; + #if WATCH_THE_BED + static uint16_t watch_target_bed_temp; + static millis_t watch_bed_next_ms; + #endif + #if ENABLED(PIDTEMPBED) + static float temp_iState_bed, + temp_dState_bed, + pTerm_bed, + iTerm_bed, + dTerm_bed, + pid_error_bed; + #else + static millis_t next_bed_check_ms; + #endif + #if HEATER_IDLE_HANDLER + static millis_t bed_idle_timeout_ms; + static bool bed_idle_timeout_exceeded; + #endif + #ifdef BED_MINTEMP + static int16_t bed_minttemp_raw; + #endif + #ifdef BED_MAXTEMP + static int16_t bed_maxttemp_raw; + #endif #endif - #ifdef MILLISECONDS_PREHEAT_TIME - static millis_t preheat_end_time[HOTENDS]; + #if HAS_TEMP_CHAMBER + static uint16_t raw_temp_chamber_value; + static float current_temperature_chamber; + static int16_t current_temperature_chamber_raw; #endif - #ifdef BED_MINTEMP - static int16_t bed_minttemp_raw; + #ifdef MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED + static uint8_t consecutive_low_temperature_error[HOTENDS]; #endif - #ifdef BED_MAXTEMP - static int16_t bed_maxttemp_raw; + #ifdef MILLISECONDS_PREHEAT_TIME + static millis_t preheat_end_time[HOTENDS]; #endif #if ENABLED(FILAMENT_WIDTH_SENSOR) @@ -296,10 +296,6 @@ class Temperature { #if HEATER_IDLE_HANDLER static millis_t heater_idle_timeout_ms[HOTENDS]; static bool heater_idle_timeout_exceeded[HOTENDS]; - #if HAS_TEMP_BED - static millis_t bed_idle_timeout_ms; - static bool bed_idle_timeout_exceeded; - #endif #endif public: @@ -321,7 +317,7 @@ class Temperature { */ static float analog2temp(const int raw, const uint8_t e); - #if HAS_TEMP_BED + #if HAS_HEATED_BED static float analog2tempBed(const int raw); #endif #if HAS_TEMP_CHAMBER @@ -380,8 +376,6 @@ class Temperature { #endif 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) { @@ -390,8 +384,6 @@ class Temperature { #endif 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) { @@ -401,16 +393,10 @@ class Temperature { return target_temperature[HOTEND_INDEX]; } - FORCE_INLINE static int16_t degTargetBed() { return target_temperature_bed; } - #if WATCH_HOTENDS static void start_watching_heater(const uint8_t e = 0); #endif - #if WATCH_THE_BED - static void start_watching_bed(); - #endif - static void setTargetHotend(const int16_t celsius, const uint8_t e) { #if HOTENDS == 1 UNUSED(e); @@ -430,8 +416,30 @@ class Temperature { #endif } - static void setTargetBed(const int16_t celsius) { - #if HAS_HEATER_BED + FORCE_INLINE static bool isHeatingHotend(const uint8_t e) { + #if HOTENDS == 1 + UNUSED(e); + #endif + return target_temperature[HOTEND_INDEX] > current_temperature[HOTEND_INDEX]; + } + + FORCE_INLINE static bool isCoolingHotend(const uint8_t e) { + #if HOTENDS == 1 + UNUSED(e); + #endif + return target_temperature[HOTEND_INDEX] < current_temperature[HOTEND_INDEX]; + } + + #if HAS_HEATED_BED + #if ENABLED(SHOW_TEMP_ADC_VALUES) + FORCE_INLINE static int16_t rawBedTemp() { return current_temperature_bed_raw; } + #endif + FORCE_INLINE static float degBed() { return current_temperature_bed; } + FORCE_INLINE static int16_t degTargetBed() { return target_temperature_bed; } + FORCE_INLINE static bool isHeatingBed() { return target_temperature_bed > current_temperature_bed; } + FORCE_INLINE static bool isCoolingBed() { return target_temperature_bed < current_temperature_bed; } + + static void setTargetBed(const int16_t celsius) { #if ENABLED(AUTO_POWER_CONTROL) powerManager.power_on(); #endif @@ -445,24 +453,19 @@ class Temperature { #if WATCH_THE_BED start_watching_bed(); #endif - #endif - } + } - FORCE_INLINE static bool isHeatingHotend(const uint8_t e) { - #if HOTENDS == 1 - UNUSED(e); + #if WATCH_THE_BED + static void start_watching_bed(); #endif - return target_temperature[HOTEND_INDEX] > current_temperature[HOTEND_INDEX]; - } - FORCE_INLINE static bool isHeatingBed() { return target_temperature_bed > current_temperature_bed; } + #endif - FORCE_INLINE static bool isCoolingHotend(const uint8_t e) { - #if HOTENDS == 1 - UNUSED(e); + #if HAS_TEMP_CHAMBER + #if ENABLED(SHOW_TEMP_ADC_VALUES) + FORCE_INLINE static int16_t rawChamberTemp() { return current_temperature_chamber_raw; } #endif - return target_temperature[HOTEND_INDEX] < current_temperature[HOTEND_INDEX]; - } - FORCE_INLINE static bool isCoolingBed() { return target_temperature_bed < current_temperature_bed; } + FORCE_INLINE static float degChamber() { return current_temperature_chamber; } + #endif FORCE_INLINE static bool wait_for_heating(const uint8_t e) { return degTargetHotend(e) > TEMP_HYSTERESIS && abs(degHotend(e) - degTargetHotend(e)) > TEMP_HYSTERESIS; @@ -471,7 +474,7 @@ class Temperature { /** * The software PWM power for a heater */ - static int getHeaterPower(int heater); + static int getHeaterPower(const int heater); /** * Switch off all heaters, set all target temperatures to 0 @@ -564,7 +567,7 @@ class Temperature { return heater_idle_timeout_exceeded[HOTEND_INDEX]; } - #if HAS_TEMP_BED + #if HAS_HEATED_BED static void start_bed_idle_timer(const millis_t timeout_ms) { bed_idle_timeout_ms = millis() + timeout_ms; bed_idle_timeout_exceeded = false; diff --git a/Marlin/tmc_util.cpp b/Marlin/tmc_util.cpp index bea827ff793b..edec89c13464 100644 --- a/Marlin/tmc_util.cpp +++ b/Marlin/tmc_util.cpp @@ -215,12 +215,12 @@ 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_Y[] PROGMEM = "Y", ext_Z[] PROGMEM = "Z", + 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_Y, ext_Z, ext_X2, ext_Y2, ext_Z2, ext_E0, ext_E1, ext_E2, ext_E3, ext_E4 }; + 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])); } @@ -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/ubl.cpp b/Marlin/ubl.cpp index bc700e20c013..df9c212bbf9d 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,81 +158,112 @@ } } - // 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 || 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(); } diff --git a/Marlin/ubl_G29.cpp b/Marlin/ubl_G29.cpp index 44048408ba95..f692f8221f19 100644 --- a/Marlin/ubl_G29.cpp +++ b/Marlin/ubl_G29.cpp @@ -247,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. @@ -623,8 +621,8 @@ #if ENABLED(NEWPANEL) lcd_reset_alert_level(); - LCD_MESSAGEPGM(""); lcd_quick_feedback(true); + lcd_reset_status(); lcd_external_control = false; #endif @@ -1384,7 +1382,7 @@ const float rawx = mesh_index_to_xpos(location.x_index), rawy = mesh_index_to_ypos(location.y_index); - //if (!position_is_reachable(rawx, rawy)) break; // SHOULD NOT OCCUR because find_closest_mesh_point_of_type will only return reachable + 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 diff --git a/Marlin/ubl_motion.cpp b/Marlin/ubl_motion.cpp index f206837bdf7b..24a3b7dc461b 100644 --- a/Marlin/ubl_motion.cpp +++ b/Marlin/ubl_motion.cpp @@ -342,7 +342,7 @@ xi_cnt--; } - //if (xi_cnt < 0 || yi_cnt < 0) break; // Too far! Exit the loop and go 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) diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index 75cf4b666a63..8a9dc2176076 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); @@ -747,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); +} /** * @@ -778,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; @@ -816,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() { @@ -835,10 +855,72 @@ void kill_screen(const char* lcd_msg) { 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 + )); + + #if HAS_HEATED_BED + // Restore the bed temperature + sprintf_P(cmd, PSTR("M190 S%i"), job_recovery_info.target_temperature_bed); + enqueue_and_echo_command(cmd); + #endif + + // 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; @@ -1342,7 +1424,7 @@ void kill_screen(const char* lcd_msg) { // // Bed: // - #if HAS_TEMP_BED + #if HAS_HEATED_BED MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_BED, &thermalManager.target_temperature_bed, 0, BED_MAXTEMP - 15, watch_temp_callback_bed); #endif @@ -1714,7 +1796,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; } @@ -1745,27 +1827,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(); } @@ -1815,7 +1913,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(); @@ -2031,7 +2129,7 @@ void kill_screen(const char* lcd_msg) { x_plot = 0, y_plot = 0; - #if HAS_TEMP_BED + #if HAS_HEATED_BED static int16_t custom_bed_temp = 50; #endif @@ -2041,7 +2139,7 @@ void kill_screen(const char* lcd_msg) { void _lcd_ubl_build_custom_mesh() { char UBL_LCD_GCODE[20]; enqueue_and_echo_commands_P(PSTR("G28")); - #if HAS_TEMP_BED + #if HAS_HEATED_BED sprintf_P(UBL_LCD_GCODE, PSTR("M190 S%i"), custom_bed_temp); lcd_enqueue_command(UBL_LCD_GCODE); #endif @@ -2062,7 +2160,7 @@ void kill_screen(const char* lcd_msg) { START_MENU(); MENU_BACK(MSG_UBL_BUILD_MESH_MENU); MENU_ITEM_EDIT(int3, MSG_UBL_CUSTOM_HOTEND_TEMP, &custom_hotend_temp, EXTRUDE_MINTEMP, (HEATER_0_MAXTEMP - 10)); - #if HAS_TEMP_BED + #if HAS_HEATED_BED MENU_ITEM_EDIT(int3, MSG_UBL_CUSTOM_BED_TEMP, &custom_bed_temp, BED_MINTEMP, (BED_MAXTEMP - 15)); #endif MENU_ITEM(function, MSG_UBL_BUILD_CUSTOM_MESH, _lcd_ubl_build_custom_mesh); @@ -2121,7 +2219,7 @@ void kill_screen(const char* lcd_msg) { void _lcd_ubl_validate_custom_mesh() { char UBL_LCD_GCODE[24]; const int temp = - #if HAS_TEMP_BED + #if HAS_HEATED_BED custom_bed_temp #else 0 @@ -2144,7 +2242,7 @@ void kill_screen(const char* lcd_msg) { void _lcd_ubl_validate_mesh() { START_MENU(); MENU_BACK(MSG_UBL_TOOLS); - #if HAS_TEMP_BED + #if HAS_HEATED_BED MENU_ITEM(gcode, MSG_UBL_VALIDATE_PLA_MESH, PSTR("G28\nG26 C B" STRINGIFY(PREHEAT_1_TEMP_BED) " H" STRINGIFY(PREHEAT_1_TEMP_HOTEND) " P")); MENU_ITEM(gcode, MSG_UBL_VALIDATE_ABS_MESH, PSTR("G28\nG26 C B" STRINGIFY(PREHEAT_2_TEMP_BED) " H" STRINGIFY(PREHEAT_2_TEMP_HOTEND) " P")); #else @@ -2248,7 +2346,7 @@ void kill_screen(const char* lcd_msg) { void _lcd_ubl_build_mesh() { START_MENU(); MENU_BACK(MSG_UBL_TOOLS); - #if HAS_TEMP_BED + #if HAS_HEATED_BED MENU_ITEM(gcode, MSG_UBL_BUILD_PLA_MESH, PSTR( "G28\n" "M190 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\n" @@ -2640,7 +2738,7 @@ void kill_screen(const char* lcd_msg) { // bool has_heat = false; HOTEND_LOOP() if (thermalManager.target_temperature[HOTEND_INDEX]) { has_heat = true; break; } - #if HAS_TEMP_BED + #if HAS_HEATED_BED if (thermalManager.target_temperature_bed) has_heat = true; #endif if (has_heat) MENU_ITEM(function, MSG_COOLDOWN, lcd_cooldown); @@ -2755,7 +2853,7 @@ void kill_screen(const char* lcd_msg) { #endif recalc_delta_settings(); } - + void lcd_delta_settings() { START_MENU(); MENU_BACK(MSG_DELTA_CALIBRATE); @@ -2925,14 +3023,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); @@ -3358,7 +3458,7 @@ void kill_screen(const char* lcd_msg) { // // Bed: // - #if HAS_TEMP_BED + #if HAS_HEATED_BED MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_BED, &thermalManager.target_temperature_bed, 0, BED_MAXTEMP - 15, watch_temp_callback_bed); #endif @@ -3838,7 +3938,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(); } /** @@ -4699,8 +4799,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; \ @@ -4840,6 +4939,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) { @@ -4851,12 +4951,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)(); @@ -5027,7 +5127,7 @@ void lcd_update() { } #endif - #endif + #endif // ULTIPANEL #if ENABLED(SDSUPPORT) && PIN_EXISTS(SD_DETECT) @@ -5047,7 +5147,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 @@ -5057,6 +5157,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) @@ -5292,7 +5399,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 f9dadc3056ec..5adbf148e724 100644 --- a/Marlin/ultralcd.h +++ b/Marlin/ultralcd.h @@ -28,6 +28,13 @@ #if ENABLED(ULTRA_LCD) || ENABLED(MALYAN_LCD) void lcd_init(); bool lcd_detected(); + void lcd_update(); + void lcd_setalertstatusPGM(const char* message); +#else + inline void lcd_init() {} + inline bool lcd_detected() { return true; } + inline void lcd_update() {} + inline void lcd_setalertstatusPGM(const char* message) { UNUSED(message); } #endif #if ENABLED(ULTRA_LCD) @@ -50,12 +57,12 @@ int16_t lcd_strlen(const char* s); int16_t lcd_strlen_P(const char* s); - void lcd_update(); bool lcd_hasstatus(); void lcd_setstatus(const char* message, const bool persist=false); 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); @@ -227,29 +234,24 @@ void wait_for_release(); #endif -#else // no LCD +#else // MALYAN_LCD or no LCD constexpr bool lcd_wait_for_move = false; - inline void lcd_init() {} - inline bool lcd_detected() { return true; } - inline void lcd_update() {} inline void lcd_refresh() {} inline void lcd_buttons_update() {} inline bool lcd_hasstatus() { return false; } inline void lcd_setstatus(const char* const message, const bool persist=false) { UNUSED(message); UNUSED(persist); } inline void lcd_setstatusPGM(const char* const message, const int8_t level=0) { UNUSED(message); UNUSED(level); } 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 diff --git a/Marlin/ultralcd_impl_HD44780.h b/Marlin/ultralcd_impl_HD44780.h index cf8e7dfdf53c..ac40d643cf76 100644 --- a/Marlin/ultralcd_impl_HD44780.h +++ b/Marlin/ultralcd_impl_HD44780.h @@ -617,15 +617,14 @@ FORCE_INLINE void _draw_axis_label(const AxisEnum axis, const char* const pstr, } FORCE_INLINE void _draw_heater_status(const int8_t heater, const char prefix, const bool blink) { - #if TEMP_SENSOR_BED + #if HAS_HEATED_BED const bool isBed = heater < 0; + const float t1 = (isBed ? thermalManager.degBed() : thermalManager.degHotend(heater)), + t2 = (isBed ? thermalManager.degTargetBed() : thermalManager.degTargetHotend(heater)); #else - constexpr bool isBed = false; + const float t1 = thermalManager.degHotend(heater), t2 = thermalManager.degTargetHotend(heater); #endif - const float t1 = (isBed ? thermalManager.degBed() : thermalManager.degHotend(heater)), - t2 = (isBed ? thermalManager.degTargetBed() : thermalManager.degTargetHotend(heater)); - if (prefix >= 0) lcd.print(prefix); lcd.print(itostr3(t1 + 0.5)); @@ -634,12 +633,11 @@ FORCE_INLINE void _draw_heater_status(const int8_t heater, const char prefix, co #if !HEATER_IDLE_HANDLER UNUSED(blink); #else - const bool is_idle = (!isBed ? thermalManager.is_heater_idle(heater) : - #if HAS_TEMP_BED - thermalManager.is_bed_idle() - #else - false + const bool is_idle = ( + #if HAS_HEATED_BED + isBed ? thermalManager.is_bed_idle() : #endif + thermalManager.is_heater_idle(heater) ); if (!blink && is_idle) {