PrintEngineering Initial Commit 1.3.91

EMERGENCY_BYPASS
autoreport_position
BABYSTEP_MBL_Z_OFFSET
M411 infrastructure
beginning of restore ABL Mesh capabilities
This commit is contained in:
PrintEngineering 2020-08-08 20:42:56 -04:00
parent c2d5b63a98
commit b77a204566
18 changed files with 888 additions and 341 deletions

View File

@ -1,3 +1,70 @@
#define CONFIGURATION_H_VERSION 020006 //Last changed working on 1.3.91
//===========================================================================
//============================= Artillery Options ===========================
//===========================================================================
/**************NOTE: DEFAULT MAXTEMP IS SET TO 300, USE RESPONSIBLY IF YOU DO NOT HAVE AN ALL METAL HEATBREAK!!!*************/
/* Artillery Genius Printer #define CUSTOM_MACHINE_NAME "Artillery Genius" #define X_BED_SIZE 226 #define Y_BED_SIZE 226 #define Z_MAX_POS 250 */
//#define GENIUS
/* Automatic Bed Leveling with BL Touch #define BLTOUCH and associated definitions. Disabling this enables Manual Mesh leveling */
//#define BLTOUCH
#ifdef BLTOUCH
#define NOZZLE_TO_PROBE_OFFSET { 31, -31, 0 }
#define WAGGSTER_MOD_WIRING //BLTOUCH to Z+ Z_MAX_PIN (D19) Waggster Mod style wiring, comment out to use Z_MIN_PIN (D18)
#endif
/* 3DPRINTBEGINNER Z MIN SENSOR AS ABL BED MESH PROBE MOD */
//#define ZMIN_SENSOR_AS_PROBE
#ifdef ZMIN_SENSOR_AS_PROBE
#define NOZZLE_TO_PROBE_OFFSET { 28, -33, 0 }
#endif
/* BMG EXTRUDER #define DEFAULT_AXIS_STEPS_PER_UNIT { 80.13, 80.18, 400, 413 } #define INVERT_E0_DIR true */
//#define BMG
/* NOVA HOTEND #define HEATER_0_MAXTEMP 390 #define HOTEND0_BETA 4267 #define PID_FUNCTIONAL_RANGE 25 #define EXTRUDER_AUTO_FAN_TEMPERATURE 120*/
//#define NOVA
#ifdef NOVA
#define NOZZLE_X_OFFSET 6 /* The Nova sits left of the stock nozzle position, this compensates. Value to be refined later. */
#endif
/* HEMERA HOTEND #define TEMP_SENSOR_0 5 (104GT-2) #define HEATER_0_MAXTEMP 300 (it's 300 by default) #define DEFAULT_AXIS_STEPS_PER_UNIT { 80.13, 80.18, 400, 409 } #define INVERT_E0_DIR true */
//#define HEMERA
#ifdef HEMERA
#ifdef BLTOUCH
#define NOZZLE_TO_PROBE_OFFSET { -5, 30, 0 }
#endif
#endif
/* P100/TRIANGLE LABS V6 HISENS 3950 THERMISTOR #define TEMP_SENSOR_0 13 #define HEATER_0_MAXTEMP 300 (it's 300 by default) */
//#define THERMISTOR_HISENS_300
/*OVERRIDE HARDCODED DEFAULTS AND SET YOUR OWN MOTOR STEPS HERE*/
//#define DEFAULT_AXIS_STEPS_PER_UNIT { 80.13, 80.18, 400, 455 }
/*OVERRIDE HARDCODED DEFAULTS FOR HOTEND PID VALUES, G2 Sidewinder X-1 V3 6/27-2020*/
/*#define DEFAULT_Kp 29.12
#define DEFAULT_Ki 2.52
#define DEFAULT_Kd 84.09//*/
/*OVERRIDE HARDCODED DEFAULTS FOR BED PID VALUES, G2 Sidewinder X-1 V3 6/27-2020*/
/*#define DEFAULT_bedKp 47.93
#define DEFAULT_bedKi 8.86
#define DEFAULT_bedKd 172.76//*/
/* InsanityAutomation Fork Options:*/
//#define GraphicalLCD // Will work next to MKS TFT
//#define TMC_2209 // Defaults to TMC2100
//#define TMC_2208 // Defaults to TMC2100, Print Engineering added 7/26-2020
//#define DISABLE_LED // Print Engineering added 8/2-2020 some users report compatibilty issues with BL Touch and LED enabled
//#define SKR13
//#define SKR14 //Print Engineering added 7/26-2020
//===========================================================================
//================================== Intro ==================================
//===========================================================================
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
@ -36,8 +103,6 @@
* Advanced settings can be found in Configuration_adv.h
*
*/
#define CONFIGURATION_H_VERSION 020006
//===========================================================================
//============================= Getting Started =============================
//===========================================================================
@ -71,7 +136,7 @@
// @section info
// Author info of this build printed to the host during boot and M115
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
#define STRING_CONFIG_H_AUTHOR "Print Engineering" // Who made the changes.
//#define CUSTOM_VERSION_FILE Version.h // Path from the root directory (no quotes)
/**
@ -84,16 +149,17 @@
* We encourage you to take advantage of this new feature and we also
* respectfully request that you retain the unmodified Marlin boot screen.
*/
#if ENABLED(GraphicalLCD)
// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION **
#define SHOW_BOOTSCREEN
// Show the bitmap in Marlin/_Bootscreen.h on startup.
//#define SHOW_CUSTOM_BOOTSCREEN
#define SHOW_CUSTOM_BOOTSCREEN
// Show the bitmap in Marlin/_Statusscreen.h on the status screen.
//#define CUSTOM_STATUS_SCREEN_IMAGE
#define CUSTOM_STATUS_SCREEN_IMAGE
#endif
// @section machine
/**
@ -104,13 +170,16 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
#define SERIAL_PORT 0
/**
* Select a secondary serial port on the board to use for communication with the host.
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
//#define SERIAL_PORT_2 -1
#if ENABLED(SKR13) || ENABLED(SKR14)
#define SERIAL_PORT_2 -1
#endif
/**
* This setting determines the communication speed of the printer.
@ -128,12 +197,23 @@
// Choose the name from boards.h that matches your setup
#ifndef MOTHERBOARD
#define MOTHERBOARD BOARD_RAMPS_14_EFB
#if ENABLED(SKR13)
#define MOTHERBOARD BOARD_BTT_SKR_V1_3
#else
#ifdef SKR14
#define MOTHERBOARD BOARD_BTT_SKR_V1_4_TURBO
#else
#define MOTHERBOARD BOARD_MKS_GEN_L
#endif
#endif
#endif
// Name displayed in the LCD "Ready" message and Info menu
//#define CUSTOM_MACHINE_NAME "3D Printer"
#ifndef GENIUS
#define CUSTOM_MACHINE_NAME "Artillery Sidewinder X1"
#else
#define CUSTOM_MACHINE_NAME "Artillery Genius"
#endif
// Printer's unique ID, used by some programs to differentiate between machines.
// Choose your own or use a service like https://www.uuidgenerator.net/version4
//#define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
@ -416,7 +496,15 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*/
#define TEMP_SENSOR_0 1
#ifdef HEMERA
#define TEMP_SENSOR_0 5
#else
#ifdef THERMISTOR_HISENS_300
#define TEMP_SENSOR_0 13
#else
#define TEMP_SENSOR_0 1
#endif
#endif
#define TEMP_SENSOR_1 0
#define TEMP_SENSOR_2 0
#define TEMP_SENSOR_3 0
@ -424,7 +512,7 @@
#define TEMP_SENSOR_5 0
#define TEMP_SENSOR_6 0
#define TEMP_SENSOR_7 0
#define TEMP_SENSOR_BED 0
#define TEMP_SENSOR_BED 1
#define TEMP_SENSOR_PROBE 0
#define TEMP_SENSOR_CHAMBER 0
@ -437,11 +525,11 @@
//#define TEMP_SENSOR_1_AS_REDUNDANT
#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10
#define TEMP_RESIDENCY_TIME 10 // (seconds) Time to wait for hotend to "settle" in M109
#define TEMP_RESIDENCY_TIME 5 // (seconds) Time to wait for hotend to "settle" in M109
#define TEMP_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer
#define TEMP_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target
#define TEMP_BED_RESIDENCY_TIME 10 // (seconds) Time to wait for bed to "settle" in M190
#define TEMP_BED_RESIDENCY_TIME 5 // (seconds) Time to wait for bed to "settle" in M190
#define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer
#define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target
@ -460,7 +548,11 @@
// Above this temperature the heater will be switched off.
// This can protect components from overheating, but NOT from shorts and failures.
// (Use MINTEMP for thermistor short/failure protection.)
#define HEATER_0_MAXTEMP 275
#ifdef NOVA
#define HEATER_0_MAXTEMP 390
#else
#define HEATER_0_MAXTEMP 300
#endif
#define HEATER_1_MAXTEMP 275
#define HEATER_2_MAXTEMP 275
#define HEATER_3_MAXTEMP 275
@ -482,17 +574,38 @@
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
//#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
//#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
#if ENABLED(GraphicalLCD)
#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
#endif
//#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders)
// Set/get with gcode: M301 E[extruder number, 0-2]
// If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
// Ultimaker
#define DEFAULT_Kp 22.2
#define DEFAULT_Ki 1.08
#define DEFAULT_Kd 114
//#define DEFAULT_Kp 22.2
//#define DEFAULT_Ki 1.08
//#define DEFAULT_Kd 114
#ifndef DEFAULT_Kp
#ifdef NOVA
// Sidewinder X1 Nova 6/4 2020 //Ryan
#define DEFAULT_Kp 20.8
#define DEFAULT_Ki 3.77
#define DEFAULT_Kd 26.74//*/
#else
// Sidewinder X-1 5/25-2020
#define DEFAULT_Kp 11.630
#define DEFAULT_Ki 0.798
#define DEFAULT_Kd 42.396//*/
#endif
#endif
// MakerGear
//#define DEFAULT_Kp 7.0
@ -523,7 +636,7 @@
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*/
//#define PIDTEMPBED
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
@ -541,10 +654,13 @@
//120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
//from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)
#define DEFAULT_bedKp 10.00
#define DEFAULT_bedKi .023
#define DEFAULT_bedKd 305.4
#ifndef DEFAULT_bedKp
//Artillery Sidewinder 5/25-2020
#define DEFAULT_bedKp 33.953
#define DEFAULT_bedKi 5.838
#define DEFAULT_bedKd 131.649
#endif
//120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
//from pidautotune
//#define DEFAULT_bedKp 97.1
@ -558,7 +674,7 @@
//#define PID_DEBUG // Sends debug data to the serial port. Use 'M303 D' to toggle activation.
//#define PID_OPENLOOP // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
#define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
#define PID_FUNCTIONAL_RANGE 5 // If the temperature difference between the target temperature and the actual temperature
// is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
#endif
@ -579,7 +695,7 @@
* Note: For Bowden Extruders make this large enough to allow load/unload.
*/
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
#define EXTRUDE_MAXLENGTH 300
//===========================================================================
//======================== Thermal Runaway Protection =======================
@ -660,13 +776,36 @@
#endif
// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
#define X_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
#define Y_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
#define Z_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
#define X_MIN_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop.
#define Y_MIN_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop.
#ifdef BLTOUCH
#ifdef WAGGSTER_MOD_WIRING
#define Z_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
#else
#define Z_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
#endif
#else
#define Z_MIN_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop.
#endif
#define X_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
#define Y_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
#define Z_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // Set to true to invert the logic of the probe.
#ifdef BLTOUCH
#ifdef WAGGSTER_MOD_WIRING
#define Z_MIN_PROBE_ENDSTOP_INVERTING true // Set to true to invert the logic of the probe.
#else
#define Z_MIN_PROBE_ENDSTOP_INVERTING true // Set to true to invert the logic of the probe.
#endif
#else
#ifdef ZMIN_SENSOR_AS_PROBE
#define Z_MIN_PROBE_ENDSTOP_INVERTING true // Set to true to invert the logic of the probe.
#else
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // Set to true to invert the logic of the probe.
#endif
#endif
/**
* Stepper Drivers
@ -684,6 +823,27 @@
* TMC5130, TMC5130_STANDALONE, TMC5160, TMC5160_STANDALONE
* :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'L6474', 'POWERSTEP01', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC2209', 'TMC2209_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
*/
#if ENABLED(TMC_2209)
#define X_DRIVER_TYPE TMC2209
#define Y_DRIVER_TYPE TMC2209
#define Z_DRIVER_TYPE TMC2209
#define Z2_DRIVER_TYPE TMC2209
#define E0_DRIVER_TYPE TMC2209
#else
#if ENABLED(TMC_2208)
#define X_DRIVER_TYPE TMC2208
#define Y_DRIVER_TYPE TMC2208
#define Z_DRIVER_TYPE TMC2208
#define Z2_DRIVER_TYPE TMC2208
#define E0_DRIVER_TYPE TMC2208
#else
#define X_DRIVER_TYPE TMC2100
#define Y_DRIVER_TYPE TMC2100
#define Z_DRIVER_TYPE TMC2100
#define Z2_DRIVER_TYPE TMC2100
#define E0_DRIVER_TYPE TMC2100
#endif
#endif
//#define X_DRIVER_TYPE A4988
//#define Y_DRIVER_TYPE A4988
//#define Z_DRIVER_TYPE A4988
@ -717,11 +877,13 @@
*
* :[2,3,4,5,6,7]
*/
//#define ENDSTOP_NOISE_THRESHOLD 2
#ifdef ZMIN_SENSOR_AS_PROBE
#define ENDSTOP_NOISE_THRESHOLD 2
#else
#define ENDSTOP_NOISE_THRESHOLD 2
#endif
// Check for stuck or disconnected endstops during homing moves.
//#define DETECT_BROKEN_ENDSTOP
//#define DETECT_BROKEN_ENDSTOP
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@ -747,18 +909,29 @@
* Override with M92
* X, Y, Z, E0 [, E1[, E2...]]
*/
#define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 4000, 500 }
#ifndef DEFAULT_AXIS_STEPS_PER_UNIT
#ifdef BMG
#define eSteps 413 //BMG
#else
#ifdef HEMERA
#define eSteps 409 //HEMERA
#else
#define eSteps 445 //STOCK
#endif
#endif
#define DEFAULT_AXIS_STEPS_PER_UNIT { 80.13, 80.18, 400, eSteps }//STOCK
#endif
/**
* Default Max Feed Rate (mm/s)
* Override with M203
* X, Y, Z, E0 [, E1[, E2...]]
*/
#define DEFAULT_MAX_FEEDRATE { 300, 300, 5, 25 }
#define DEFAULT_MAX_FEEDRATE { 300, 300, 50, 70 }
//#define LIMITED_MAX_FR_EDITING // Limit edit via M203 or LCD to DEFAULT_MAX_FEEDRATE * 2
#define LIMITED_MAX_FR_EDITING // Limit edit via M203 or LCD to DEFAULT_MAX_FEEDRATE * 2
#if ENABLED(LIMITED_MAX_FR_EDITING)
#define MAX_FEEDRATE_EDIT_VALUES { 600, 600, 10, 50 } // ...or, set your own edit limits
#define MAX_FEEDRATE_EDIT_VALUES { 300, 300, 50, 70 } // ...or, set your own edit limits
#endif
/**
@ -767,7 +940,7 @@
* Override with M201
* X, Y, Z, E0 [, E1[, E2...]]
*/
#define DEFAULT_MAX_ACCELERATION { 3000, 3000, 100, 10000 }
#define DEFAULT_MAX_ACCELERATION { 3000, 3000, 150, 10000 }
//#define LIMITED_MAX_ACCEL_EDITING // Limit edit via M201 or LCD to DEFAULT_MAX_ACCELERATION * 2
#if ENABLED(LIMITED_MAX_ACCEL_EDITING)
@ -782,9 +955,9 @@
* M204 R Retract Acceleration
* M204 T Travel Acceleration
*/
#define DEFAULT_ACCELERATION 3000 // X, Y, Z and E acceleration for printing moves
#define DEFAULT_RETRACT_ACCELERATION 3000 // E acceleration for retracts
#define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration for travel (non printing) moves
#define DEFAULT_ACCELERATION 800 // X, Y, Z and E acceleration for printing moves
#define DEFAULT_RETRACT_ACCELERATION 10000 // E acceleration for retracts
#define DEFAULT_TRAVEL_ACCELERATION 2000 // X, Y, Z acceleration for travel (non printing) moves
/**
* Default Jerk limits (mm/s)
@ -831,7 +1004,7 @@
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
//#define S_CURVE_ACCELERATION
#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@ -847,11 +1020,10 @@
* The probe replaces the Z-MIN endstop and is used for Z homing.
* (Automatically enables USE_PROBE_FOR_Z_HOMING.)
*/
#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
//#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
// Force the use of the probe for Z-axis homing
//#define USE_PROBE_FOR_Z_HOMING
//#define USE_PROBE_FOR_Z_HOMING
/**
* Z_MIN_PROBE_PIN
*
@ -869,6 +1041,19 @@
*
*/
//#define Z_MIN_PROBE_PIN 32 // Pin 32 is the RAMPS default
#if DISABLED(SKR13) && DISABLED(SKR14)
#if ENABLED(BLTOUCH)
#if ENABLED(WAGGSTER_MOD_WIRING)
#define Z_MIN_PIN 19
#define Z_MAX_PIN 18
#endif
#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
#else
#ifdef ZMIN_SENSOR_AS_PROBE
#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
#endif
#endif
#endif
/**
* Probe Type
@ -889,7 +1074,15 @@
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
* (e.g., an inductive probe or a nozzle-based probe-switch.)
*/
//#define FIX_MOUNTED_PROBE
#ifdef ZMIN_SENSOR_AS_PROBE
#define FIX_MOUNTED_PROBE
#else
//#define FIX_MOUNTED_PROBE
#ifndef BLTOUCH
//#define PROBE_MANUALLY
//#define MANUAL_PROBE_START_Z 0.2//fix keep an eye on new behavior
#endif
#endif
/**
* Use the nozzle as the probe, as with a conductive
@ -906,7 +1099,9 @@
/**
* The BLTouch probe uses a Hall effect sensor and emulates a servo.
*/
//#define BLTOUCH
#ifndef BLTOUCH
//#define BLTOUCH
#endif
/**
* Pressure sensor with a BLTouch-like interface
@ -964,50 +1159,52 @@
//
/**
* Nozzle-to-Probe offsets { X, Y, Z }
* Z Probe to nozzle (X,Y) offset, relative to (0, 0).
*
* - Use a caliper or ruler to measure the distance from the tip of
* the Nozzle to the center-point of the Probe in the X and Y axes.
* - For the Z offset use your best known value and adjust at runtime.
* - Probe Offsets can be tuned at runtime with 'M851', LCD menus, babystepping, etc.
* In the following example the X and Y offsets are both positive:
*
* Assuming the typical work area orientation:
* - Probe to RIGHT of the Nozzle has a Positive X offset
* - Probe to LEFT of the Nozzle has a Negative X offset
* - Probe in BACK of the Nozzle has a Positive Y offset
* - Probe in FRONT of the Nozzle has a Negative Y offset
*
* Some examples:
* #define NOZZLE_TO_PROBE_OFFSET { 10, 10, -1 } // Example "1"
* #define NOZZLE_TO_PROBE_OFFSET {-10, 5, -1 } // Example "2"
* #define NOZZLE_TO_PROBE_OFFSET { 5, -5, -1 } // Example "3"
* #define NOZZLE_TO_PROBE_OFFSET {-15,-10, -1 } // Example "4"
* #define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 }
*
* +-- BACK ---+
* | [+] |
* L | 1 | R <-- Example "1" (right+, back+)
* E | 2 | I <-- Example "2" ( left-, back+)
* F |[-] N [+]| G <-- Nozzle
* T | 3 | H <-- Example "3" (right+, front-)
* | 4 | T <-- Example "4" ( left-, front-)
* | [-] |
* | |
* L | (+) P | R <-- probe (20,20)
* E | | I
* F | (-) N (+) | G <-- nozzle (10,10)
* T | | H
* | (-) | T
* | |
* O-- FRONT --+
* (0,0)
*
* Specify a Probe position as { X, Y, Z }
*/
#define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 }
#ifndef NOZZLE_TO_PROBE_OFFSET
#define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 }
#endif
// Most probes should stay away from the edges of the bed, but
// with NOZZLE_AS_PROBE this can be negative for a wider probing area.
#define PROBING_MARGIN 10
#ifdef NOVA
#define PROBING_MARGIN 20
#else
#ifdef HEMERA
#define PROBING_MARGIN 20
#else
#define PROBING_MARGIN 20
#endif
#endif
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
#define XY_PROBE_SPEED 9000
// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
#ifdef BLTOUCH
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 3)
#else
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
#endif
/**
* Multiple Probing
*
@ -1017,8 +1214,13 @@
* A total of 2 does fast/slow probes with a weighted average.
* A total of 3 or more adds more slow probes, taking the average.
*/
//#define MULTIPLE_PROBING 2
//#define EXTRA_PROBING 1
#ifdef ZMIN_SENSOR_AS_PROBE
#define MULTIPLE_PROBING 2
//#define EXTRA_PROBING 1
#else
//#define MULTIPLE_PROBING 2
//#define EXTRA_PROBING 1
#endif
/**
* Z probes require clearance when deploying, stowing, and moving between
@ -1034,20 +1236,27 @@
* Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle.
* But: `M851 Z+1` with a CLEARANCE of 2 => 2mm from bed to nozzle.
*/
#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_DEPLOY_PROBE 7 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 5 // Z position after probing is done
#define Z_AFTER_PROBING 10 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
#define Z_PROBE_LOW_POINT -3 // Farthest distance below the trigger-point to go before stopping
// For M851 give a range for adjusting the Z probe offset
#define Z_PROBE_OFFSET_RANGE_MIN -20
#define Z_PROBE_OFFSET_RANGE_MAX 20
// Enable the M48 repeatability test to test probe accuracy
//#define Z_MIN_PROBE_REPEATABILITY_TEST
#ifdef BLTOUCH
#define Z_MIN_PROBE_REPEATABILITY_TEST
#else
#ifdef ZMIN_SENSOR_AS_PROBE
#define Z_MIN_PROBE_REPEATABILITY_TEST
#else
//#define Z_MIN_PROBE_REPEATABILITY_TEST
#endif
#endif
// Before deploy/stow pause for user confirmation
//#define PAUSE_BEFORE_DEPLOY_STOW
#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW)
@ -1061,7 +1270,11 @@
* 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
#ifdef ZMIN_SENSOR_AS_PROBE
#define PROBING_HEATERS_OFF // Turn heaters off when probing
#else
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
#endif
#if ENABLED(PROBING_HEATERS_OFF)
//#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
#endif
@ -1076,31 +1289,64 @@
#define Z_ENABLE_ON 0
#define E_ENABLE_ON 0 // For all extruders
// Disable axis steppers immediately when they're not being stepped.
// Disables axis stepper immediately when it's not being used.
// WARNING: When motors turn off there is a chance of losing position accuracy!
#define DISABLE_X false
#define DISABLE_Y false
#define DISABLE_Z false
// Turn off the display blinking that warns about possible accuracy reduction
// Warn on display about possibly reduced accuracy
//#define DISABLE_REDUCED_ACCURACY_WARNING
// @section extruder
#define DISABLE_E false // Disable the extruder when not stepping
#define DISABLE_E false // For all extruders
#define DISABLE_INACTIVE_EXTRUDER // Keep only the active extruder enabled
// @section machine
// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
#define INVERT_X_DIR false
#define INVERT_Y_DIR true
#define INVERT_Z_DIR false
#if ENABLED(TMC_2209) || ENABLED(TMC_2208)
#define INVERT_X_DIR true
#define INVERT_Y_DIR true
#define INVERT_Z_DIR false
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
#ifdef BMG
#define INVERT_E0_DIR false
#else
#ifdef HEMERA
#define INVERT_E0_DIR false
#else
#define INVERT_E0_DIR true
#endif
#endif
#define INVERT_E1_DIR true
#define INVERT_E2_DIR true
#define INVERT_E3_DIR true
#define INVERT_E4_DIR true
#define INVERT_E5_DIR true
#define INVERT_E6_DIR true
#define INVERT_E7_DIR true
#else
#define INVERT_X_DIR false
#define INVERT_Y_DIR false
#define INVERT_Z_DIR true
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
#define INVERT_E0_DIR false
#ifdef BMG
#define INVERT_E0_DIR true //Ryan
#else
#ifdef HEMERA
#define INVERT_E0_DIR true
#else
#define INVERT_E0_DIR false
#endif
#endif
#define INVERT_E1_DIR false
#define INVERT_E2_DIR false
#define INVERT_E3_DIR false
@ -1109,6 +1355,8 @@
#define INVERT_E6_DIR false
#define INVERT_E7_DIR false
#endif
// @section homing
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
@ -1117,9 +1365,11 @@
//#define Z_HOMING_HEIGHT 4 // (mm) Minimal Z height before homing (G28) for Z clearance above the bed, clamps, ...
// Be sure to have this much clearance over your Z_MAX_POS to prevent grinding.
//#define Z_AFTER_HOMING 10 // (mm) Height to move to after homing Z
#ifdef BLTOUCH
#define Z_AFTER_HOMING 10 // (mm) Height to move to after homing Z //fix keep an eye on new behavior
#else
//#define Z_AFTER_HOMING 10 // (mm) Height to move to after homing Z //fix keep an eye on new behavior
#endif
// Direction of endstops when homing; 1=MAX, -1=MIN
// :[-1,1]
#define X_HOME_DIR -1
@ -1129,16 +1379,30 @@
// @section machine
// The size of the print bed
#define X_BED_SIZE 200
#define Y_BED_SIZE 200
#ifndef NOZZLE_X_OFFSET
#define NOZZLE_X_OFFSET 0
#endif
#ifdef GENIUS
#define X_BED_SIZE (226 - NOZZLE_X_OFFSET)
#define Y_BED_SIZE 226
#else
#define X_BED_SIZE (308 - NOZZLE_X_OFFSET)
#define Y_BED_SIZE 308
#endif
// Travel limits (mm) after homing, corresponding to endstop positions.
#define X_MIN_POS 0
#define X_MIN_POS -NOZZLE_X_OFFSET
#define Y_MIN_POS 0
#define Z_MIN_POS 0
#define X_MAX_POS X_BED_SIZE
#define Y_MAX_POS Y_BED_SIZE
#define Z_MAX_POS 200
#ifdef GENIUS
#define Z_MAX_POS 250
#else
#define Z_MAX_POS 400
#endif
/**
* Software Endstops
@ -1176,7 +1440,7 @@
* RAMPS-based boards use SERVO3_PIN for the first runout sensor.
* For other boards you may need to define FIL_RUNOUT_PIN, FIL_RUNOUT2_PIN, etc.
*/
//#define FILAMENT_RUNOUT_SENSOR
#define FILAMENT_RUNOUT_SENSOR
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
#define NUM_RUNOUT_SENSORS 1 // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each.
#define FIL_RUNOUT_STATE LOW // Pin state indicating that filament is NOT present.
@ -1240,7 +1504,19 @@
*/
//#define AUTO_BED_LEVELING_3POINT
//#define AUTO_BED_LEVELING_LINEAR
//#define AUTO_BED_LEVELING_BILINEAR
#ifdef BLTOUCH
//#define AUTO_BED_LEVELING_UBL
#define AUTO_BED_LEVELING_BILINEAR
#else
#ifdef ZMIN_SENSOR_AS_PROBE
#define AUTO_BED_LEVELING_BILINEAR
#else
#define MESH_BED_LEVELING
#ifdef MESH_BED_LEVELING
#define BABYSTEP_MBL_Z_OFFSET
#endif
#endif
#endif//
//#define AUTO_BED_LEVELING_UBL
//#define MESH_BED_LEVELING
@ -1248,14 +1524,14 @@
* Normally G28 leaves leveling disabled on completion. Enable
* this option to have G28 restore the prior leveling state.
*/
//#define RESTORE_LEVELING_AFTER_G28
#define RESTORE_LEVELING_AFTER_G28
/**
* Enable detailed logging of G28, G29, M48, etc.
* Turn on with the command 'M111 S32'.
* NOTE: Requires a lot of PROGMEM!
*/
//#define DEBUG_LEVELING_FEATURE
#define DEBUG_LEVELING_FEATURE
#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL)
// Gradually reduce leveling correction until a set height is reached,
@ -1272,7 +1548,7 @@
/**
* Enable the G26 Mesh Validation Pattern tool.
*/
//#define G26_MESH_VALIDATION
#define G26_MESH_VALIDATION
#if ENABLED(G26_MESH_VALIDATION)
#define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle.
#define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for the G26 Mesh Validation Tool.
@ -1287,7 +1563,7 @@
#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR)
// Set the number of grid points per dimension.
#define GRID_MAX_POINTS_X 3
#define GRID_MAX_POINTS_X 5
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
// Probe along the Y axis, advancing X after each column
@ -1297,7 +1573,7 @@
// Beyond the probed grid, continue the implied tilt?
// Default is to maintain the height of the nearest edge.
//#define EXTRAPOLATE_BEYOND_GRID
#define EXTRAPOLATE_BEYOND_GRID
//
// Experimental Subdivision of the grid by Catmull-Rom method.
@ -1319,14 +1595,14 @@
//#define MESH_EDIT_GFX_OVERLAY // Display a graphics overlay while editing the mesh
#define MESH_INSET 1 // Set Mesh bounds as an inset region of the bed
#define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
#define MESH_INSET 4 // Set Mesh bounds as an inset region of the bed
#define GRID_MAX_POINTS_X 7 // Don't use more than 15 points per axis, implementation limited.
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle
#define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500
//#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used
#define UBL_Z_RAISE_WHEN_OFF_MESH 0//2.5 // When the nozzle is off the mesh, this value is used
// as the Z-Height correction value.
#elif ENABLED(MESH_BED_LEVELING)
@ -1336,7 +1612,7 @@
//===========================================================================
#define MESH_INSET 10 // Set Mesh bounds as an inset region of the bed
#define GRID_MAX_POINTS_X 3 // Don't use more than 7 points per axis, implementation limited.
#define GRID_MAX_POINTS_X 5 // Don't use more than 7 points per axis, implementation limited.
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
//#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
@ -1356,20 +1632,24 @@
#endif
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
#if ENABLED(GraphicalLCD)
#define LEVEL_BED_CORNERS
#endif
#if ENABLED(LEVEL_BED_CORNERS)
#define LEVEL_CORNERS_INSET_LFRB { 30, 30, 30, 30 } // (mm) Left, Front, Right, Back insets
#define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points
#define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Z height of nozzle between leveling points
//#define LEVEL_CENTER_TOO // Move to the center after the last corner
#define LEVEL_CENTER_TOO // Move to the center after the last corner
#endif
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
*/
//#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10"
#ifdef BLTOUCH
//#define Z_PROBE_END_SCRIPT "G90\nG1 Z10 F3000\nG1 F9000 X2 Y2\n" //G1 Z0.5\nG1 Z10"
#endif
// @section homing
@ -1391,16 +1671,22 @@
// - Move the Z probe (or nozzle) to a defined XY point before Z Homing.
// - Prevent Z homing when the Z probe is outside bed area.
//
//#define Z_SAFE_HOMING
#ifdef BLTOUCH
#define Z_SAFE_HOMING
#endif
#ifdef ZMIN_SENSOR_AS_PROBE
#define Z_SAFE_HOMING
#endif
#if ENABLED(Z_SAFE_HOMING)
#define Z_SAFE_HOMING_X_POINT X_CENTER // X point for Z homing
#define Z_SAFE_HOMING_Y_POINT Y_CENTER // Y point for Z homing
#define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axes (G28).
#define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axes (G28).
#endif
// Homing speeds (mm/m)
#define HOMING_FEEDRATE_XY (50*60)
#define HOMING_FEEDRATE_Z (4*60)
#define HOMING_FEEDRATE_XY (60*60)
#define HOMING_FEEDRATE_Z (20*60)
// Validate that endstops are triggered on homing moves
#define VALIDATE_HOMING_ENDSTOPS
@ -1459,7 +1745,7 @@
#endif
// Enable this option for M852 to set skew at runtime
//#define SKEW_CORRECTION_GCODE
#define SKEW_CORRECTION_GCODE
#endif
//=============================================================================
@ -1477,10 +1763,10 @@
* M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes)
* M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.)
*/
//#define EEPROM_SETTINGS // Persistent storage with M500 and M501
#define EEPROM_SETTINGS // Persistent storage with M500 and M501
//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release!
#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM.
#define EEPROM_BOOT_SILENT // Keep M503 quiet and only give errors during first load
//#define EEPROM_BOOT_SILENT // Keep M503 quiet and only give errors during first load
#if ENABLED(EEPROM_SETTINGS)
//#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors.
#endif
@ -1529,11 +1815,11 @@
* P1 Raise the nozzle always to Z-park height.
* P2 Raise the nozzle by Z-park amount, limited to Z_MAX_POS.
*/
//#define NOZZLE_PARK_FEATURE
#define NOZZLE_PARK_FEATURE
#if ENABLED(NOZZLE_PARK_FEATURE)
// Specify a park position as { X, Y, Z_raise }
#define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 }
#define NOZZLE_PARK_POINT { (X_MIN_POS + 2), (Y_MAX_POS - 30), 50 }
//#define NOZZLE_PARK_X_ONLY // X move only is required to park
//#define NOZZLE_PARK_Y_ONLY // Y move only is required to park
#define NOZZLE_PARK_Z_RAISE_MIN 2 // (mm) Always raise Z by at least this distance
@ -1698,7 +1984,9 @@
* you must uncomment the following option or it won't work.
*
*/
//#define SDSUPPORT
#if ENABLED(GraphicalLCD)
#define SDSUPPORT
#endif
/**
* SD CARD: SPI SPEED
@ -1724,8 +2012,7 @@
* just remove some extraneous menu items to recover space.
*/
//#define NO_LCD_MENUS
//#define SLIM_LCD_MENUS
#define SLIM_LCD_MENUS
//
// ENCODER SETTINGS
//
@ -1786,7 +2073,7 @@
// If you have a speaker that can produce tones, enable it here.
// By default Marlin assumes you have a buzzer with a fixed frequency.
//
//#define SPEAKER
#define SPEAKER
//
// The duration and frequency for the UI feedback sound.
@ -1809,8 +2096,9 @@
//
// Note: Usually sold with a white PCB.
//
//#define REPRAP_DISCOUNT_SMART_CONTROLLER
#if DISABLED(GraphicalLCD)
#define REPRAP_DISCOUNT_SMART_CONTROLLER
#endif
//
// Original RADDS LCD Display+Encoder+SDCardReader
// http://doku.radds.org/dokumentation/lcd-display/
@ -1951,7 +2239,9 @@
// RepRapDiscount FULL GRAPHIC Smart Controller
// https://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
//
//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
#if ENABLED(GraphicalLCD)
#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
#endif
//
// ReprapWorld Graphical LCD
@ -2089,7 +2379,7 @@
//#define OLED_PANEL_TINYBOY2
//
// MKS OLED 1.3" 128×64 FULL GRAPHICS CONTROLLER
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// https://reprap.org/wiki/MKS_12864OLED
//
// Tiny, but very sharp OLED display
@ -2097,13 +2387,6 @@
//#define MKS_12864OLED // Uses the SH1106 controller (default)
//#define MKS_12864OLED_SSD1306 // Uses the SSD1306 controller
//
// Zonestar OLED 128×64 FULL GRAPHICS CONTROLLER
//
//#define ZONESTAR_12864LCD // Graphical (DOGM) with ST7920 controller
//#define ZONESTAR_12864OLED // 1.3" OLED with SH1106 controller (default)
//#define ZONESTAR_12864OLED_SSD1306 // 0.96" OLED with SSD1306 controller
//
// Einstart S OLED SSD1306
//
@ -2115,7 +2398,7 @@
//#define OVERLORD_OLED
//
// FYSETC OLED 2.42" 128×64 FULL GRAPHICS CONTROLLER with WS2812 RGB
// FYSETC OLED 2.42" 128 × 64 FULL GRAPHICS CONTROLLER with WS2812 RGB
// Where to find : https://www.aliexpress.com/item/4000345255731.html
//#define FYSETC_242_OLED_12864 // Uses the SSD1309 controller
@ -2143,16 +2426,6 @@
//
//#define TOUCH_UI_FTDI_EVE
//
// Touch-screen LCD for Anycubic printers
//
//#define ANYCUBIC_LCD_I3MEGA
//#define ANYCUBIC_LCD_CHIRON
#if EITHER(ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON)
#define ANYCUBIC_LCD_SERIAL_PORT 3
//#define ANYCUBIC_LCD_DEBUG
#endif
//
// Third-party or vendor-customized controller interfaces.
// Sources should be installed in 'src/lcd/extensible_ui'.
@ -2167,28 +2440,6 @@
//=============================== Graphical TFTs ==============================
//=============================================================================
//
// TFT display with optional touch screen
// Color Marlin UI with standard menu system
//
//#define TFT_320x240
//#define TFT_320x240_SPI
//#define TFT_480x320
//#define TFT_480x320_SPI
//
// Skip autodetect and force specific TFT driver
// Mandatory for SPI screens with no MISO line
// Available drivers are: ST7735, ST7789, ST7796, R61505, ILI9328, ILI9341, ILI9488
//
//#define TFT_DRIVER AUTO
//
// SPI display (MKS Robin Nano V2.0, MKS Gen L V2.0)
// Upscaled 128x64 Marlin UI
//
//#define SPI_GRAPHICAL_TFT
//
// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.)
// Upscaled 128x64 Marlin UI
@ -2205,6 +2456,12 @@
//#define TFT_LVGL_UI_FSMC // Robin nano v1.2 uses FSMC
//#define TFT_LVGL_UI_SPI // Robin nano v2.0 uses SPI
//
// Anycubic Mega TFT (AI3M)
//
//#define ANYCUBIC_TFT_MODEL
//#define ANYCUBIC_TFT_DEBUG
//=============================================================================
//============================ Other Controllers ============================
//=============================================================================
@ -2217,22 +2474,20 @@
//
// ADS7843/XPT2046 ADC Touchscreen such as ILI9341 2.8
//
//#define TOUCH_SCREEN
#if ENABLED(TOUCH_SCREEN)
//#define TOUCH_BUTTONS
#if ENABLED(TOUCH_BUTTONS)
#define BUTTON_DELAY_EDIT 50 // (ms) Button repeat delay for edit screens
#define BUTTON_DELAY_MENU 250 // (ms) Button repeat delay for menus
#define TOUCH_SCREEN_CALIBRATION
//#define XPT2046_X_CALIBRATION 12316
//#define XPT2046_Y_CALIBRATION -8981
//#define XPT2046_X_OFFSET -43
//#define XPT2046_Y_OFFSET 257
#define XPT2046_X_CALIBRATION 12316
#define XPT2046_Y_CALIBRATION -8981
#define XPT2046_X_OFFSET -43
#define XPT2046_Y_OFFSET 257
#endif
//
// RepRapWorld REPRAPWORLD_KEYPAD v1.1
// https://reprapworld.com/products/electronics/ramps/keypad_v1_0_fully_assembled/
// https://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
//
//#define REPRAPWORLD_KEYPAD
//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 // (mm) Distance to move per key-press
@ -2306,14 +2561,16 @@
* LED Type. Enable only one of the following two options.
*
*/
//#define RGB_LED
#if DISABLED(BLTOUCH) || ENABLED(SKR13) || ENABLED(SKR14) || DISABLED(DISABLE_LED)
#define RGB_LED
#endif
//#define RGBW_LED
#if EITHER(RGB_LED, RGBW_LED)
//#define RGB_LED_R_PIN 34
//#define RGB_LED_G_PIN 43
//#define RGB_LED_B_PIN 35
//#define RGB_LED_W_PIN -1
#define RGB_LED_R_PIN 5
#define RGB_LED_G_PIN 4
#define RGB_LED_B_PIN 6
#define RGB_LED_W_PIN -1
#endif
// Support for Adafruit Neopixel LED driver
@ -2360,7 +2617,7 @@
* Set this manually if there are extra servos needing manual control.
* Leave undefined or set to 0 to entirely disable the servo subsystem.
*/
//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
//#define NUM_SERVOS 1 // Servo index starts with 0 for M280 command
// (ms) Delay before the next move will start, to give the servo time to reach its target angle.
// 300ms is a good value but you can try less delay.

View File

@ -58,7 +58,11 @@
#if TEMP_SENSOR_0 == 1000
#define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor
#define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C
#define HOTEND0_BETA 3950 // Beta value
#ifdef NOVA
#define HOTEND0_BETA 4267 // Beta value
#else
#define HOTEND0_BETA 3950 // Beta value
#endif
#endif
#if TEMP_SENSOR_1 == 1000
@ -163,11 +167,11 @@
*/
#if ENABLED(THERMAL_PROTECTION_HOTENDS)
#define THERMAL_PROTECTION_PERIOD 40 // Seconds
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
#define THERMAL_PROTECTION_HYSTERESIS 10 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
#if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP)
//#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
#endif
/**
@ -347,9 +351,9 @@
* Hotend Idle Timeout
* Prevent filament in the nozzle from charring and causing a critical jam.
*/
//#define HOTEND_IDLE_TIMEOUT
#define HOTEND_IDLE_TIMEOUT
#if ENABLED(HOTEND_IDLE_TIMEOUT)
#define HOTEND_IDLE_TIMEOUT_SEC (5*60) // (seconds) Time without extruder movement to trigger protection
#define HOTEND_IDLE_TIMEOUT_SEC (10*60) // (seconds) Time without extruder movement to trigger protection
#define HOTEND_IDLE_MIN_TRIGGER 180 // (°C) Minimum temperature to enable hotend protection
#define HOTEND_IDLE_NOZZLE_TARGET 0 // (°C) Safe temperature for the nozzle after timeout
#define HOTEND_IDLE_BED_TARGET 0 // (°C) Safe temperature for the bed after timeout
@ -450,7 +454,15 @@
* Multiple extruders can be assigned to the same pin in which case
* the fan will turn on when any selected extruder is above the threshold.
*/
#define E0_AUTO_FAN_PIN -1
#if ENABLED(SKR13)
#define E0_AUTO_FAN_PIN P2_04
#else
#if ENABLED(SKR14)
#define E0_AUTO_FAN_PIN FAN1_PIN
#else
#define E0_AUTO_FAN_PIN 7
#endif
#endif
#define E1_AUTO_FAN_PIN -1
#define E2_AUTO_FAN_PIN -1
#define E3_AUTO_FAN_PIN -1
@ -460,7 +472,11 @@
#define E7_AUTO_FAN_PIN -1
#define CHAMBER_AUTO_FAN_PIN -1
#define EXTRUDER_AUTO_FAN_TEMPERATURE 50
#ifdef NOVA
#define EXTRUDER_AUTO_FAN_TEMPERATURE 120
#else
#define EXTRUDER_AUTO_FAN_TEMPERATURE 50
#endif
#define EXTRUDER_AUTO_FAN_SPEED 255 // 255 == full speed
#define CHAMBER_AUTO_FAN_TEMPERATURE 30
#define CHAMBER_AUTO_FAN_SPEED 255
@ -549,7 +565,7 @@
//
// For Z set the number of stepper drivers
//
#define NUM_Z_STEPPER_DRIVERS 1 // (1-4) Z options change based on how many
#define NUM_Z_STEPPER_DRIVERS 2 // (1-4) Z options change based on how many
#if NUM_Z_STEPPER_DRIVERS > 1
//#define Z_MULTI_ENDSTOPS
@ -629,12 +645,12 @@
//#define SENSORLESS_BACKOFF_MM { 2, 2 } // (mm) Backoff from endstops before sensorless homing
#define HOMING_BUMP_MM { 5, 5, 2 } // (mm) Backoff from endstops after first bump
#define HOMING_BUMP_MM { 2, 2, 2 } // (mm) Backoff from endstops after first bump
#define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate)
//#define HOMING_BACKOFF_POST_MM { 2, 2, 2 } // (mm) Backoff from endstops after homing
//#define QUICK_HOME // If G28 contains XY do a diagonal move first
#define QUICK_HOME // If G28 contains XY do a diagonal move first
//#define HOME_Y_BEFORE_X // If G28 contains XY home Y before X
//#define CODEPENDENT_XY_HOMING // If X/Y can't home without homing Y/X first
@ -658,7 +674,7 @@
// Safety: The probe needs time to recognize the command.
// Minimum command delay (ms). Enable and increase if needed.
//#define BLTOUCH_DELAY 500
#define BLTOUCH_DELAY 200
/**
* Settings for BLTOUCH Classic 1.2, 1.3 or BLTouch Smart 1.0, 2.0, 2.2, 3.0, 3.1, and most clones:
@ -680,11 +696,11 @@
* Danger: Don't activate 5V mode unless attached to a 5V-tolerant controller!
* V3.0 or 3.1: Set default mode to 5V mode at Marlin startup.
* If disabled, OD mode is the hard-coded default on 3.0
* On startup, Marlin will compare its eeprom to this value. If the selected mode
* On startup, Marlin will compare its eeprom to this vale. If the selected mode
* differs, a mode set eeprom write will be completed at initialization.
* Use the option below to force an eeprom write to a V3.1 probe regardless.
*/
//#define BLTOUCH_SET_5V_MODE
#define BLTOUCH_SET_5V_MODE
/**
* Safety: Activate if connecting a probe with an unknown voltage mode.
@ -700,7 +716,7 @@
* This feature was designed for Delta's with very fast Z moves however higher speed cartesians may function
* If the machine cannot raise the probe fast enough after a trigger, it may enter a fault state.
*/
//#define BLTOUCH_HS_MODE
#define BLTOUCH_HS_MODE
// Safety: Enable voltage mode settings in the LCD menu.
//#define BLTOUCH_LCD_VOLTAGE_MENU
@ -713,7 +729,9 @@
* Z Steppers Auto-Alignment
* Add the G34 command to align multiple Z steppers using a bed probe.
*/
//#define Z_STEPPER_AUTO_ALIGN
#if ENABLED(BLTOUCH) //insanityautomation mod
//#define Z_STEPPER_AUTO_ALIGN
#endif
#if ENABLED(Z_STEPPER_AUTO_ALIGN)
// Define probe X and Y positions for Z1, Z2 [, Z3 [, Z4]]
// If not defined, probe limits will be used.
@ -759,7 +777,7 @@
#endif
// On a 300mm bed a 5% grade would give a misalignment of ~1.5cm
#define G34_MAX_GRADE 5 // (%) Maximum incline that G34 will handle
#define G34_MAX_GRADE 1 // (%) Maximum incline that G34 will handle
#define Z_STEPPER_ALIGN_ITERATIONS 5 // Number of iterations to apply during alignment
#define Z_STEPPER_ALIGN_ACC 0.02 // Stop iterating early if the accuracy is better than this
#define RESTORE_LEVELING_AFTER_G34 // Restore leveling after G34 is done?
@ -769,7 +787,7 @@
#endif
//
// Add the G35 command to read bed corners to help adjust screws. Requires a bed probe.
// Add the G35 command to read bed corners to help adjust screws.
//
//#define ASSISTED_TRAMMING
#if ENABLED(ASSISTED_TRAMMING)
@ -809,30 +827,24 @@
#define INVERT_Z_STEP_PIN false
#define INVERT_E_STEP_PIN false
/**
* Idle Stepper Shutdown
* Set DISABLE_INACTIVE_? 'true' to shut down axis steppers after an idle period.
* The Deactive Time can be overridden with M18 and M84. Set to 0 for No Timeout.
*/
// Default stepper release if idle. Set to 0 to deactivate.
// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true.
// Time can be set by M18 and M84.
#define DEFAULT_STEPPER_DEACTIVE_TIME 120
#define DISABLE_INACTIVE_X true
#define DISABLE_INACTIVE_Y true
#define DISABLE_INACTIVE_Z true // Set 'false' if the nozzle could fall onto your printed part!
#define DISABLE_INACTIVE_Z true // Set to false if the nozzle will fall down on your printed part when print has finished.
#define DISABLE_INACTIVE_E true
// If the Nozzle or Bed falls when the Z stepper is disabled, set its resting position here.
//#define Z_AFTER_DEACTIVATE Z_HOME_POS
#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate
#define DEFAULT_MINTRAVELFEEDRATE 0.0
//#define HOME_AFTER_DEACTIVATE // Require rehoming after steppers are deactivated
// Minimum time that a segment needs to take as the buffer gets emptied
#define DEFAULT_MINSEGMENTTIME 20000 // (µs) Set with M205 B.
// Minimum time that a segment needs to take if the buffer is emptied
#define DEFAULT_MINSEGMENTTIME 30000 // (µs)
// Default Minimum Feedrates for printing and travel moves
#define DEFAULT_MINIMUMFEEDRATE 0.0 // (mm/s) Minimum feedrate. Set with M205 S.
#define DEFAULT_MINTRAVELFEEDRATE 0.0 // (mm/s) Minimum travel feedrate. Set with M205 T.
// Slow down the machine if the lookahead buffer is (by default) half full.
// Slow down the machine if the look ahead buffer is (by default) half full.
// Increase the slowdown divisor for larger buffer sizes.
#define SLOWDOWN
#if ENABLED(SLOWDOWN)
@ -871,7 +883,7 @@
//#define BACKLASH_SMOOTHING_MM 3 // (mm)
// Add runtime configuration and tuning of backlash values (M425)
//#define BACKLASH_GCODE
#define BACKLASH_GCODE
#if ENABLED(BACKLASH_GCODE)
// Measure the Z backlash when probing (G29) and set with "M425 Z"
@ -950,7 +962,7 @@
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
* lowest stepping frequencies.
*/
//#define ADAPTIVE_STEP_SMOOTHING
#define ADAPTIVE_STEP_SMOOTHING
/**
* Custom Microstepping
@ -1025,7 +1037,7 @@
// @section lcd
#if EITHER(ULTIPANEL, EXTENSIBLE_UI)
#define MANUAL_FEEDRATE { 50*60, 50*60, 4*60, 2*60 } // Feedrates for manual moves along X, Y, Z, E from panel
#define MANUAL_FEEDRATE { 50*60, 50*60, 4*60, 60 } // Feedrates for manual moves along X, Y, Z, E from panel
#define SHORT_MANUAL_Z_MOVE 0.025 // (mm) Smallest manual Z move (< 0.1mm)
#if ENABLED(ULTIPANEL)
#define MANUAL_E_MOVES_RELATIVE // Display extruder move distance rather than "position"
@ -1078,38 +1090,48 @@
#endif // HAS_LCD_MENU
// Scroll a longer status message into view
//#define STATUS_MESSAGE_SCROLLING
#if ENABLED(GraphicalLCD)
#define STATUS_MESSAGE_SCROLLING
#endif
// On the Info Screen, display XY with one decimal place when possible
//#define LCD_DECIMAL_SMALL_XY
// The timeout (in ms) to return to the status screen from sub-menus
//#define LCD_TIMEOUT_TO_STATUS 15000
#define LCD_TIMEOUT_TO_STATUS 15000
// Add an 'M73' G-code to set the current percentage
//#define LCD_SET_PROGRESS_MANUALLY
#ifdef REPRAP_DISCOUNT_SMART_CONTROLLER
#define LCD_SET_PROGRESS_MANUALLY
#endif
// Show the E position (filament used) during printing
//#define LCD_SHOW_E_TOTAL
#if ENABLED(GraphicalLCD)
#define LCD_SHOW_E_TOTAL
#endif
#if ENABLED(SHOW_BOOTSCREEN)
#define BOOTSCREEN_TIMEOUT 4000 // (ms) Total Duration to display the boot screen(s)
#define BOOTSCREEN_TIMEOUT 2000 // (ms) Total Duration to display the boot screen(s)
#endif
#if HAS_GRAPHICAL_LCD && EITHER(SDSUPPORT, LCD_SET_PROGRESS_MANUALLY)
//#define PRINT_PROGRESS_SHOW_DECIMALS // Show progress with decimal digits
//#define SHOW_REMAINING_TIME // Display estimated time to completion
#if ENABLED(SHOW_REMAINING_TIME)
//#define USE_M73_REMAINING_TIME // Use remaining time from M73 command instead of estimation
#define USE_M73_REMAINING_TIME // Use remaining time from M73 command instead of estimation
//#define ROTATE_PROGRESS_DISPLAY // Display (P)rogress, (E)lapsed, and (R)emaining time
#endif
#endif
#if HAS_CHARACTER_LCD && EITHER(SDSUPPORT, LCD_SET_PROGRESS_MANUALLY)
//#define LCD_PROGRESS_BAR // Show a progress bar on HD44780 LCDs for SD printing
#define LCD_PROGRESS_BAR // Show a progress bar on HD44780 LCDs for SD printing
#if ENABLED(LCD_PROGRESS_BAR)
#if ENABLED(GraphicalLCD)
#define PROGRESS_BAR_BAR_TIME 2000 // (ms) Amount of time to show the bar
#define PROGRESS_BAR_MSG_TIME 3000 // (ms) Amount of time to show the status message
#else
#define PROGRESS_BAR_BAR_TIME 0 // (ms) Amount of time to show the bar
#define PROGRESS_BAR_MSG_TIME 0 // (ms) Amount of time to show the status message
#endif
#define PROGRESS_MSG_EXPIRE 0 // (ms) Amount of time to retain the status message (0=forever)
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
@ -1120,7 +1142,7 @@
// The standard SD detect circuit reads LOW when media is inserted and HIGH when empty.
// Enable this option and set to HIGH if your SD cards are incorrectly detected.
//#define SD_DETECT_STATE HIGH
#define SD_DETECT_STATE HIGH
//#define SDCARD_READONLY // Read-only SD card (to save over 2K of flash)
@ -1137,7 +1159,7 @@
//#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files
#define EVENT_GCODE_SD_STOP "G28XY" // G-code to run on Stop Print (e.g., "G28XY" or "G27")
#define EVENT_GCODE_SD_STOP "G1 X0 Y220" // G-code to run on Stop Print (e.g., "G28XY" or "G27")
#if ENABLED(PRINTER_EVENT_LEDS)
#define PE_LEDS_COMPLETED_TIME (30*60) // (seconds) Time to keep the LED "done" color before restoring normal illumination
@ -1205,12 +1227,14 @@
// Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM.
#endif
#if ENABLED(GraphicalLCD)
// This allows hosts to request long names for files and folders with M33
//#define LONG_FILENAME_HOST_SUPPORT
#define LONG_FILENAME_HOST_SUPPORT
// Enable this option to scroll long filenames in the SD card menu
//#define SCROLL_LONG_FILENAMES
#define SCROLL_LONG_FILENAMES
#endif
// Leave the heaters on after Stop Print (not recommended!)
//#define SD_ABORT_NO_COOLDOWN
@ -1231,7 +1255,7 @@
/**
* Auto-report SdCard status with M27 S<seconds>
*/
//#define AUTO_REPORT_SD_STATUS
#define AUTO_REPORT_SD_STATUS
/**
* Support for USB thumb drives using an Arduino USB Host Shield or
@ -1320,16 +1344,17 @@
//#define DOGM_SD_PERCENT
// Save many cycles by drawing a hollow frame or no frame on the Info Screen
//#define XYZ_NO_FRAME
#define XYZ_HOLLOW_FRAME
#define XYZ_NO_FRAME
//#define XYZ_HOLLOW_FRAME
// Enable to save many cycles by drawing a hollow frame on Menu Screens
#define MENU_HOLLOW_FRAME
// A bigger font is available for edit items. Costs 3120 bytes of PROGMEM.
// Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese.
//#define USE_BIG_EDIT_FONT
#if ENABLED(GraphicalLCD)
#define USE_BIG_EDIT_FONT
#endif
// A smaller font may be used on the Info Screen. Costs 2300 bytes of PROGMEM.
// Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese.
//#define USE_SMALL_INFOFONT
@ -1515,10 +1540,9 @@
#endif
//
// FSMC / SPI Graphical TFT
// FSMC Graphical TFT
//
#if TFT_SCALED_DOGLCD
//#define GRAPHICAL_TFT_ROTATE_180
#if ENABLED(FSMC_GRAPHICAL_TFT)
//#define TFT_MARLINUI_COLOR 0xFFFF // White
//#define TFT_MARLINBG_COLOR 0x0000 // Black
//#define TFT_DISABLED_COLOR 0x0003 // Almost black
@ -1559,21 +1583,22 @@
*
* Warning: Does not respect endstops!
*/
//#define BABYSTEPPING
#define BABYSTEPPING
#if ENABLED(BABYSTEPPING)
//#define INTEGRATED_BABYSTEPPING // EXPERIMENTAL integration of babystepping into the Stepper ISR
//#define BABYSTEP_WITHOUT_HOMING
#define INTEGRATED_BABYSTEPPING // EXPERIMENTAL integration of babystepping into the Stepper ISR //.fix disable for stutter?
#define BABYSTEP_WITHOUT_HOMING
//#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA!
#define BABYSTEP_INVERT_Z false // Change if Z babysteps should go the other way
//#define BABYSTEP_MILLIMETER_UNITS // Specify BABYSTEP_MULTIPLICATOR_(XY|Z) in mm instead of micro-steps
#define BABYSTEP_MULTIPLICATOR_Z 1 // (steps or mm) Steps or millimeter distance for each Z babystep
#define BABYSTEP_MULTIPLICATOR_XY 1 // (steps or mm) Steps or millimeter distance for each XY babystep
#define BABYSTEP_MULTIPLICATOR_Z 1 // Babysteps are very small. Increase for faster motion.
#define BABYSTEP_MULTIPLICATOR_XY 1
//#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
#if ENABLED(GraphicalLCD)
#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
#endif
#if ENABLED(DOUBLECLICK_FOR_Z_BABYSTEPPING)
#define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
// Note: Extra time may be added to mitigate controller latency.
//#define BABYSTEP_ALWAYS_AVAILABLE // Allow babystepping at all times (not just during movement).
#define BABYSTEP_ALWAYS_AVAILABLE // Allow babystepping at all times (not just during movement).
//#define MOVE_Z_WHEN_IDLE // Jump to the move Z menu on doubleclick when printer is idle.
#if ENABLED(MOVE_Z_WHEN_IDLE)
#define MOVE_Z_IDLE_MULTIPLICATOR 1 // Multiply 1mm by this factor for the move step size.
@ -1582,10 +1607,21 @@
//#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28
//#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping
#ifdef BLTOUCH
#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping
#else
#ifdef ZMIN_SENSOR_AS_PROBE
#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping
#else
//#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping
#endif
#endif
#if ENABLED(BABYSTEP_ZPROBE_OFFSET)
//#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets
//#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
#if ENABLED(GraphicalLCD)
#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
#endif
#endif
#endif
@ -1606,12 +1642,12 @@
*
* See https://marlinfw.org/docs/features/lin_advance.html for full instructions.
*/
//#define LIN_ADVANCE
#define LIN_ADVANCE
#if ENABLED(LIN_ADVANCE)
//#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants
#define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed
#define LIN_ADVANCE_K 0.13 // Unit: mm compression per 1mm/s extruder speed
//#define LA_DEBUG // If enabled, this will generate debug information output over USB.
//#define EXPERIMENTAL_SCURVE // Enable this option to permit S-Curve Acceleration
#define EXPERIMENTAL_SCURVE // Enable this option to permit S-Curve Acceleration
#endif
// @section leveling
@ -1754,7 +1790,7 @@
#define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle
//#define ARC_SEGMENTS_PER_SEC 50 // Use feedrate to choose segment length (with MM_PER_ARC_SEGMENT as the minimum)
#define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections
//#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles
#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles
//#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes
#endif
@ -1800,8 +1836,8 @@
*
* Override the default value based on the driver type set in Configuration.h.
*/
//#define MINIMUM_STEPPER_POST_DIR_DELAY 650
//#define MINIMUM_STEPPER_PRE_DIR_DELAY 650
//#define MINIMUM_STEPPER_POST_DIR_DELAY 20
//#define MINIMUM_STEPPER_PRE_DIR_DELAY 20
/**
* Minimum stepper driver pulse width (in µs)
@ -1814,7 +1850,7 @@
*
* Override the default value based on the driver type set in Configuration.h.
*/
//#define MINIMUM_STEPPER_PULSE 2
#define MINIMUM_STEPPER_PULSE 0
/**
* Maximum stepping rate (in Hz) the stepper driver allows
@ -1855,7 +1891,7 @@
// The ASCII buffer for serial input
#define MAX_CMD_SIZE 96
#define BUFSIZE 4
#define BUFSIZE 16
// Transmission to Host Buffer Size
// To save 386 bytes of PROGMEM (and TX_BUFFER_SIZE+3 bytes of RAM) set to 0.
@ -1864,13 +1900,13 @@
// For debug-echo: 128 bytes for the optimal speed.
// Other output doesn't need to be that speedy.
// :[0, 2, 4, 8, 16, 32, 64, 128, 256]
#define TX_BUFFER_SIZE 0
#define TX_BUFFER_SIZE 64
// Host Receive Buffer Size
// Without XON/XOFF flow control (see SERIAL_XON_XOFF below) 32 bytes should be enough.
// To use flow control, set this buffer size to at least 1024 bytes.
// :[0, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048]
//#define RX_BUFFER_SIZE 1024
#define RX_BUFFER_SIZE 256
#if RX_BUFFER_SIZE >= 1024
// Enable to have the controller send XON/XOFF control characters to
@ -1899,23 +1935,43 @@
* Currently handles M108, M112, M410, M876
* NOTE: Not yet implemented for all platforms.
*/
//#define EMERGENCY_PARSER
#if DISABLED(SKR14) && DISABLED(SKR13)
#define EMERGENCY_PARSER
#endif
/**
* Universal Emergency Command Parser
*
* Add a low-level parser to intercept ANY command as it
* enters the serial receive buffer, so it cannot be blocked.
* Precede any gcode line with '!' to bypass all commands
* currently in the buffer. ex. "!M290 Z0.1\n!M290\n"
* Each command in a stacked line must begin with '!' to be processed.
* If you overlflow the EMERGENCY_BYPASS_QUEUE_SIZE new commands will be ignored.
* Wait for "ok" to send again if you overflow.
*/
#ifdef EMERGENCY_PARSER
#define EMERGENCY_BYPASS
#ifdef EMERGENCY_BYPASS
#define EMERGENCY_BYPASS_QUEUE_SIZE 5
#endif
#endif
// Bad Serial-connections can miss a received command by sending an 'ok'
// Therefore some clients abort after 30 seconds in a timeout.
// Some other clients start sending commands while receiving a 'wait'.
// This "wait" is only sent when the buffer is empty. 1 second is a good value here.
//#define NO_TIMEOUTS 1000 // Milliseconds
#define NO_TIMEOUTS 1000 // Milliseconds
// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary.
//#define ADVANCED_OK
#define ADVANCED_OK
// Printrun may have trouble receiving long strings all at once.
// This option inserts short delays between lines of serial output.
#define SERIAL_OVERRUN_PROTECTION
// For serial echo, the number of digits after the decimal point
//#define SERIAL_FLOAT_PRECISION 4
#define SERIAL_FLOAT_PRECISION 3
// @section extras
@ -1943,7 +1999,9 @@
* Note that M207 / M208 / M209 settings are saved to EEPROM.
*
*/
//#define FWRETRACT
#if ENABLED(SKR13) //!ENABLED(ABL_UBL, GraphicalLCD, TMC_2209) ||
#define FWRETRACT
#endif
#if ENABLED(FWRETRACT)
#define FWRETRACT_AUTORETRACT // Override slicer retractions
#if ENABLED(FWRETRACT_AUTORETRACT)
@ -2043,28 +2101,28 @@
* Requires NOZZLE_PARK_FEATURE.
* This feature is required for the default FILAMENT_RUNOUT_SCRIPT.
*/
//#define ADVANCED_PAUSE_FEATURE
#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
#define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
#define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
// This short retract is done immediately, before parking the nozzle.
#define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
#define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
#define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
#define FILAMENT_CHANGE_UNLOAD_LENGTH 70 // (mm) The length of filament for a complete unload.
// For Bowden, the full length of the tube and nozzle.
// For direct drive, the full length of the nozzle.
// Set to 0 for manual unloading.
#define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
#define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
#define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 30 // (mm) Slow length, to allow time to insert material.
// 0 to disable start loading and skip to fast load only
#define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
#define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
#define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
#define FILAMENT_CHANGE_FAST_LOAD_LENGTH 30 // (mm) Load length of filament, from extruder gear to nozzle.
// For Bowden, the full length of the tube and nozzle.
// For direct drive, the full length of the nozzle.
//#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
#define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
#define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
#define ADVANCED_PAUSE_PURGE_LENGTH 20 // (mm) Length to extrude after loading.
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
@ -2073,18 +2131,18 @@
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_PURGE_RETRACT 13 // (mm) Unload initial retract length.
#define FILAMENT_UNLOAD_PURGE_DELAY 5000 // (ms) Delay for the filament to cool after retract.
#define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
#define FILAMENT_UNLOAD_PURGE_DELAY 1000 // (ms) Delay for the filament to cool after retract.
#define FILAMENT_UNLOAD_PURGE_LENGTH 0 // (mm) An unretract is done, then this length is purged.
#define FILAMENT_UNLOAD_PURGE_FEEDRATE 25 // (mm/s) feedrate to purge before unload
#define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
#define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
#define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
//#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
//#define HOME_BEFORE_FILAMENT_CHANGE // If needed, home before parking for filament change
//#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
//#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
#endif
@ -2236,7 +2294,7 @@
#endif
#if AXIS_IS_TMC(Y)
#define Y_CURRENT 800
#define Y_CURRENT 1000
#define Y_CURRENT_HOME Y_CURRENT
#define Y_MICROSTEPS 16
#define Y_RSENSE 0.11
@ -2284,7 +2342,7 @@
#endif
#if AXIS_IS_TMC(E0)
#define E0_CURRENT 800
#define E0_CURRENT 700
#define E0_MICROSTEPS 16
#define E0_RSENSE 0.11
#define E0_CHAIN_POS -1
@ -2381,23 +2439,53 @@
* Set *_SERIAL_TX_PIN and *_SERIAL_RX_PIN to match for all drivers
* on the same serial port, either here or in your board's pins file.
*/
#define X_SLAVE_ADDRESS 0
#define Y_SLAVE_ADDRESS 0
#define Z_SLAVE_ADDRESS 0
#define X2_SLAVE_ADDRESS 0
#define Y2_SLAVE_ADDRESS 0
#define Z2_SLAVE_ADDRESS 0
#define Z3_SLAVE_ADDRESS 0
#define Z4_SLAVE_ADDRESS 0
#define E0_SLAVE_ADDRESS 0
#define E1_SLAVE_ADDRESS 0
#define E2_SLAVE_ADDRESS 0
#define E3_SLAVE_ADDRESS 0
#define E4_SLAVE_ADDRESS 0
#define E5_SLAVE_ADDRESS 0
#define E6_SLAVE_ADDRESS 0
#define E7_SLAVE_ADDRESS 0
#if DISABLED(SKR13) && DISABLED(SKR14)//THIS MAY NOT BE THE CORRECT CONDITIONAL
#define X_SLAVE_ADDRESS 0
#define Y_SLAVE_ADDRESS 0
#define Z_SLAVE_ADDRESS 1
#define X2_SLAVE_ADDRESS 0
#define Y2_SLAVE_ADDRESS 0
#define Z2_SLAVE_ADDRESS 3
#define Z3_SLAVE_ADDRESS 0
#define E0_SLAVE_ADDRESS 2
#define E1_SLAVE_ADDRESS 0
#define E2_SLAVE_ADDRESS 0
#define E3_SLAVE_ADDRESS 0
#define E4_SLAVE_ADDRESS 0
#define E5_SLAVE_ADDRESS 0
#define E6_SLAVE_ADDRESS 0
#define E7_SLAVE_ADDRESS 0
#define X_SERIAL_TX_PIN 40
#define X_SERIAL_RX_PIN 63
#define Y_SERIAL_TX_PIN 59
#define Y_SERIAL_RX_PIN 64
#define Z_SERIAL_TX_PIN 59
#define Z_SERIAL_RX_PIN 64
#define Z2_SERIAL_TX_PIN 59
#define Z2_SERIAL_RX_PIN 64
#define E0_SERIAL_TX_PIN 59
#define E0_SERIAL_RX_PIN 64
#else
#define X_SLAVE_ADDRESS 0
#define Y_SLAVE_ADDRESS 0
#define Z_SLAVE_ADDRESS 0
#define X2_SLAVE_ADDRESS 0
#define Y2_SLAVE_ADDRESS 0
#define Z2_SLAVE_ADDRESS 0
#define Z3_SLAVE_ADDRESS 0
#define E0_SLAVE_ADDRESS 0
#define E1_SLAVE_ADDRESS 0
#define E2_SLAVE_ADDRESS 0
#define E3_SLAVE_ADDRESS 0
#define E4_SLAVE_ADDRESS 0
#define E5_SLAVE_ADDRESS 0
#define E6_SLAVE_ADDRESS 0
#define E7_SLAVE_ADDRESS 0
#endif
/**
* Software enable
*
@ -2430,7 +2518,7 @@
* Define you own with
* { <off_time[1..15]>, <hysteresis_end[-3..12]>, hysteresis_start[1..8] }
*/
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
#define CHOPPER_TIMING CHOPPER_DEFAULT_24V
/**
* Monitor Trinamic drivers
@ -2443,8 +2531,9 @@
* M912 - Clear stepper driver overtemperature pre-warn condition flag.
* M122 - Report driver parameters (Requires TMC_DEBUG)
*/
//#define MONITOR_DRIVER_STATUS
#if ENABLED(TMC_2209) || ENABLED(TMC_2208)
#define MONITOR_DRIVER_STATUS
#endif
#if ENABLED(MONITOR_DRIVER_STATUS)
#define CURRENT_STEP_DOWN 50 // [mA]
#define REPORT_CURRENT_CHANGE
@ -2458,14 +2547,21 @@
* STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
* M913 X/Y/Z/E to live tune the setting
*/
//#define HYBRID_THRESHOLD
#if ENABLED(TMC_2209) || ENABLED(TMC_2208)
#define HYBRID_THRESHOLD
#endif
#define X_HYBRID_THRESHOLD 100 // [mm/s]
#define X2_HYBRID_THRESHOLD 100
#define Y_HYBRID_THRESHOLD 100
#define Y2_HYBRID_THRESHOLD 100
#if ENABLED(TMC_2209)
#define Z_HYBRID_THRESHOLD 3
#define Z2_HYBRID_THRESHOLD 3
#else
#define Z_HYBRID_THRESHOLD 10
#define Z2_HYBRID_THRESHOLD 10
#endif
#define Z3_HYBRID_THRESHOLD 3
#define Z4_HYBRID_THRESHOLD 3
#define E0_HYBRID_THRESHOLD 30
@ -2532,13 +2628,16 @@
* Beta feature!
* Create a 50/50 square wave step pulse optimal for stepper drivers.
*/
//#define SQUARE_WAVE_STEPPING
#if ENABLED(TMC_2209) || ENABLED(TMC_2208)
#define SQUARE_WAVE_STEPPING
#endif
/**
* Enable M122 debugging command for TMC stepper drivers.
* M122 S0/1 will enable continous reporting.
*/
//#define TMC_DEBUG
#if ENABLED(TMC_2209) || ENABLED(TMC_2208)
#define TMC_DEBUG
#endif
/**
* You can set your own advanced settings by filling in predefined functions.
@ -3114,10 +3213,10 @@
// Extra options for the M114 "Current Position" report
//#define M114_DETAIL // Use 'M114` for details to check planner calculations
//#define M114_REALTIME // Real current position based on forward kinematics
#define M114_REALTIME // Real current position based on forward kinematics
//#define M114_LEGACY // M114 used to synchronize on every call. Enable if needed.
//#define REPORT_FAN_CHANGE // Report the new fan speed when changed by M106 (and others)
#define REPORT_FAN_CHANGE // Report the new fan speed when changed by M106 (and others)
/**
* Set the number of proportional font spaces required to fill up a typical character space.
@ -3151,9 +3250,9 @@
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
// Enable and set a (default) feedrate for all G0 moves
//#define G0_FEEDRATE 3000 // (mm/m)
#define G0_FEEDRATE 9000 // (mm/m)
#ifdef G0_FEEDRATE
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif
/**
@ -3178,27 +3277,37 @@
/**
* User-defined menu items that execute custom GCode
*/
//#define CUSTOM_USER_MENUS
#if ANY(ABL_UBL, BLTOUCH)
#if ENABLED(GraphicalLCD)
#define CUSTOM_USER_MENUS
#endif
#endif
#if ENABLED(CUSTOM_USER_MENUS)
//#define CUSTOM_USER_MENU_TITLE "Custom Commands"
#define USER_SCRIPT_DONE "M117 User Script Done"
//#define USER_SCRIPT_DONE "M117 User Script Done"
#define USER_SCRIPT_AUDIBLE_FEEDBACK
//#define USER_SCRIPT_RETURN // Return to status screen after a script
#define USER_SCRIPT_RETURN // Return to status screen after a script
#define CUSTOM_USER_MENU_TITLE "Leveling Tools"
#define USER_DESC_1 "Home & UBL Info"
#define USER_GCODE_1 "G28\nG29 W"
#define USER_DESC_1 "Setup"
#if ENABLED(ABL_UBL)
#define USER_GCODE_1 "M190S75nG28\nG34\nG29P1\nG29P3R\nG29S1\nG29S0\n G29F0.0\nG29A\nG28\nM109S215\nG1X150Y150\nG1Z0\nM500\nM400\nM77\nM117 Set Z Offset"
#else
#define USER_GCODE_1 "M190S75\nM104S215\nG34\nG28\nG29\nM400\nG28\nM420S1\nM109S215\nG1X100Y100\nG1Z0\nM500\nM400\nM77\nM117 Set Z Offset"
#endif
#define USER_DESC_2 "Preheat for " PREHEAT_1_LABEL
#define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND)
#define USER_DESC_2 "PID Tune"
#define USER_GCODE_2 "M106S128\nM303C8S215E0U\nM500\n M117 PID Tune Done"
#define USER_DESC_3 "Preheat for " PREHEAT_2_LABEL
#define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND)
#define USER_DESC_3 "Prep for Z Adjust"
#define USER_GCODE_3 "M190 S75\n M104 S215 \n G28 \n G29 L1 \n G1 X100 Y 100 \n G1 Z0"
#define USER_DESC_4 "Heat Bed/Home/Level"
#define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29"
#define USER_DESC_4 "Store Settings"
#define USER_GCODE_4 "M500\nM117 Settings Stored"
#define USER_DESC_5 "Home & Info"
#define USER_GCODE_5 "G28\nM503"
//#define USER_DESC_5 "Run Mesh Validation"
//#define USER_GCODE_5 "G26"
#endif
/**
@ -3215,9 +3324,9 @@
* Host Prompt Support enables Marlin to use the host for user prompts so
* filament runout and other processes can be managed from the host side.
*/
//#define HOST_ACTION_COMMANDS
#define HOST_ACTION_COMMANDS
#if ENABLED(HOST_ACTION_COMMANDS)
//#define HOST_PROMPT_SUPPORT
#define HOST_PROMPT_SUPPORT
#endif
/**
@ -3506,12 +3615,12 @@
//
// M100 Free Memory Watcher to debug memory usage
//
//#define M100_FREE_MEMORY_WATCHER
#define M100_FREE_MEMORY_WATCHER
//
// M43 - display pin status, toggle pins, watch pins, watch endstops & toggle LED, test servo probe
//
//#define PINS_DEBUGGING
#define PINS_DEBUGGING
// Enable Marlin dev mode which adds some special commands
//#define MARLIN_DEV_MODE

View File

@ -35,6 +35,9 @@
mesh_bed_leveling mbl;
float mesh_bed_leveling::z_offset,
#if ENABLED(BABYSTEP_MBL_Z_OFFSET)
mesh_bed_leveling::z_offset_start,
#endif
mesh_bed_leveling::z_values[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y],
mesh_bed_leveling::index_to_xpos[GRID_MAX_POINTS_X],
mesh_bed_leveling::index_to_ypos[GRID_MAX_POINTS_Y];
@ -48,7 +51,11 @@
}
void mesh_bed_leveling::reset() {
z_offset = 0;
z_offset
#if ENABLED(BABYSTEP_MBL_Z_OFFSET)
= z_offset_start
#endif
= 0;
ZERO(z_values);
#if ENABLED(EXTENSIBLE_UI)
GRID_LOOP(x, y) ExtUI::onMeshUpdate(x, y, 0);

View File

@ -41,6 +41,9 @@ enum MeshLevelingState : char {
class mesh_bed_leveling {
public:
static float z_offset,
#if ENABLED(BABYSTEP_MBL_Z_OFFSET)
z_offset_start,
#endif
z_values[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y],
index_to_xpos[GRID_MAX_POINTS_X],
index_to_ypos[GRID_MAX_POINTS_Y];
@ -116,7 +119,11 @@ public:
z1 = calc_z0(pos.x, x1, z_values[ind.x][ind.y ], x2, z_values[ind.x+1][ind.y ]),
z2 = calc_z0(pos.x, x1, z_values[ind.x][ind.y+1], x2, z_values[ind.x+1][ind.y+1]);
return z_offset + calc_z0(pos.y, y1, z1, y2, z2) * factor;
return
#if DISABLED(BABYSTEP_MBL_Z_OFFSET)
z_offset +
#endif
calc_z0(pos.y, y1, z1, y2, z2) * factor;
}
#if IS_CARTESIAN && DISABLED(SEGMENT_LEVELED_MOVES)

View File

@ -31,6 +31,14 @@
#include "host_actions.h"
#endif
#if ENABLED(EMERGENCY_BYPASS)
static char fast_queue_bypass[MAX_CMD_SIZE];
static uint16_t bypass_position;
//static PGMSTR(fastmagic, "fast:");
#include "../gcode/queue.h"
#include "../MarlinCore.h"
#endif
// External references
extern bool wait_for_user, wait_for_heatup;
void quickstop_stepper();
@ -52,6 +60,9 @@ public:
EP_M4,
EP_M41,
EP_M410,
#if ENABLED(EMERGENCY_BYPASS)
EP_M411,
#endif
#if ENABLED(HOST_PROMPT_SUPPORT)
EP_M8,
EP_M87,
@ -59,6 +70,9 @@ public:
EP_M876S,
EP_M876SN,
#endif
#if ENABLED(EMERGENCY_BYPASS)
EP_GET_BYPASS,
#endif
EP_IGNORE // to '\n'
};
@ -82,10 +96,32 @@ public:
case ' ': case '\n': case '\r': break;
case 'N': state = EP_N; break;
case 'M': state = EP_M; break;
#if ENABLED(EMERGENCY_BYPASS)
case '!': state = EP_GET_BYPASS; bypass_position = 0; break;
#endif
default: state = EP_IGNORE;
}
break;
#if ENABLED(EMERGENCY_BYPASS)
case EP_GET_BYPASS:
switch (c) {
case '\n': case 0: case '!':
send_bypass:
fast_queue_bypass[bypass_position] = 0;
SERIAL_ECHOLNPAIR("echo:fast:", fast_queue_bypass);
if(bypass_position)queue.enqueue_to_bypass(fast_queue_bypass);
bypass_position = 0;
if(c != '!')state = EP_RESET;
break;
case 'G': case 'g': if(!bypass_position){ state = EP_IGNORE; break; }
default:
if(bypass_position<MAX_CMD_SIZE-1)fast_queue_bypass[bypass_position++] = c;
else goto send_bypass;
}
break;
#endif
case EP_N:
switch (c) {
case '0': case '1': case '2':
@ -130,7 +166,14 @@ public:
break;
case EP_M41:
state = (c == '0') ? EP_M410 : EP_IGNORE;
switch (c){
case '0': state = EP_M410; break;
#if ENABLED(EMERGENCY_BYPASS)
case '1': state = EP_M411; break;
#endif
default:
state = EP_IGNORE;
}
break;
#if ENABLED(HOST_PROMPT_SUPPORT)
@ -174,6 +217,14 @@ public:
case EP_M108: wait_for_user = wait_for_heatup = false; break;
case EP_M112: killed_by_M112 = true; break;
case EP_M410: quickstop_stepper(); break;
#if ENABLED(EMERGENCY_BYPASS)
case EP_M411:
queue.clear();
#ifdef ACTION_ON_CANCEL
host_action(PSTR(ACTION_ON_CANCEL));
#endif
break;
#endif
#if ENABLED(HOST_PROMPT_SUPPORT)
case EP_M876SN: host_response_handler(M876_reason); break;
#endif

View File

@ -274,10 +274,10 @@ G29_TYPE GcodeSuite::G29() {
const bool seen_w = parser.seen('W');
if (seen_w) {
if (!leveling_is_valid()) {
/*if (!leveling_is_valid()) {//fix 1.3.91 DISABLE???
SERIAL_ERROR_MSG("No bilinear grid");
G29_RETURN(false);
}
}//*/
const float rz = parser.seenval('Z') ? RAW_Z_POSITION(parser.value_linear_units()) : current_position.z;
if (!WITHIN(rz, -10, 10)) {

View File

@ -75,6 +75,7 @@ uint8_t GcodeSuite::axis_relative = (
#if EITHER(HAS_AUTO_REPORTING, HOST_KEEPALIVE_FEATURE)
bool GcodeSuite::autoreport_paused; // = false
bool GcodeSuite::autoreport_position; // = false
#endif
#if ENABLED(HOST_KEEPALIVE_FEATURE)
@ -489,6 +490,10 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
TERN_(HOST_PROMPT_SUPPORT, case 876:)
break;
#endif
#if ENABLED(EMERGENCY_BYPASS)
case 411:
break;
#endif
#if ENABLED(HOST_KEEPALIVE_FEATURE)
case 113: M113(); break; // M113: Set Host Keepalive interval
@ -898,6 +903,10 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
}
break;
#if ENABLED(EMERGENCY_BYPASS)
case '!': break;
#endif
case 'T': T(parser.codenum); break; // Tn: Tool Change
default:

View File

@ -361,6 +361,7 @@ public:
}
#if EITHER(HAS_AUTO_REPORTING, HOST_KEEPALIVE_FEATURE)
static bool autoreport_position;
static bool autoreport_paused;
static inline bool set_autoreport_paused(const bool p) {
const bool was = autoreport_paused;

View File

@ -78,6 +78,9 @@ void GcodeSuite::M290() {
babystep.add_mm((AxisEnum)a, offs);
#if ENABLED(BABYSTEP_ZPROBE_OFFSET)
if (a == Z_AXIS && (!parser.seen('P') || parser.value_bool())) mod_probe_offset(offs);
#endif
#if ENABLED(BABYSTEP_MBL_Z_OFFSET)
mbl.z_offset += offs;
#endif
}
#else
@ -87,6 +90,9 @@ void GcodeSuite::M290() {
#if ENABLED(BABYSTEP_ZPROBE_OFFSET)
if (!parser.seen('P') || parser.value_bool()) mod_probe_offset(offs);
#endif
#if ENABLED(BABYSTEP_MBL_Z_OFFSET)
mbl.z_offset += offs;
#endif
}
#endif

View File

@ -159,6 +159,9 @@ void GCodeParser::parse(char *p) {
// (or a valid parameter for the current motion mode)
switch (letter) {
#if ENABLED(EMERGENCY_BYPASS)
case '!': command_letter = letter; return;
#endif
case 'G': case 'M': case 'T':
#if ENABLED(CANCEL_OBJECTS)
case 'O':

View File

@ -100,21 +100,70 @@ GCodeQueue::GCodeQueue() {
// Send "ok" after commands by default
LOOP_L_N(i, COUNT(send_ok)) send_ok[i] = true;
}
#if ENABLED(EMERGENCY_BYPASS)
#ifndef EMERGENCY_BYPASS_QUEUE_SIZE
#define EMERGENCY_BYPASS_QUEUE_SIZE 5
#endif
static char bypass_queue[EMERGENCY_BYPASS_QUEUE_SIZE][MAX_CMD_SIZE];
static u8 bypass_length;
static u8 bypass_index_r;
static u8 bypass_index_w;
#endif
/**
* Check whether there are any commands yet to be executed
*/
bool GCodeQueue::has_commands_queued() {
return queue.length || injected_commands_P || injected_commands[0];
return queue.length || injected_commands_P || injected_commands[0]
#if ENABLED(EMERGENCY_BYPASS)
|| bypass_length
#endif
;
}
/**
* Clear the Marlin command queue
*/
void GCodeQueue::clear() {
index_r = index_w = length = 0;
index_r = index_w = length =
#if ENABLED(EMERGENCY_BYPASS)
bypass_index_r = bypass_index_w = bypass_length =
#endif
0;
}
#if ENABLED(EMERGENCY_BYPASS)
/**
* Inject command to the next spot to be executed in the ring buffer
*/
void GCodeQueue::enqueue_to_bypass(const char* cmd)
{
if(bypass_length >= EMERGENCY_BYPASS_QUEUE_SIZE){
SERIAL_ECHOLN("echo:fast:buffer overflow");
return;//trash overflow commands
}strcpy(bypass_queue[bypass_index_w], cmd);
if(bypass_index_w > 0)bypass_index_w--;
else bypass_index_w = EMERGENCY_BYPASS_QUEUE_SIZE-1;
bypass_length++;
}
bool GCodeQueue::enqueue_front_of_line()
{
if(!bypass_length || length >= BUFSIZE)return false;
if(index_r > 0)index_r--;
else index_r = BUFSIZE-1;
send_ok[index_r] = true;
strcpy(command_buffer[index_r], bypass_queue[bypass_index_r]);
TERN_(HAS_MULTI_SERIAL, port[index_r] = p); //not sure about this
length++;
if(bypass_index_r > 0)bypass_index_r--;
else bypass_index_r = EMERGENCY_BYPASS_QUEUE_SIZE-1;
bypass_length--;
return true;
}
#endif
/**
* Once a new command is in the ring buffer, call this to commit it
*/
@ -502,6 +551,8 @@ void GCodeQueue::get_serial_commands() {
//
if (IsStopped()) {
bool M118 = strstr_P(command, PSTR("M118")) != nullptr;
bool M117 = strstr_P(command, PSTR("M117")) != nullptr;
char* gpos = strchr(command, 'G');
if (gpos) {
switch (strtol(gpos + 1, nullptr, 10)) {
@ -512,9 +563,11 @@ void GCodeQueue::get_serial_commands() {
#if ENABLED(BEZIER_CURVE_SUPPORT)
case 5:
#endif
PORT_REDIRECT(i); // Reply to the serial port that sent the command
SERIAL_ECHOLNPGM(STR_ERR_STOPPED);
LCD_MESSAGEPGM(MSG_STOPPED);
if(!M117 && !M118){
PORT_REDIRECT(i); // Reply to the serial port that sent the command
SERIAL_ECHOLNPGM(STR_ERR_STOPPED);
LCD_MESSAGEPGM(MSG_STOPPED);
}
break;
}
}
@ -610,9 +663,11 @@ void GCodeQueue::get_available_commands() {
void GCodeQueue::advance() {
// Process immediate commands
if (process_injected_command_P() || process_injected_command()) return;
// Return if the G-code buffer is empty
if (process_injected_command_P() || process_injected_command()
#if ENABLED(EMERGENCY_BYPASS)
|| enqueue_front_of_line()
#endif
) return;
if (!length) return;
#if ENABLED(SDSUPPORT)

View File

@ -146,6 +146,17 @@ public:
* the next expected line number.
*/
static void flush_and_request_resend();
#if ENABLED(EMERGENCY_BYPASS)
/**
* Inject command to the bypass ring buffer
*/
static void enqueue_to_bypass(const char* cmd);
/**
* Inject command to the next spot to be executed in the ring buffer
*/
static bool enqueue_front_of_line();
#endif
private:

View File

@ -26,12 +26,24 @@
#include "../gcode.h"
#include "../../module/temperature.h"
#if ENABLED(HOST_ACTION_COMMANDS)
#include "../../feature/host_actions.h"
#endif
/**
* M155: Set temperature auto-report interval. M155 S<seconds>
*/
void GcodeSuite::M155() {
if (parser.seen('P')){//automatically report_current_position_projected();
gcode.autoreport_position = true;
#if ENABLED(HOST_ACTION_COMMANDS)
host_action_notify_P(PSTR("autoreport position"));
#else
SERIAL_ECHOLN("echo:M155:autoreport position");
#endif
}
else gcode.autoreport_position = false;
if (parser.seenval('S'))
thermalManager.set_auto_report_interval(parser.value_byte());

View File

@ -67,7 +67,7 @@
#include "../feature/fwretract.h"
#endif
#if ENABLED(BABYSTEP_DISPLAY_TOTAL)
#if ENABLED(BABYSTEP_DISPLAY_TOTAL) || ENABLED(BABYSTEP_MBL_Z_OFFSET)
#include "../feature/babystep.h"
#endif
@ -1416,6 +1416,11 @@ void set_axis_is_at_home(const AxisEnum axis) {
TERN_(BABYSTEP_DISPLAY_TOTAL, babystep.reset_total(axis));
#if ENABLED(BABYSTEP_MBL_Z_OFFSET)
if(axis == Z_AXIS)babystep.add_mm(Z_AXIS, mbl.z_offset);
mbl.z_offset_start = mbl.z_offset;
#endif
#if HAS_POSITION_SHIFT
position_shift[axis] = 0;
update_workspace_offset(axis);

View File

@ -1472,7 +1472,12 @@ void Planner::check_axes_activity() {
* Leveled XYZ on completion
*/
void Planner::apply_leveling(xyz_pos_t &raw) {
if (!leveling_active) return;
if (!leveling_active){
#if ENABLED(BABYSTEP_MBL_Z_OFFSET)
raw.z += mbl.z_offset_start;
#endif
return;
}
#if ABL_PLANAR
@ -1541,6 +1546,9 @@ void Planner::check_axes_activity() {
#endif
}
#if ENABLED(BABYSTEP_MBL_Z_OFFSET)
else raw.z -= mbl.z_offset_start;
#endif
}
#endif // HAS_LEVELING

View File

@ -1523,7 +1523,11 @@ void MarlinSettings::postprocess() {
EEPROM_READ_ALWAYS(mesh_num_y);
#if ENABLED(MESH_BED_LEVELING)
if (!validating) mbl.z_offset = dummyf;
if (!validating) mbl.z_offset =
#if ENABLED(BABYSTEP_MBL_Z_OFFSET)
mbl.z_offset_start =
#endif
dummyf;
if (mesh_num_x == GRID_MAX_POINTS_X && mesh_num_y == GRID_MAX_POINTS_Y) {
// EEPROM data fits the current mesh
EEPROM_READ(mbl.z_values);
@ -2517,7 +2521,8 @@ void MarlinSettings::reset() {
#if HAS_PROBE_XY_OFFSET
LOOP_XYZ(a) probe.offset[a] = dpo[a];
#else
probe.offset.set(0, 0, dpo[Z_AXIS]);
probe.offset.x = probe.offset.y = 0;
probe.offset.z = dpo[Z_AXIS];
#endif
#endif

View File

@ -3001,6 +3001,7 @@ void Temperature::tick() {
PORT_REDIRECT(SERIAL_BOTH);
print_heater_states(active_extruder);
SERIAL_EOL();
if(gcode.autoreport_position){ report_current_position_projected(); }
}
}

View File

@ -253,7 +253,7 @@
// RAMPS 1.4 DIO 4 on the servos connector
#ifndef FIL_RUNOUT_PIN
#define FIL_RUNOUT_PIN 4
#define FIL_RUNOUT_PIN 2 //default is 4, changed for this mod
#endif
#ifndef PS_ON_PIN