#pragma once

/**
 * Configuration.h
 *
 * Basic settings such as: ( 基本设置如:)
 *
 * - Type of electronics (电子元器件类型 )
 * - Type of temperature sensor (温度传感器类型 )
 * - Printer geometry (打印机尺寸)
 * - Endstop configuration (限位开关配置)
 * - LCD controller (液晶显示控制器)
 * - Extra features (额外功能)
 *
 * Advanced settings can be found in Configuration_adv.h (高级设置在 Configuration_adv.h 文件中)
 */
#define CONFIGURATION_H_VERSION 020007

//==================================================================================
//============================= Getting Started (开始)=============================
//==================================================================================

/**
 * Here are some standard links for getting your machine calibrated:
 *
 * https://reprap.org/wiki/Calibration
 * https://youtu.be/wAL9d7FgInk
 * http://calculator.josefprusa.cz
 * https://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide
 * https://www.thingiverse.com/thing:5573
 * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap
 * https://www.thingiverse.com/thing:298812
 */

//=========================================================================================
//============================= DELTA Printer (三角洲打印机)===============================
//=========================================================================================
// For a Delta printer start with one of the configuration files in the
// config/examples/delta directory and customize for your machine.
//

//=============================================================================================
//============================= SCARA Printer (平面关节型机器人)===============================
//=============================================================================================
// For a SCARA printer start with the configuration files in
// config/examples/SCARA and customize for your machine.
//

// @section info

// Author info of this build printed to the host during boot and M115
#define STRING_CONFIG_H_AUTHOR "G12" // Who made the changes. 修改作者.
//#define CUSTOM_VERSION_FILE Version.h // Path from the root directory (no quotes)

/**
 * *** VENDORS PLEASE READ ***
 *
 * Marlin allows you to add a custom boot image for Graphical LCDs.
 * With this option Marlin will first show your custom screen followed
 * by the standard Marlin logo with version number and web URL.
 *
 * We encourage you to take advantage of this new feature and we also
 * respectfully request that you retain the unmodified Marlin boot screen.
 */

// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION **
// #define SHOW_BOOTSCREEN // 启动时,显示marlin主页面

// Show the bitmap in Marlin/_Bootscreen.h on startup.
//#define SHOW_CUSTOM_BOOTSCREEN // 当打开定义, Marlin 会首先显示自定义的启动图像然后在显示默认开机图像。

// Show the bitmap in Marlin/_Statusscreen.h on the status screen.
//#define CUSTOM_STATUS_SCREEN_IMAGE

// @section machine

/**
 * Select the serial port on the board to use for communication with the host.
 * This allows the connection of wireless adapters (for instance) to non-default port pins.
 * Serial port -1 is the USB emulated serial port, if available.
 * Note: The first serial port (-1 or 0) will always be used by the Arduino bootloader.
 * 选择一个用于与主机通信的串口, 
 * 这允许使用无线适配器连接(例如)非默认端口 
 * 串口-1是USB模拟串口(如果可用)
 * 注意:第一个串行端口(-1或0)将始终由Arduino引导加载程序使用。
 * :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
 */
#define SERIAL_PORT 1

/**
 * 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 3

/**
 * This setting determines the communication speed of the printer.
 * 此设置确定打印机的通信速度。 (波特率设置)
 * 250000 works in most cases, but you might try a lower speed if
 * you commonly experience drop-outs during host printing.
 * You may try up to 1000000 to speed up SD file transfer.
 * 大多数情况下采用在250000模式下工作,但如果您通常在打印过程中遇到退出的情况,
 * 您可以更换较低的速度去尝试。你也可以试着用1000000模式高速进行SD文件传输。
 * 
 * :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
 */
#define BAUDRATE 115200

// Enable the Bluetooth serial interface on AT90USB devices
// 在AT90USB设备上启用蓝牙串行接口
//#define BLUETOOTH

// Choose the name from boards.h that matches your setup
// 从boards.h中选择与您的设置相匹配的(开发板)名称
// 主板选择,在Marlin2.0固件文件夹根目录 Marlin\src\pins,
// 文件名pins_MKS_BASE填入下方 BOARD_xxx_xxx。不同主板pins_文件名不一样。
#ifndef MOTHERBOARD
  #define MOTHERBOARD BOARD_CREALITY_F107
#endif

// Name displayed in the LCD "Ready" message and Info menu
// (设置机器名称)在液晶显示器中显示“ G12 Printer 准备就绪”的消息
// #define CUSTOM_MACHINE_NAME "G12"

// Printer's unique ID, used by some programs to differentiate between machines.
//使用UUID进行设置机器的唯一标识码(用于区分不同的机器)
// Choose your own or use a service like https://www.uuidgenerator.net/version4
//#define MACHINE_UUID "00000000-0000-0000-0000-000000000000"

// @section extruder 
//===========================================================================
//============================= 挤出机信息设置================================
//===========================================================================

// This defines the number of extruders
// 定义挤出机的数量:[0, 1, 2, 3, 4, 5, 6, 7, 8]
// 选择挤出机的数量:单色机保持默认1
// 举例:2进2出机型,2进1出非混色机型,数值都是2
// 举例:2进1出混色机型,3进1出混色机型,5进1出混色机型,6进1出混色机型,数值都是1
#define EXTRUDERS 2

// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
// 用于定义耗材的直径大小
#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75

// For Cyclops or any "multi-extruder" that shares a single nozzle.
// 用于定义是否属于“多进一出”
// 举例:2进1出非混色机型,3进1出非混色机型,5进1出非混色机型,6进1出非混色机型, 则选择定义(去掉前面 //)
//#define SINGLENOZZLE

// Save and restore temperature and fan speed on tool-change.
// 更换工具时保存并恢复温度和风扇转速。
// Set standby for the unselected tool with M104/106/109 T...
#if ENABLED(SINGLENOZZLE)
  //#define SINGLENOZZLE_STANDBY_TEMP
  //#define SINGLENOZZLE_STANDBY_FAN
#endif

/**
 * Průša MK2 Single Nozzle Multi-Material Multiplexer, and variants.
 *
 * This device allows one stepper driver on a control board to drive
 * two to eight stepper motors, one at a time, in a manner suitable
 * for extruders.
 *
 * This option only allows the multiplexer to switch on tool-change.
 * Additional options to configure custom E moves are pending.
 */
//#define MK2_MULTIPLEXER
#if ENABLED(MK2_MULTIPLEXER)
  // Override the default DIO selector pins here, if needed.
  // Some pins files may provide defaults for these pins.
  //#define E_MUX0_PIN 40  // Always Required
  //#define E_MUX1_PIN 42  // Needed for 3 to 8 inputs
  //#define E_MUX2_PIN 44  // Needed for 5 to 8 inputs
#endif

/**
 * Průša Multi-Material Unit v2
 *
 * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
 * Requires EXTRUDERS = 5
 *
 * For additional configuration see Configuration_adv.h
 */
//#define PRUSA_MMU2

// A dual extruder that uses a single stepper motor
// 双螺杆挤出机,使用一个单一的步进电机
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
  #define SWITCHING_EXTRUDER_SERVO_NR 0
  #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1[, E2, E3]
  #if EXTRUDERS > 3
    #define SWITCHING_EXTRUDER_E23_SERVO_NR 1
  #endif
#endif

// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
// 双喷嘴,采用伺服电机来提高/降低一个喷嘴
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
  #define SWITCHING_NOZZLE_SERVO_NR 0
  //#define SWITCHING_NOZZLE_E1_SERVO_NR 1          // If two servos are used, the index of the second
  #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 }   // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif

/**
 * Two separate X-carriages with extruders that connect to a moving part
 * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
 */
//#define PARKING_EXTRUDER

/**
 * Two separate X-carriages with extruders that connect to a moving part
 * via a magnetic docking mechanism using movements and no solenoid
 *
 * project   : https://www.thingiverse.com/thing:3080893
 * movements : https://youtu.be/0xCEiG9VS3k
 *             https://youtu.be/Bqbcs0CU2FE
 */
//#define MAGNETIC_PARKING_EXTRUDER

#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER)

#define PARKING_EXTRUDER_PARKING_X { -78, 184 }     // X positions for parking the extruders
  #define PARKING_EXTRUDER_GRAB_DISTANCE 1            // (mm) Distance to move beyond the parking point to grab the extruder
  //#define MANUAL_SOLENOID_CONTROL                   // Manual control of docking solenoids with M380 S / M381

#if ENABLED(PARKING_EXTRUDER)

#define PARKING_EXTRUDER_SOLENOIDS_INVERT           // If enabled, the solenoid is NOT magnetized with applied voltage
    #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW  // LOW or HIGH pin signal energizes the coil
    #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250        // (ms) Delay for magnetic field. No delay if 0 or not defined.
    //#define MANUAL_SOLENOID_CONTROL                   // Manual control of docking solenoids with M380 S / M381

#elif ENABLED(MAGNETIC_PARKING_EXTRUDER)

#define MPE_FAST_SPEED      9000      // (mm/min) Speed for travel before last distance point
    #define MPE_SLOW_SPEED      4500      // (mm/min) Speed for last distance travel to park and couple
    #define MPE_TRAVEL_DISTANCE   10      // (mm) Last distance point
    #define MPE_COMPENSATION       0      // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling

#endif

#endif

/**
 * Switching Toolhead
 *
 * Support for swappable and dockable toolheads, such as
 * the E3D Tool Changer. Toolheads are locked with a servo.
 */
//#define SWITCHING_TOOLHEAD

/**
 * Magnetic Switching Toolhead
 *
 * Support swappable and dockable toolheads with a magnetic
 * docking mechanism using movement and no servo.
 */
//#define MAGNETIC_SWITCHING_TOOLHEAD

/**
 * Electromagnetic Switching Toolhead
 *
 * Parking for CoreXY / HBot kinematics.
 * Toolheads are parked at one edge and held with an electromagnet.
 * Supports more than 2 Toolheads. See https://youtu.be/JolbsAKTKf4
 */
//#define ELECTROMAGNETIC_SWITCHING_TOOLHEAD

#if ANY(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD, ELECTROMAGNETIC_SWITCHING_TOOLHEAD)
  #define SWITCHING_TOOLHEAD_Y_POS          235         // (mm) Y position of the toolhead dock
  #define SWITCHING_TOOLHEAD_Y_SECURITY      10         // (mm) Security distance Y axis
  #define SWITCHING_TOOLHEAD_Y_CLEAR         60         // (mm) Minimum distance from dock for unobstructed X axis
  #define SWITCHING_TOOLHEAD_X_POS          { 215, 0 }  // (mm) X positions for parking the extruders
  #if ENABLED(SWITCHING_TOOLHEAD)
    #define SWITCHING_TOOLHEAD_SERVO_NR       2         // Index of the servo connector
    #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 }  // (degrees) Angles for Lock, Unlock
  #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD)
    #define SWITCHING_TOOLHEAD_Y_RELEASE      5         // (mm) Security distance Y axis
    #define SWITCHING_TOOLHEAD_X_SECURITY   { 90, 150 } // (mm) Security distance X axis (T0,T1)
    //#define PRIME_BEFORE_REMOVE                       // Prime the nozzle before release from the dock
    #if ENABLED(PRIME_BEFORE_REMOVE)
      #define SWITCHING_TOOLHEAD_PRIME_MM           20  // (mm)   Extruder prime length
      #define SWITCHING_TOOLHEAD_RETRACT_MM         10  // (mm)   Retract after priming length
      #define SWITCHING_TOOLHEAD_PRIME_FEEDRATE    300  // (mm/min) Extruder prime feedrate
      #define SWITCHING_TOOLHEAD_RETRACT_FEEDRATE 2400  // (mm/min) Extruder retract feedrate
    #endif
  #elif ENABLED(ELECTROMAGNETIC_SWITCHING_TOOLHEAD)
    #define SWITCHING_TOOLHEAD_Z_HOP          2         // (mm) Z raise for switching
  #endif
#endif

/**
 * "Mixing Extruder"
 *   - Adds G-codes M163 and M164 to set and "commit" the current mix factors.
 *   - Extends the stepping routines to move multiple steppers in proportion to the mix.
 *   - Optional support for Repetier Firmware's 'M164 S<index>' supporting virtual tools.
 *   - This implementation supports up to two mixing extruders.
 *   - Enable DIRECT_MIXING_IN_G1 for M165 and mixing in G1 (from Pia Taubert's reference implementation).
 * Mixing Extruder   虚拟挤出机
 * 举例:2进1出混色机型,3进1出混色机型,5进1出混色机型,6进1出混色机型
 * 需去掉 #define MIXING_EXTRUDER 前面的 //
 * 通过M163 设定混合比例,M164 保存到指定虚拟挤出机。
 * 
 * 用2进1出混色举例:
 * 在切片软件的开始代码区添加:
 * M163 S0 P6  
 * M163 S1 P4
 * M164 S0 
 * 
 * // M163 S0 P6   指虚拟挤出机S0  挤出率为60%
 * // M163 S1 P4   指虚拟挤出机S1  挤出率为40%
 * // M164 S0  以上两个虚拟挤出机 S0+S1=100% ,定义为挤出机1 并保存
 * 
 * M163 S0 P9
 * M163 S1 P1
 * M164 S1 
 * 
 * // M163 S0 P9   指虚拟挤出机S0  挤出率为90%
 * // M163 S1 P1   指虚拟挤出机S1  挤出率为10%
 * // M164 S1  以上两个虚拟挤出机 S0+S1=100% ,定义为挤出机2 并保存
 * .......
 * 
 * 在Simplify3d的切片软件中,最多支持6个挤出机,即 M164 S0(S1、S2、S3、S4、S5)
 * 也就是说,最多支持6种混色配比。
 * M166 是marlin2.0新增的梯度渐变混色指令,通常与 M163、M164 配合使用。
 * 举例:已知一个模型的高度为100mm, 开始渐变高度0mm, 结束渐变高度100mm.
 * M166 A0 Z100 I0 J1 S1
 * A0  指在0mm高度开启渐变混色
 * Z100 指在100mm高度结束渐变混色
 * I0 指调用M164 S0 的混色配比
 * J1 指调用M164 S1 的混色配比
 * S1 指开启梯度渐变功能 / S0禁用梯度渐变功能
 * 
 * M165 为专色混色配比指令(不与M163 M164一起使用),最多支持6个虚拟挤出机
 * 举例:
 * 6个颜色混合  M165 A1 B1 C1 D1 H1 I1 (各挤出机挤出率:1/6)
 * 5个颜色混合  M165 A1 B1 C1 D1 H1 (各挤出机挤出率:1/5)
 * 3个颜色混合  M165 A1 B1 C1  (各挤出机挤出率:1/3)
 * 2个颜色混合  M165 A1 B1  (各挤出机挤出率:1/2)
 */
//#define MIXING_EXTRUDER
#if ENABLED(MIXING_EXTRUDER)
  #define MIXING_STEPPERS 2        // Number of steppers in your mixing extruder // 设定虚拟挤出机数量,最多6个
  #define MIXING_VIRTUAL_TOOLS 16  // Use the Virtual Tool method with M163 and M164  // M163 and M164 混合工具数16个
  //#define DIRECT_MIXING_IN_G1    // Allow ABCDHI mix factors in G1 movement commands  //  去掉 “//” 开启M165混色功能 ABCDHI
  //#define GRADIENT_MIX           // Support for gradient mixing with M166 and LCD  // 去掉 “//”开启M166梯度混色功能
  #if ENABLED(GRADIENT_MIX)
    //#define GRADIENT_VTOOL       // Add M166 T to use a V-tool index as a Gradient alias// 去掉 “//”开启M166梯度混色,调用多个虚拟挤出机功能
  #endif
#endif

// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder).
// For the other hotends it is their distance from the extruder 0 hotend.
// 挤出机的偏移量设置 (如果使用多个挤出机且在固件位置不同时可取消注释).
// 偏移量 X=0, Y=0 是指 挤出机0的热端位置 (default extruder).
// 对于其他的挤出头的偏移量则是它们到挤出机0之间的距离 
//#define HOTEND_OFFSET_X { 0.0, 20.00 } // (mm) relative X-offset for each nozzle
//#define HOTEND_OFFSET_Y { 0.0, 5.00 }  // (mm) relative Y-offset for each nozzle
//#define HOTEND_OFFSET_Z { 0.0, 0.00 }  // (mm) relative Z-offset for each nozzle

// @section machine
//===========================================================================
//=============================  机器信息设置 ================================
//===========================================================================

/**
 * Power Supply Control
 *
 * Enable and connect the power supply to the PS_ON_PIN.
 * Specify whether the power supply is active HIGH or active LOW.
 * 
 * 电源控制
 * 使能并连接电源到PS_ON_PIN引脚;
 * 确定电源是高位激活还是低位激活
 * 
 */
//#define PSU_CONTROL
//#define PSU_NAME "Power Supply"

#if ENABLED(PSU_CONTROL)
  #define PSU_ACTIVE_STATE LOW      // Set 'LOW' for ATX, 'HIGH' for X-Box

//#define PSU_DEFAULT_OFF         // Keep power off until enabled directly with M80 //为步进电机和加热器供电则需要使用M80来开启。
  //#define PSU_POWERUP_DELAY 250   // (ms) Delay for the PSU to warm up to full power

//#define AUTO_POWER_CONTROL      // Enable automatic control of the PS_ON pin
  #if ENABLED(AUTO_POWER_CONTROL)
    #define AUTO_POWER_FANS         // Turn on PSU if fans need power
    #define AUTO_POWER_E_FANS
    #define AUTO_POWER_CONTROLLERFAN
    #define AUTO_POWER_CHAMBER_FAN
    //#define AUTO_POWER_E_TEMP        50 // (°C) Turn on PSU over this temperature
    //#define AUTO_POWER_CHAMBER_TEMP  30 // (°C) Turn on PSU over this temperature
    #define POWER_TIMEOUT 30
  #endif
#endif

//========================================================================================
//============================= Thermal Settings (温度信息设置)============================
//========================================================================================

// @section temperature

/**
 * --NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table
 *
 * Temperature sensors available:
 *
 *    -5 : PT100 / PT1000 with MAX31865 (only for sensors 0-1)
 *    -3 : thermocouple with MAX31855 (only for sensors 0-1)
 *    -2 : thermocouple with MAX6675 (only for sensors 0-1)
 *    -4 : thermocouple with AD8495
 *    -1 : thermocouple with AD595
 *     0 : not used  //表示没有使用
 *     1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup)  //表示使用100K电阻的传感器
 *   331 : (3.3V scaled thermistor 1 table for MEGA)
 *   332 : (3.3V scaled thermistor 1 table for DUE)
 *     2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup)
 *   202 : 200k thermistor - Copymaster 3D
 *     3 : Mendel-parts thermistor (4.7k pullup)
 *     4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
 *     5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan, J-Head, and E3D) (4.7k pullup)
 *   501 : 100K Zonestar (Tronxy X3A) Thermistor
 *   502 : 100K Zonestar Thermistor used by hot bed in Zonestar Průša P802M
 *   512 : 100k RPW-Ultra hotend thermistor (4.7k pullup)
 *     6 : 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup)
 *     7 : 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup)
 *    71 : 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup)
 *     8 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup)
 *     9 : 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup)
 *    10 : 100k RS thermistor 198-961 (4.7k pullup)
 *    11 : 100k beta 3950 1% thermistor (Used in Keenovo AC silicone mats and most Wanhao i3 machines) (4.7k pullup)
 *    12 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed)
 *    13 : 100k Hisens 3950  1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
 *    15 : 100k thermistor calibration for JGAurora A5 hotend
 *    18 : ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327
 *    20 : Pt100 with circuit in the Ultimainboard V2.x with 5v excitation (AVR)
 *    21 : Pt100 with circuit in the Ultimainboard V2.x with 3.3v excitation (STM32 \ LPC176x....)
 *    22 : 100k (hotend) with 4.7k pullup to 3.3V and 220R to analog input (as in GTM32 Pro vB)
 *    23 : 100k (bed) with 4.7k pullup to 3.3v and 220R to analog input (as in GTM32 Pro vB)
 *    30 : Kis3d Silicone heating mat 200W/300W with 6mm precision cast plate (EN AW 5083) NTC100K / B3950 (4.7k pullup)
 *   201 : Pt100 with circuit in Overlord, similar to Ultimainboard V2.x
 *    60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
 *    61 : 100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup
 *    66 : 4.7M High Temperature thermistor from Dyze Design
 *    67 : 450C thermistor from SliceEngineering
 *    70 : the 100K thermistor found in the bq Hephestos 2
 *    75 : 100k Generic Silicon Heat Pad with NTC 100K MGB18-104F39050L32 thermistor
 *    99 : 100k thermistor with a 10K pull-up resistor (found on some Wanhao i3 machines)
 *
 *       1k ohm pullup tables - This is atypical, and requires changing out the 4.7k pullup for 1k.
 *                              (but gives greater accuracy and more stable PID)
 *    51 : 100k thermistor - EPCOS (1k pullup)
 *    52 : 200k thermistor - ATC Semitec 204GT-2 (1k pullup)
 *    55 : 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup)
 *
 *  1047 : Pt1000 with 4k7 pullup (E3D)
 *  1010 : Pt1000 with 1k pullup (non standard)
 *   147 : Pt100 with 4k7 pullup
 *   110 : Pt100 with 1k pullup (non standard)
 *
 *  1000 : Custom - Specify parameters in Configuration_adv.h
 *
 *         Use these for Testing or Development purposes. NEVER for production machine.
 *   998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
 *   999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
 */
//温度选择 0为禁用,1选用100K热敏电阻,。。。。。。
#define TEMP_SENSOR_0 20 
#define TEMP_SENSOR_1 20
#define TEMP_SENSOR_2 0
#define TEMP_SENSOR_3 0
#define TEMP_SENSOR_4 0
#define TEMP_SENSOR_5 0
#define TEMP_SENSOR_6 0
#define TEMP_SENSOR_7 0
#define TEMP_SENSOR_BED 1
#define TEMP_SENSOR_PROBE 0
#define TEMP_SENSOR_CHAMBER 0

// Dummy thermistor constant temperature readings, for use with 998 and 999
// 热敏电阻在常温下的读数,用于998和999 
#define DUMMY_THERMISTOR_998_VALUE 25
#define DUMMY_THERMISTOR_999_VALUE 100

// Resistor values when using a MAX31865 (sensor -5)
// Sensor value is typically 100 (PT100) or 1000 (PT1000)
// Calibration value is typically 430 ohm for AdaFruit PT100 modules and 4300 ohm for AdaFruit PT1000 modules.
//#define MAX31865_SENSOR_OHMS      100
//#define MAX31865_CALIBRATION_OHMS 430

// Use temp sensor 1 as a redundant sensor with sensor 0. If the readings
// from the two sensors differ too much the print will be aborted.
// 使用温度传感器1作为传感器0的冗余。如果两个读数差别过大则会被放弃。 
//#define TEMP_SENSOR_1_AS_REDUNDANT
#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10

// 挤出机的温度必须接近目标,否则一直等待直到M109返回成功 
#define TEMP_RESIDENCY_TIME     10  // (seconds) Time to wait for hotend to "settle" in M109 等待加热到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 “足够接近”目标(温度)的温度距

// 热床的温度必须接近目标,否则一直等待直到M190返回成功 
#define TEMP_BED_RESIDENCY_TIME 10  // (seconds) Time to wait for bed to "settle" in M190
#define TEMP_BED_WINDOW          1  // (°C) Temperature proximity for the "temperature reached" timer
#define TEMP_BED_HYSTERESIS      3  // (°C) Temperature proximity considered "close enough" to the target

// Below this temperature the heater will be switched off
// because it probably indicates a broken thermistor wire.
// (用于设置最低工作温度)若低于该温度,加热器则不工作,其主要用来检测热敏电阻的接线是否出错。
// 否则,这将导致加热器接通电源后一直工作。
#define HEATER_0_MINTEMP   5
#define HEATER_1_MINTEMP   5
#define HEATER_2_MINTEMP   5
#define HEATER_3_MINTEMP   5
#define HEATER_4_MINTEMP   5
#define HEATER_5_MINTEMP   5
#define HEATER_6_MINTEMP   5
#define HEATER_7_MINTEMP   5
#define BED_MINTEMP        5

// 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.)
// 定义最高温度,当温度超过最高温度,加热器将被关闭。 
// 这可以防止器件过热,但不能防止短路和故障。
// (采用MINTEMP检测热敏电阻短路/故障保护。)
#define HEATER_0_MAXTEMP 475
#define HEATER_1_MAXTEMP 475
#define HEATER_2_MAXTEMP 275
#define HEATER_3_MAXTEMP 275
#define HEATER_4_MAXTEMP 275
#define HEATER_5_MAXTEMP 275
#define HEATER_6_MAXTEMP 275
#define HEATER_7_MAXTEMP 275
#define BED_MAXTEMP      160

//===============================================================================================
//============================= PID Settings  比例微分积分控制 设置================================
//===============================================================================================
// PID Tuning Guide here: https://reprap.org/wiki/PID_Tuning

// Comment the following line to disable PID and enable bang-bang.
// 注释下列行将禁用PID而开启 bang-bang控制。
#define PIDTEMP
#define BANG_MAX 255     // Limits current to nozzle while in bang-bang mode; 255=full current// MOS管输出电流阈值0~255
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95      // Smoothing factor within any PID loop

#if ENABLED(PIDTEMP)
  #define PID_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)
  //#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]

//stj-3dprinter也提供两组稳定的PID数值供大家参考
//40W加热棒:Kp 20.78  Ki 1.57  Kd 68.94
//50W加热棒:Kp 14.63  Ki 0.98  Kd 54.53
  #if ENABLED(PID_PARAMS_PER_HOTEND)
    // Specify between 1 and HOTENDS values per array.
    // If fewer than EXTRUDER values are provided, the last element will be repeated.
    #define DEFAULT_Kp_LIST {  22.20,  22.20 }
    #define DEFAULT_Ki_LIST {   1.08,   1.08 }
    #define DEFAULT_Kd_LIST { 114.00, 114.00 }
  #else
    #define DEFAULT_Kp  26.58
    #define DEFAULT_Ki   2.57
    #define DEFAULT_Kd  68.70
  #endif
#endif // PIDTEMP

//===============================================================================================
//====================== PID > Bed Temperature Control (PID >热床温度控制)  ======================
//===============================================================================================

/**
 * PID Bed Heating
 *
 * If this option is enabled set PID constants below.
 * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
 * 选择PID or bang-bang 来控制热床温度,如果选用 bang-bang,BED_LIMIT_SWITCHING 将有所迟滞。
 *
 * The PID frequency will be the same as the extruder PWM.
 * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
 * which is fine for driving a square wave into a resistive load and does not significantly
 * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
 * heater. If your configuration is significantly different than this and you don't understand
 * the issues involved, don't use bed PID until someone else verifies that your hardware works.
 */
#define PIDTEMPBED

//#define BED_LIMIT_SWITCHING

/**
 * Max Bed Power
 * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis).
 * When set to any value below 255, enables a form of PWM to the bed that acts like a divider
 * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED)
 */
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current // 最大电流输出阈值; 255=全功率输出

#if ENABLED(PIDTEMPBED)
  //#define MIN_BED_POWER 0
  //#define PID_BED_DEBUG // Sends debug data to the serial port. 发送数据到串口调试。

// 120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
  // from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)
  #define DEFAULT_bedKp 182.30
  #define DEFAULT_bedKi 35.54
  #define DEFAULT_bedKd 623.41

// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED

#if EITHER(PIDTEMP, PIDTEMPBED)
  //#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
                                  // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
#endif

// @section extruder 挤出机信息

/**
 * Prevent extrusion if the temperature is below EXTRUDE_MINTEMP.
 * Add M302 to set the minimum extrusion temperature and/or turn
 * cold extrusion prevention on and off.
 * 
 * *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
 */
 //激活挤出机运转的最小温度180度,低于此温度挤出机被禁用。
 //如果前方加上“// ”,则在不加热的情况下也可以激活挤出机,让其转动
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 180

/**
 * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
 * Note: For Bowden Extruders make this large enough to allow load/unload.
 * 单次指令挤出距离的最大值200mm
 */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200

//========================================================================================
//======================== Thermal Runaway Protection  加热失控保护 =======================
//========================================================================================

/**
 * Thermal Protection provides additional protection to your printer from damage
 * and fire. Marlin always includes safe min and max temperature ranges which
 * protect against a broken or disconnected thermistor wire.
 * 加热防护主要用于保护您的打印机因热敏电阻脱落或温度传感器失效而造成损坏或起火,
 *
 * The issue: If a thermistor falls out, it will report the much lower
 * temperature of the air in the room, and the the firmware will keep
 * the heater on.
 * 问题:如果一个热敏电阻脱落或者温度传感器失效,当热敏电阻失效,Marlin将不能有效感知实际温度,
 * 从而会认为当前机器处于低温状态而持续加热。
 *
 * If you get "Thermal Runaway" or "Heating failed" errors the
 * details can be tuned in Configuration_adv.h
 */
//挤出头和热床的温度保护触发功能。
//当温度波动剧烈,则会触发。建议:挤出头做保温
//当加热指令发出,挤出头或热床温度没有上升,则会触发。建议:检查线路和输出电压值
//当超过设定的加热时间,温度仍没有达到设定值,则会触发。建议:加热棒和热床的电阻值

#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders //让所有挤出机具备热保护功能
#define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed //让热床具备热保护功能 
#define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber

//===================================================================================
//============================= Mechanical Settings  机械设置=========================
//===================================================================================

// @section machine 机械信息

// Enable one of the options below for CoreXY, CoreXZ, or CoreYZ kinematics,
// either in the usual order or reversed
// 取消下列注释将开启 CoreXY, CoreXZ, or CoreYZ 运动结构
//如果是corexy机型,可删除前面的 “//”
//#define COREXY
//#define COREXZ
//#define COREYZ
//#define COREYX
//#define COREZX
//#define COREZY
//#define MARKFORGED_XY  // MarkForged. See https://reprap.org/forum/read.php?152,504042

//=======================================================================================
//============================== Endstop Settings  限位开关设置===========================
//=======================================================================================

// @section homing  归零信息

// Specify here all the endstop connectors that are connected to any endstop or probe.
// 在这里指定的所有限位开关连接器包括所有限位开关或探头。
// Almost all printers will be using one per axis. Probes will use one or more of the
// extra connectors. Leave undefined any used for non-endstop and non-probe purposes.
// 几乎打印机的每个轴都要使用一个。探测器将使用一个或多个额外的连接器。
//开启G28回原点的位置,MIN为最小位置,MAX为最大位置。
//当XY为MIN时,正确的回零方位:左前方,或者右后方。
//当XY为MIN时,错误的回零方位:左后方,或者右前方,此时的打印结果为镜像模型。建议:在主板上,XY轴电机插槽互换。
#define USE_XMIN_PLUG
#define USE_YMIN_PLUG
#define USE_ZMIN_PLUG
//#define USE_XMAX_PLUG
//#define USE_YMAX_PLUG
//#define USE_ZMAX_PLUG

// Enable pullup for all endstops to prevent a floating state
#define ENDSTOPPULLUPS // 注释上这条将禁用限位开关的使用上拉电阻 (粗略的限位开关设置)
#if DISABLED(ENDSTOPPULLUPS)
  // Disable ENDSTOPPULLUPS to set pullups individually  // 限位开关上拉的单独设置:单个电阻。如果定义endstoppullups将忽略
  //#define ENDSTOPPULLUP_XMAX
  //#define ENDSTOPPULLUP_YMAX
  //#define ENDSTOPPULLUP_ZMAX
  //#define ENDSTOPPULLUP_XMIN
  //#define ENDSTOPPULLUP_YMIN
  //#define ENDSTOPPULLUP_ZMIN
  //#define ENDSTOPPULLUP_ZMIN_PROBE
#endif

// Enable pulldown for all endstops to prevent a floating state
//#define ENDSTOPPULLDOWNS
#if DISABLED(ENDSTOPPULLDOWNS)
  // Disable ENDSTOPPULLDOWNS to set pulldowns individually
  //#define ENDSTOPPULLDOWN_XMAX
  //#define ENDSTOPPULLDOWN_YMAX
  //#define ENDSTOPPULLDOWN_ZMAX
  //#define ENDSTOPPULLDOWN_XMIN
  //#define ENDSTOPPULLDOWN_YMIN
  //#define ENDSTOPPULLDOWN_ZMIN
  //#define ENDSTOPPULLDOWN_ZMIN_PROBE
#endif

// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
// 机械限位开关: COM 接地 、NC接信号 (最常见的设置)。 
// false值限位开关电位选择:限位开关的C,接主板的S;限位开关的NC,接主板的5V。
// true值限位开关电位选择:限位开关的C,接主板的S;限位开关的NO,接主板的G。
#define X_MIN_ENDSTOP_INVERTING true  // Set to true to invert the logic of the endstop. 设为true时逻辑将被翻转.
#define Y_MIN_ENDSTOP_INVERTING true  // Set to true to invert the logic of the endstop.
#define Z_MIN_ENDSTOP_INVERTING true  // Set to true to invert the logic of the endstop.
#define X_MAX_ENDSTOP_INVERTING true  // Set to true to invert the logic of the endstop.
#define Y_MAX_ENDSTOP_INVERTING true  // Set to true to invert the logic of the endstop.
#define Z_MAX_ENDSTOP_INVERTING true  // Set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING true  // Set to true to invert the logic of the probe.

/**
 * Stepper Drivers
 *
 * These settings allow Marlin to tune stepper driver timing and enable advanced options for
 * stepper drivers that support them. You may also override timing options in Configuration_adv.h.
 *
 * A4988 is assumed for unspecified drivers.
 *
 * Options: 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
 * :['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']
 */
//#define X_DRIVER_TYPE  A4988
//#define Y_DRIVER_TYPE  A4988
//#define Z_DRIVER_TYPE  A4988
//#define X2_DRIVER_TYPE A4988
//#define Y2_DRIVER_TYPE A4988
//#define Z2_DRIVER_TYPE A4988
//#define Z3_DRIVER_TYPE A4988
//#define Z4_DRIVER_TYPE A4988
//#define E0_DRIVER_TYPE A4988
//#define E1_DRIVER_TYPE A4988
//#define E2_DRIVER_TYPE A4988
//#define E3_DRIVER_TYPE A4988
//#define E4_DRIVER_TYPE A4988
//#define E5_DRIVER_TYPE A4988
//#define E6_DRIVER_TYPE A4988
//#define E7_DRIVER_TYPE A4988

// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
// 启动这项功能将启用所有限位开关引脚的中断能力 
//#define ENDSTOP_INTERRUPTS_FEATURE

/**
 * Endstop Noise Threshold
 *
 * Enable if your probe or endstops falsely trigger due to noise.
 *
 * - Higher values may affect repeatability or accuracy of some bed probes.
 * - To fix noise install a 100nF ceramic capacitor in parallel with the switch.
 * - This feature is not required for common micro-switches mounted on PCBs
 *   based on the Makerbot design, which already have the 100nF capacitor.
 *
 * :[2,3,4,5,6,7]
 */
//#define ENDSTOP_NOISE_THRESHOLD 2

// Check for stuck or disconnected endstops during homing moves.
//#define DETECT_BROKEN_ENDSTOP

//=====================================================================================
//============================== Movement Settings 运动设置 ============================
//=====================================================================================
// @section motion 运动信息

/**
 * Default Settings 
 *
 * These settings can be reset by M502
 *
 * Note that if EEPROM is enabled, saved values will override these.
 * 
 * 默认设置
 * 这些设置可以使用M502重置
 * 注意,如果EEPROM启用,所保存的值将被覆盖。
 */

/**
 * With this option each E stepper can have its own factors for the
 * following movement settings. If fewer factors are given than the
 * total number of extruders, the last value applies to the rest.
 */
//激活此项,可为不同的E轴(E0,E1,E2,E3,E4,E5)分别指定步进脉冲值
//#define DISTINCT_E_FACTORS

/**
 * Default Axis Steps Per Unit (steps/mm) 默认每个轴的步进值
 * Override with M92
 *                                      X, Y, Z, E0 [, E1[, E2...]]
 */
#define DEFAULT_AXIS_STEPS_PER_UNIT   { 107, 107, 800, 382 } // 106.666  106.666  800.000  140.056

/**
 * Default Max Feed Rate (mm/s)  默认最大进给速度 (mm/s)
 * Override with M203
 *                                      X, Y, Z, E0 [, E1[, E2...]]
 */
#define DEFAULT_MAX_FEEDRATE          { 500, 500, 20, 25 }

//#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
#endif

/**
 * Default Max Acceleration (change/s) change = mm/s  默认最大加速度
 * (Maximum start speed for accelerated moves)
 * Override with M201
 *                                      X, Y, Z, E0 [, E1[, E2...]]
 */
#define DEFAULT_MAX_ACCELERATION      { 1000, 1000, 1000, 1000 }

//#define LIMITED_MAX_ACCEL_EDITING     // Limit edit via M201 or LCD to DEFAULT_MAX_ACCELERATION * 2
#if ENABLED(LIMITED_MAX_ACCEL_EDITING)
  #define MAX_ACCEL_EDIT_VALUES       { 6000, 6000, 200, 20000 } // ...or, set your own edit limits
#endif

/**
 * Default Acceleration (change/s) change = mm/s 默认加速度
 * Override with M204
 *
 *   M204 P    Acceleration
 *   M204 R    Retract Acceleration
 *   M204 T    Travel Acceleration
 */
#define DEFAULT_ACCELERATION          500    // X, Y, Z and E acceleration for printing moves // X, Y, Z and E 打印加速度
#define DEFAULT_RETRACT_ACCELERATION  1000    // E acceleration for retracts // E 回缩加速度
#define DEFAULT_TRAVEL_ACCELERATION   1000    // X, Y, Z acceleration for travel (non printing) moves / X, Y, Z 移动加速度(非打印状态)

/**
 * Default Jerk limits (mm/s)
 * Override with M205 X Y Z E
 *
 * "Jerk" specifies the minimum speed change that requires acceleration.
 * When changing speed and direction, if the difference is less than the
 * value set here, it may happen instantaneously.
 * 
 * "Jerk"  指定的最小速度的变化所需要加速度。
 * 当改变速度和方向时, 如果差值小于在这里设置的值,它可能在瞬间发生。 
 */
//Jerk值:在加速的过程中,可拆分的最小加速距离。当加速距离小于该距离时,加速度值将不会被调整,延续之前的数值。
#define CLASSIC_JERK
#if ENABLED(CLASSIC_JERK)
  #define DEFAULT_XJERK 6.0
  #define DEFAULT_YJERK 6.0
  #define DEFAULT_ZJERK  0.3

//#define TRAVEL_EXTRA_XYJERK 0.0     // Additional jerk allowance for all travel moves

//#define LIMITED_JERK_EDITING        // Limit edit via M205 or LCD to DEFAULT_aJERK * 2
  #if ENABLED(LIMITED_JERK_EDITING)
    #define MAX_JERK_EDIT_VALUES { 20, 20, 0.6, 10 } // ...or, set your own edit limits
  #endif
#endif

#define DEFAULT_EJERK    5.0  // May be used by Linear Advance

/**
 * Junction Deviation Factor
 *
 * See:
 *   https://reprap.org/forum/read.php?1,739819
 *   https://blog.kyneticcnc.com/2018/10/computing-junction-deviation-for-marlin.html
 */
#if DISABLED(CLASSIC_JERK)
  #define JUNCTION_DEVIATION_MM 0.013 // (mm) Distance from real junction edge
  #define JD_HANDLE_SMALL_SEGMENTS    // Use curvature estimation instead of just the junction angle
                                      // for small segments (< 1mm) with large junction angles (> 135°).
#endif

/**
 * S-Curve Acceleration
 *
 * This option eliminates vibration during printing by fitting a Bézier
 * curve to move acceleration, producing much smoother direction changes.
 *
 * See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
 */
//#define S_CURVE_ACCELERATION

//======================================================================================
//============================= Z Probe Options  Z 探头选项 =============================
//======================================================================================
// @section probes

//
// See https://marlinfw.org/docs/configuration/probes.html
//

/**
 * Enable this option for a probe connected to the Z-MIN pin.
 * The probe replaces the Z-MIN endstop and is used for Z homing.
 * (Automatically enables USE_PROBE_FOR_Z_HOMING.)
 * 使能该项,是为了 探头连接到Z 最小限位开关的引脚
 * 这探头替代Z-Min的限位开关,并用于Z轴回零
 */
#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

/**
 * Z_MIN_PROBE_PIN
 *
 * Define this pin if the probe is not connected to Z_MIN_PIN.
 * If not defined the default pin for the selected MOTHERBOARD
 * will be used. Most of the time the default is what you want.
 *
 *  - The simplest option is to use a free endstop connector.
 *  - Use 5V for powered (usually inductive) sensors.
 *
 *  - RAMPS 1.3/1.4 boards may use the 5V, GND, and Aux4->D32 pin:
 *    - For simple switches connect...
 *      - normally-closed switches to GND and D32.
 *      - normally-open switches to 5V and D32.
 */
//#define Z_MIN_PROBE_PIN 32 // Pin 32 is the RAMPS default

/**
 * Probe Type 探针类型
 *
 * Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, etc. 点状探针、舵机探针
 * Activate one of these to use Auto Bed Leveling below.  你必须激活其中之一,才能去使用以下 “热床自动调平”功能
 */

/**
 * The "Manual Probe" provides a means to do "Auto" Bed Leveling without a probe.
 * Use G29 repeatedly, adjusting the Z height at each point with movement commands
 * or (with LCD_BED_LEVELING) the LCD controller.
 * “手动探针”提供了一种无探针条件下热床自动调平的手段。
 *  使用G29反复发送指令以调整Z轴与各点之间的高度。
 */
//#define PROBE_MANUALLY
//#define MANUAL_PROBE_START_Z 0.2

/**
 * A Fix-Mounted Probe either doesn't deploy or needs manual deployment. 
 *   (e.g., an inductive probe or a nozzle-based probe-switch.)
 * 固定式探头要么不需要配置,要么需要手动配置
 *  (e.g.,  感应探头或基于喷嘴头开关。)
 */
//#define FIX_MOUNTED_PROBE

/**
 * Use the nozzle as the probe, as with a conductive
 * nozzle system or a piezo-electric smart effector.
 */
//#define NOZZLE_AS_PROBE

/**
 * Z Servo Probe, such as an endstop switch on a rotating arm.
 * Z 轴舵机探针, 如在一个旋转臂上安装一个限位开关.
 */
//#define Z_PROBE_SERVO_NR 0       // Defaults to SERVO 0 connector.
//#define Z_SERVO_ANGLES { 70, 0 } // Z Servo Deploy and Stow angles

/**
 * The BLTouch probe uses a Hall effect sensor and emulates a servo.
 * BLTouch  探针, 使用霍尔效应传感器和模拟舵机.
 */
#define BLTOUCH

/**
 * Pressure sensor with a BLTouch-like interface
 */
//#define CREALITY_TOUCH

/**
 * Touch-MI Probe by hotends.fr
 *
 * This probe is deployed and activated by moving the X-axis to a magnet at the edge of the bed.
 * By default, the magnet is assumed to be on the left and activated by a home. If the magnet is
 * on the right, enable and set TOUCH_MI_DEPLOY_XPOS to the deploy position.
 *
 * Also requires: BABYSTEPPING, BABYSTEP_ZPROBE_OFFSET, Z_SAFE_HOMING,
 *                and a minimum Z_HOMING_HEIGHT of 10.
 */
//#define TOUCH_MI_PROBE
#if ENABLED(TOUCH_MI_PROBE)
  #define TOUCH_MI_RETRACT_Z 0.5                  // Height at which the probe retracts
  //#define TOUCH_MI_DEPLOY_XPOS (X_MAX_BED + 2)  // For a magnet on the right side of the bed
  //#define TOUCH_MI_MANUAL_DEPLOY                // For manual deploy (LCD menu)
#endif

// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
// 探针的部署和收起主要靠SOL1_PIN 来控制 
//#define SOLENOID_PROBE

// A sled-mounted probe like those designed by Charles Bell.
//#define Z_PROBE_SLED
//#define SLED_DOCKING_OFFSET 5  // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.

// A probe deployed by moving the x-axis, such as the Wilson II's rack-and-pinion probe designed by Marty Rice.
//#define RACK_AND_PINION_PROBE
#if ENABLED(RACK_AND_PINION_PROBE)
  #define Z_PROBE_DEPLOY_X  X_MIN_POS
  #define Z_PROBE_RETRACT_X X_MAX_POS
#endif

// Duet Smart Effector (for delta printers) - https://bit.ly/2ul5U7J
// When the pin is defined you can use M672 to set/reset the probe sensivity.
//#define DUET_SMART_EFFECTOR
#if ENABLED(DUET_SMART_EFFECTOR)
  #define SMART_EFFECTOR_MOD_PIN  -1  // Connect a GPIO pin to the Smart Effector MOD pin
#endif

/**
 * Use StallGuard2 to probe the bed with the nozzle.
 * Requires stallGuard-capable Trinamic stepper drivers.
 * CAUTION: This can damage machines with Z lead screws.
 *          Take extreme care when setting up this feature.
 */
//#define SENSORLESS_PROBING

//
// For Z_PROBE_ALLEN_KEY see the Delta example configurations.
// 对于z_probe_allen_key可参考“三角洲”配置示例。
//
/**
 * Nozzle-to-Probe offsets { X, Y, Z }
 * Z探针相对于喷嘴位置{ X, Y, Z }的补偿
 * 
 * - 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.
 *
 * 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"
 *
 *     +-- 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-)
 *     |    [-]    |
 *     O-- FRONT --+
 */
#define NOZZLE_TO_PROBE_OFFSET { -36, 10, -5 }

// 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.
// 大多数探头应远离床的边缘, 但使用NOZZLE_AS_PROBE情况下,对于更大的探测区域,这可能是负面的。
#define PROBING_MARGIN 10

// X and Y axis travel speed (mm/min) between probes 
// 在探测时 X and Y轴的移动速度
#define XY_PROBE_SPEED (50*60)

// Feedrate (mm/min) for the first approach when double-probing (MULTIPLE_PROBING == 2)
// 当选探测两次的模式,在第一次探测时,Z轴的移动速度
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z

// Feedrate (mm/min) for the "accurate" probe of each point
//  每个点的探测速度
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)

/**
 * Multiple Probing
 *
 * You may get improved results by probing 2 or more times.
 * With EXTRA_PROBING the more atypical reading(s) will be disregarded.
 *
 * 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

/**
 * Z probes require clearance when deploying, stowing, and moving between
 * probe points to avoid hitting the bed and other hardware.
 * Servo-mounted probes require extra space for the arm to rotate.
 * Inductive probes need space to keep from triggering early.
 * 在探测、收起或探测点之间移动时,为避免触碰其他硬件或热床,Z轴探针需要确保足够的空间
 * 安装在伺服装置上的探头也许需要足够的空间来保证机械臂旋转。
 * 而感应探针则需要足够的空间来避免过早被碰撞。
 *
 * Use these settings to specify the distance (mm) to raise the probe (or
 * lower the bed). The values set here apply over and above any (negative)
 * probe Z Offset set with NOZZLE_TO_PROBE_OFFSET, M851, or the LCD.
 * Only integer values >= 1 are valid here.
 * 使用这些设置来确保探针在探测移动过程中的距离(或降低热床) 
 *
 * Example: `M851 Z-5` with a CLEARANCE of 4  =>  9mm from bed to nozzle.
 *     But: `M851 Z+1` with a CLEARANCE of 2  =>  2mm from bed to nozzle.
 */
#define Z_CLEARANCE_DEPLOY_PROBE   10 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES  3 // Z Clearance between probe points
#define Z_CLEARANCE_MULTI_PROBE     2 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING           5 // Z position after probing is done

#define Z_PROBE_LOW_POINT          -2 // Farthest distance below the trigger-point to go before stopping

// For M851 give a range for adjusting the Z probe offset
//使用 M851  给个范围以调整Z探针偏移
#define Z_PROBE_OFFSET_RANGE_MIN -20
#define Z_PROBE_OFFSET_RANGE_MAX 20

// Enable the M48 repeatability test to test probe accuracy
//   可使用  M48 进行重复性测试以测试 探头精度
//#define Z_MIN_PROBE_REPEATABILITY_TEST

// Before deploy/stow pause for user confirmation
//#define PAUSE_BEFORE_DEPLOY_STOW
#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW)
  //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe
#endif

/**
 * Enable one or more of the following if probing seems unreliable.
 * Heaters and/or fans can be disabled during probing to minimize electrical
 * noise. A delay can also be added to allow noise and vibration to settle.
 * These options are most useful for the BLTouch probe, but may also improve
 * readings with inductive probes and piezo sensors.
 * 
 * 如果探针看起来不太可靠时则需要开启以下的一个或多个。
 * 在探测过程中,可以关闭加热器和风扇,以减少电子噪音。(加热器和风扇的工作会影响探针的有效探测)
 * 也可以通过延迟,以使噪音和振动稳定下来。
 * 这些选项对BLTouch探头最有用,但也可以通过感应探头和压电感应器,提高读取数值。
 */
//#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 PROBING_STEPPERS_OFF      // Turn steppers off (unless needed to hold position) when probing
//#define DELAY_BEFORE_PROBING 200  // (ms) To prevent vibrations from triggering piezo sensors

// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
// 反转电机的引脚驱动(低电平使能为0、高电平使能为1)
// :{ 0:'Low', 1:'High' }
#define X_ENABLE_ON 0
#define Y_ENABLE_ON 0
#define Z_ENABLE_ON 0
#define E_ENABLE_ON 0 // For all extruders

// Disable axis steppers immediately when they're not being stepped.
// // 当某个轴上的步进电机不需要使用时可禁用它。
// 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
// 关闭关于 “精度降低” 的警告的闪烁显示。
//#define DISABLE_REDUCED_ACCURACY_WARNING

// @section extruder 挤出机信息

#define DISABLE_E false             // Disable the extruder when not stepping // 当不动时,关闭所有挤出机
#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.
// 反转步进电机的方向
// 此项可改变XYZ电机的转向,false 改 true , 电机发生反转。反之也一样。
#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.
// 直接挤出机则设为true,齿轮挤出机则设为false
// 此项可改变E电机的转向,false 改 true , 电机发生反转。反之也一样。
#define INVERT_E0_DIR false
#define INVERT_E1_DIR false
#define INVERT_E2_DIR true
#define INVERT_E3_DIR false
#define INVERT_E4_DIR false
#define INVERT_E5_DIR false
#define INVERT_E6_DIR false
#define INVERT_E7_DIR false

// @section homing 归零信息

//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed

//#define UNKNOWN_Z_NO_RAISE      // Don't raise Z (lower the bed) if Z is "unknown." For beds that fall when Z is powered off.

#define Z_HOMING_HEIGHT  5      // (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.
                                  //  在归零时让Z轴抬起的高度

//#define Z_AFTER_HOMING  10      // (mm) Height to move to after homing Z

// Direction of endstops when homing; 1=MAX, -1=MIN
//  归零时的限位开关方向 :[-1,1]
// 运行G28回原点时,XYZ的停靠方向。-1是停靠最小限位,1是停靠最大限位。
#define X_HOME_DIR -1
#define Y_HOME_DIR -1
#define Z_HOME_DIR -1

// @section machine 机械信息

// The size of the print bed
//热床尺寸可定义变量,单位mm
#define X_BED_SIZE 300
#define Y_BED_SIZE 400

// Travel limits (mm) after homing, corresponding to endstop positions.
// 移动范围(零点到限位开关位置间)
//XYZ最大行程设定,俗称“软限位”。所以,通常3d打印机用3个最小限位就可以拥有6个限位值。XY的最大限位是等于热床的最大尺寸,也可以超过其尺寸。
#define X_MIN_POS 0
#define Y_MIN_POS 0
#define Z_MIN_POS 0
#define X_MAX_POS X_BED_SIZE
#define Y_MAX_POS Y_BED_SIZE
#define Z_MAX_POS 500

/**
 * Software Endstops
 *
 * - Prevent moves outside the set machine bounds.
 * - Individual axes can be disabled, if desired.
 * - X and Y only apply to Cartesian robots.
 * - Use 'M211' to set software endstops on/off or report current state
 */

// Min software endstops constrain movement within minimum coordinate bounds
//   如果开启,轴的运动最小不小于  MIN_POS  //软限位
#define MIN_SOFTWARE_ENDSTOPS
#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
  #define MIN_SOFTWARE_ENDSTOP_X
  #define MIN_SOFTWARE_ENDSTOP_Y
  #define MIN_SOFTWARE_ENDSTOP_Z
#endif

// Max software endstops constrain movement within maximum coordinate bounds
//  如果开启,轴的运动最大不高于  MAX_POS  //软限位
#define MAX_SOFTWARE_ENDSTOPS
#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
  #define MAX_SOFTWARE_ENDSTOP_X
  #define MAX_SOFTWARE_ENDSTOP_Y
  #define MAX_SOFTWARE_ENDSTOP_Z
#endif

#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS)
  //#define SOFT_ENDSTOPS_MENU_ITEM  // Enable/Disable software endstops from the LCD
#endif

/**
 * Filament Runout Sensors  
 * Mechanical or opto endstops are used to check for the presence of filament.
 * 缺料检测传感器,检测是否缺料
 * 
 * RAMPS-based boards use SERVO3_PIN for the first runout sensor.
 * For other boards you may need to define FIL_RUNOUT_PIN, FIL_RUNOUT2_PIN, etc.
 */
//#define FILAMENT_RUNOUT_SENSOR
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
  #define FIL_RUNOUT_ENABLED_DEFAULT true // Enable the sensor on startup. Override with M412 followed by M500.
  #define NUM_RUNOUT_SENSORS   1          // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each.
  #define FIL_RUNOUT_STATE     LOW        // Pin state indicating that filament is NOT present.
  #define FIL_RUNOUT_PULLUP               // Use internal pullup for filament runout pins.
  //#define FIL_RUNOUT_PULLDOWN           // Use internal pulldown for filament runout pins.

// Set one or more commands to execute on filament runout.
  // (After 'M412 H' Marlin will ask the host to handle the process.)
  #define FILAMENT_RUNOUT_SCRIPT "M600"

// After a runout is detected, continue printing this length of filament
  // before executing the runout script. Useful for a sensor at the end of
  // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.
  //#define FILAMENT_RUNOUT_DISTANCE_MM 25

#ifdef FILAMENT_RUNOUT_DISTANCE_MM
    // Enable this option to use an encoder disc that toggles the runout pin
    // as the filament moves. (Be sure to set FILAMENT_RUNOUT_DISTANCE_MM
    // large enough to avoid false positives.)
    //#define FILAMENT_MOTION_SENSOR
  #endif
#endif

//===================================================================================
//=============================== Bed Leveling  热床调平==============================
//===================================================================================
// @section calibrate

/**
 * Choose one of the options below to enable G29 Bed Leveling. The parameters
 * and behavior of G29 will change depending on your selection.
 * 选择下列选项之一以使用G29来调整热床水平。
 * G29的参数及运行动作将会随着你所设置的选项而发生改变。
 * 
 *  If using a Probe for Z Homing, enable Z_SAFE_HOMING also!
 *  如果使用Z归零探针,请注意开启 Z_SAFE_HOMING 
 *
 * - AUTO_BED_LEVELING_3POINT
 *   Probe 3 arbitrary points on the bed (that aren't collinear)
 *   You specify the XY coordinates of all 3 points.
 *   The result is a single tilted plane. Best for a flat bed.
 *   探测热床上的任意3点(3点不在一条线上)
 *   您需要指定3个点的XY坐标。
 *   结果是一个倾斜的平面。最适合是个平板。
 *
 * - AUTO_BED_LEVELING_LINEAR // 线性
 *   Probe several points in a grid.
 *   You specify the rectangle and the density of sample points.
 *   The result is a single tilted plane. Best for a flat bed.
 *   探测网格中的几个点。
 *   您需要指定的矩形以及采样点的密度。
 *   结果是一个倾斜的平面。最适合是个平板。
 *
 * - AUTO_BED_LEVELING_BILINEAR // 双线性 
 *   Probe several points in a grid.
 *   You specify the rectangle and the density of sample points.
 *   The result is a mesh, best for large or uneven beds.
 *   探测网格中的几个点。  
 *   您需要指定的矩形以及采样点的密度。
 *   结果形成了网状结构,最适合大床或不均匀床。
 *
 * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)  (联合热床调平)
 *   A comprehensive bed leveling system combining the features and benefits
 *   of other systems. UBL also includes integrated Mesh Generation, Mesh
 *   Validation and Mesh Editing systems.
 *   一个结合了其他系统特点及优势的全面调平系统。
 *   联合热床调平 同样包括集成的网格生成,网格验证及网格编辑系统 。
 *
 * - MESH_BED_LEVELING
 *   Probe a grid manually
 *   The result is a mesh, suitable for large or uneven beds. (See BILINEAR.)
 *   For machines without a probe, Mesh Bed Leveling provides a method to perform
 *   leveling in steps so you can manually adjust the Z height at each grid-point.
 *   With an LCD controller the process is guided step-by-step.
 *   探测一个手动网格
 *   其结果是一个网格,适合大型或凹凸不平的床。 (See BILINEAR.)
 *   对于没有探针的机器 , 网床找平提供了一种在台阶上进行水准测量的方法,以便在每个网格点上手动调整z高度。 
 *   根据LCD控制器的指示一步一步进行调整。
 */
//#define AUTO_BED_LEVELING_3POINT //3点式
//#define AUTO_BED_LEVELING_LINEAR
#define AUTO_BED_LEVELING_BILINEAR
//#define AUTO_BED_LEVELING_UBL
//#define MESH_BED_LEVELING

/**
 * Normally G28 leaves leveling disabled on completion. Enable
 * this option to have G28 restore the prior leveling state.
 */
//#define RESTORE_LEVELING_AFTER_G28

/**
 * Enable detailed logging of G28, G29, M48, etc.
 * Turn on with the command 'M111 S32'.
 * NOTE: Requires a lot of PROGMEM!
 * 启用G28, G29, M48运行的详细日志
 * 使用'M111 S32'命令来开启
 */
//#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,
  // at which point movement will be level to the machine's XY plane.
  // The height can be set with M420 Z<height>
  // 逐渐进行热床水平修正直到刚刚达到所设置X,Y坐标所对应的高度  
  // 这个高度可以使用 M420 Z<height> 来进行设置  
  #define ENABLE_LEVELING_FADE_HEIGHT

// For Cartesian machines, instead of dividing moves on mesh boundaries,
  // split up moves into short segments like a Delta. This follows the
  // contours of the bed more closely than edge-to-edge straight moves.
  #define SEGMENT_LEVELED_MOVES
  #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one)

/**
   * Enable the G26 Mesh Validation Pattern tool.
   */
  //#define G26_MESH_VALIDATION
  #if ENABLED(G26_MESH_VALIDATION)
    #define MESH_TEST_NOZZLE_SIZE    0.4  // (mm) Diameter of primary nozzle.
    #define MESH_TEST_LAYER_HEIGHT   0.2  // (mm) Default layer height for the G26 Mesh Validation Tool.
    #define MESH_TEST_HOTEND_TEMP  205    // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
    #define MESH_TEST_BED_TEMP      60    // (°C) Default bed temperature for the G26 Mesh Validation Tool.
    #define G26_XY_FEEDRATE         20    // (mm/s) Feedrate for XY Moves for the G26 Mesh Validation Tool.
    #define G26_RETRACT_MULTIPLIER   1.0  // G26 Q (retraction) used by default between mesh test elements.
  #endif

#endif

#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR)

// Set the number of grid points per dimension.
  //  设置每个维度的网格点数。
  #define GRID_MAX_POINTS_X 4
  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X

// Probe along the Y axis, advancing X after each column
  // 探针沿着Y轴,不断改变X的值 直到完成每一列的探测
  //#define PROBE_Y_FIRST

#if ENABLED(AUTO_BED_LEVELING_BILINEAR)

// Beyond the probed grid, continue the implied tilt?
    // Default is to maintain the height of the nearest edge.
    // 在探测网格之外,存在隐含的倾斜?
    // 默认保存就近边缘的高度
    //#define EXTRAPOLATE_BEYOND_GRID

//
    // Experimental Subdivision of the grid by Catmull-Rom method.
    // Synthesizes intermediate points to produce a more detailed mesh.
    // 通过Catmull-Rom方法细分网格实验。
    // 合成中间点以产生更详细的网格。
    //#define ABL_BILINEAR_SUBDIVISION
    #if ENABLED(ABL_BILINEAR_SUBDIVISION)
      // Number of subdivisions between probe points
      // 探针点之间的细分数目
      #define BILINEAR_SUBDIVISIONS 3
    #endif

#endif

#elif ENABLED(AUTO_BED_LEVELING_UBL)

//==========================================================================================
  //========================= Unified Bed Leveling  联合热床自动调平============================
  //==========================================================================================

//#define MESH_EDIT_GFX_OVERLAY   // Display a graphics overlay while editing the mesh

#define MESH_INSET 1              // Set Mesh bounds as an inset region of the bed // 在打印区域插入网格
  #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited. 
                                     // 不要每轴使用超过15个点,在实现上有所限制。
  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X

#define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle // 老用户喜欢喷嘴不移动
  #define UBL_SAVE_ACTIVE_ON_M500   // Save the currently active mesh in the current slot on M500

//#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used
                                          // as the Z-Height correction value.

#elif ENABLED(MESH_BED_LEVELING)

//================================================================================
  //=================================== Mesh 网格 ==================================
  //================================================================================

#define MESH_INSET 10          // Set Mesh bounds as an inset region of the bed  // 在打印区域插入网格
  #define GRID_MAX_POINTS_X 3    // Don't use more than 7 points per axis, implementation limited. // 不要每轴使用超过7个点,实现限制。
  #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
                                 // 在所有轴归零后 ('G28' or 'G28 XYZ') 让Z轴重设在 Z_MIN_POS 的位置

#endif // BED_LEVELING

/**
 * Add a bed leveling sub-menu for ABL or MBL.
 * Include a guided procedure if manual probing is enabled.
 */
//#define LCD_BED_LEVELING

#if ENABLED(LCD_BED_LEVELING)
  #define MESH_EDIT_Z_STEP  0.025 // (mm) Step size while manually probing Z axis. // 手动探测过程中Z轴的移动步长
  #define LCD_PROBE_Z_RANGE 4     // (mm) Z Range centered on Z_MIN_POS for LCD Z adjustment //使用LCD来进行控制时 Z轴的移动范围(从Z_MIN_POS )
  //#define MESH_EDIT_MENU        // Add a menu to edit mesh points
#endif

// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS

#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
#endif

/**
 * Commands to execute at the end of G29 probing.
 * Useful to retract or move the Z probe out of the way.
 * 用于执行 G29 探测命令。
 * 用于缩回或移动Z探头,非常有用
 */
//#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10"

// @section homing  归零信息

// The center of the bed is at (X=0, Y=0) 
// 热床中心(X=0, Y=0)
//#define BED_CENTER_AT_0_0

// Manually set the home position. Leave these undefined for automatic settings.
// For DELTA this is the top-center of the Cartesian print volume.
// 手动设置零位。为自动设置保留这些未定义。
// 对于DELTA来说,这是笛卡尔打印的顶部中心。
//#define MANUAL_X_HOME_POS 0
//#define MANUAL_Y_HOME_POS 0
//#define MANUAL_Z_HOME_POS 0

// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area.
// 使用“Z安全归零”,避免在归零操作是Z探针在床区外 
// 
// With this feature enabled:
// 启用此功能:
// 
// - Allow Z homing only after X and Y homing AND stepper drivers still enabled.
// - If stepper drivers time out, it will need X and Y homing again before Z homing.
// - Move the Z probe (or nozzle) to a defined XY point before Z Homing.
// - Prevent Z homing when the Z probe is outside bed area.
//   只有在X和Y归零,并且步进驱动程序仍然使用后才允许Z归零。
//   如果电机驱动器超时, 它将需要X和Y重新归零然后再让Z归零。
//   在Z轴归零前,移动Z轴探头(喷嘴)到一个定义的XY点
//   当Z轴在热床之外时,阻止Z轴归零

#define Z_SAFE_HOMING

#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
#endif

// Homing speeds (mm/min) 归零速度(mm/min)
#define HOMING_FEEDRATE_XY (50*60)
#define HOMING_FEEDRATE_Z  (4*60)

// Validate that endstops are triggered on homing moves
#define VALIDATE_HOMING_ENDSTOPS

// @section calibrate

/**
 * Bed Skew Compensation
 *
 * This feature corrects for misalignment in the XYZ axes.
 *
 * Take the following steps to get the bed skew in the XY plane:
 *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
 *  2. For XY_DIAG_AC measure the diagonal A to C
 *  3. For XY_DIAG_BD measure the diagonal B to D
 *  4. For XY_SIDE_AD measure the edge A to D
 *
 * Marlin automatically computes skew factors from these measurements.
 * Skew factors may also be computed and set manually:
 *
 *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
 *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
 *
 * If desired, follow the same procedure for XZ and YZ.
 * Use these diagrams for reference:
 *
 *    Y                     Z                     Z
 *    ^     B-------C       ^     B-------C       ^     B-------C
 *    |    /       /        |    /       /        |    /       /
 *    |   /       /         |   /       /         |   /       /
 *    |  A-------D          |  A-------D          |  A-------D
 *    +-------------->X     +-------------->X     +-------------->Y
 *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
 */
//#define SKEW_CORRECTION

#if ENABLED(SKEW_CORRECTION)
  // Input all length measurements here:
  #define XY_DIAG_AC 282.8427124746
  #define XY_DIAG_BD 282.8427124746
  #define XY_SIDE_AD 200

// Or, set the default skew factors directly here
  // to override the above measurements:
  #define XY_SKEW_FACTOR 0.0

//#define SKEW_CORRECTION_FOR_Z
  #if ENABLED(SKEW_CORRECTION_FOR_Z)
    #define XZ_DIAG_AC 282.8427124746
    #define XZ_DIAG_BD 282.8427124746
    #define YZ_DIAG_AC 282.8427124746
    #define YZ_DIAG_BD 282.8427124746
    #define YZ_SIDE_AD 200
    #define XZ_SKEW_FACTOR 0.0
    #define YZ_SKEW_FACTOR 0.0
  #endif

// Enable this option for M852 to set skew at runtime
  //#define SKEW_CORRECTION_GCODE
#endif

//=====================================================================================
//============================= Additional Features 附加特性 ===========================
//=====================================================================================

// @section extras  附加信息

/**
 * EEPROM 存储器;
 *
 * Persistent storage to preserve configurable settings across reboots.
 * 长久存储,保存可配置的设置,以用于启动的时候
 *
 *   M500 - Store settings to EEPROM.
 *   M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes)
 *   M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.)
 * 
 *   M500 - 在 EEPROM 中存储参数  
 *   M501 - 从 EEPROM 读取参数 
 *   M502 - 恢复出厂设置。 
 */
#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. // 对EEPROM命令(通过串口打印)给予反馈
#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

//
// Host Keepalive
// 主机保持活跃状态
// 
// When enabled Marlin will send a busy status message to the host
// every couple of seconds when it can't accept commands.
// 当启用时,Marlin在无法接受命令时,其将每隔几秒钟就会发送一个繁忙的状态信息给主机。
//
#define HOST_KEEPALIVE_FEATURE        // Disable this if your host doesn't like keepalive messages //禁用此条语句,如果不喜欢主机接受保持活跃状态的消息
#define DEFAULT_KEEPALIVE_INTERVAL 2  // Number of seconds between "busy" messages. Set with M113. //  “繁忙”消息之间的间隔秒数,使用M113进行设置.
#define BUSY_WHILE_HEATING            // Some hosts require "busy" messages even during heating // 一些主机在加热期间,需要不断的有信息反馈

//
// G20/G21 Inch mode support
// G20/G21 寸模式支持
//
//#define INCH_MODE_SUPPORT

//
// M149 Set temperature units support
// M149  支持设置温度单位 
//
//#define TEMPERATURE_UNITS_SUPPORT

// @section temperature 温度信息

// Preheat Constants
//  预热常数
#define PREHEAT_1_LABEL       "PLA"
#define PREHEAT_1_TEMP_HOTEND 200
#define PREHEAT_1_TEMP_BED     70
#define PREHEAT_1_FAN_SPEED     0 // Value from 0 to 255

#define PREHEAT_2_LABEL       "ABS"
#define PREHEAT_2_TEMP_HOTEND 240
#define PREHEAT_2_TEMP_BED    110
#define PREHEAT_2_FAN_SPEED     0 // Value from 0 to 255

/**
 * Nozzle Park 喷嘴停止
 *
 * Park the nozzle at the given XYZ position on idle or G27.
 * 在空闲时将喷嘴置于给定的XYZ位置 or G27.
 * 
 * The "P" parameter controls the action applied to the Z axis:
 *  “p”参数控制应用于z轴的操作。:
 *
 *    P0  (Default) If Z is below park Z raise the nozzle.
 *    P1  Raise the nozzle always to Z-park height.
 *    P2  Raise the nozzle by Z-park amount, limited to Z_MAX_POS.
 * 
 *    P0  (Default) 如果当前z的位置低于 z 停驻位置,将抬起喷嘴。 
 *    P1   总是提高喷嘴到 z 停驻位置的高度 。
 *    P2   总是提高喷嘴到 z 停驻位置的高度, 同时也受限于 Z_MAX_POS.
 */
//#define NOZZLE_PARK_FEATURE

#if ENABLED(NOZZLE_PARK_FEATURE)
  // Specify a park position as { X, Y, Z_raise }
  // 指定停驻位置{ X, Y, Z }
  #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 }
  //#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
  #define NOZZLE_PARK_XY_FEEDRATE 100   // (mm/s) X and Y axes feedrate (also used for delta Z axis)
  #define NOZZLE_PARK_Z_FEEDRATE    5   // (mm/s) Z axis feedrate (not used for delta printers)
#endif

/**
 * Clean Nozzle Feature -- EXPERIMENTAL
 * 清洁喷嘴的参数 -- 实验性的
 *
 * Adds the G12 command to perform a nozzle cleaning process.
 * 添加G12命令用于执行喷嘴清洗工作。
 *  
 * Parameters:
 *   P  Pattern
 *   S  Strokes / Repetitions
 *   T  Triangles (P1 only)
 * 参数:
 *   P  模式
 *   S  Strokes / Repetitions
 *   T  三角形 (P1 only)
 * 
 * Patterns: 模式:
 *   P0  Straight line (default). This process requires a sponge type material
 *       at a fixed bed location. "S" specifies strokes (i.e. back-forth motions)
 *       between the start / end points.
 *   P0  直线(默认).  .这个过程需要在热床的指定位置上使用海绵状材料。 "S" 指定开始和结束的点 
 * 
 *   P1  Zig-zag pattern between (X0, Y0) and (X1, Y1), "T" specifies the
 *       number of zig-zag triangles to do. "S" defines the number of strokes.
 *       Zig-zags are done in whichever is the narrower dimension.
 *       For example, "G12 P1 S1 T3" will execute:
 * 
 *   P1  在 (X0, Y0)与(X1, Y1) 之间呈锯齿形图案, "T" 主要指定锯齿数量. "S"  定义笔画数.    
 *       For example, "G12 P1 S1 T3" will execute:
 * 
 *          --
 *         |  (X0, Y1) |     /\        /\        /\     | (X1, Y1)
 *         |           |    /  \      /  \      /  \    |
 *       A |           |   /    \    /    \    /    \   |
 *         |           |  /      \  /      \  /      \  |
 *         |  (X0, Y0) | /        \/        \/        \ | (X1, Y0)
 *          --         +--------------------------------+
 *                       |________|_________|_________|
 *                           T1        T2        T3
 *
 *   P2  Circular pattern with middle at NOZZLE_CLEAN_CIRCLE_MIDDLE.
 *       "R" specifies the radius. "S" specifies the stroke count.
 *       Before starting, the nozzle moves to NOZZLE_CLEAN_START_POINT.
 *   P2  以NOZZLE_CLEAN_CIRCLE_MIDDLE为中心的圆. 
 *       "R"指定半径. "S"指定划数.
 *       启动前,喷嘴移动到 NOZZLE_CLEAN_START_POINT 点的位置.
 * 
 *   Caveats: The ending Z should be the same as starting Z.
 * Attention: EXPERIMENTAL. G-code arguments may change.
 *   注意事项:结束Z应该与启动Z相同。
 */
//#define NOZZLE_CLEAN_FEATURE

#if ENABLED(NOZZLE_CLEAN_FEATURE)
  // Default number of pattern repetitions
   // 模式重复的默认数目
  #define NOZZLE_CLEAN_STROKES  12

// Default number of triangles
  // 默认三角形数
  #define NOZZLE_CLEAN_TRIANGLES  3

// Specify positions for each tool as { { X, Y, Z }, { X, Y, Z } }
  // 指定的位置{ X, Y, Z }
  // Dual hotend system may use { {  -20, (Y_BED_SIZE / 2), (Z_MIN_POS + 1) },  {  420, (Y_BED_SIZE / 2), (Z_MIN_POS + 1) }}
  #define NOZZLE_CLEAN_START_POINT { {  30, 30, (Z_MIN_POS + 1) } }
  #define NOZZLE_CLEAN_END_POINT   { { 100, 60, (Z_MIN_POS + 1) } }

// Circular pattern radius // 圆半径
  #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5
  // Circular pattern circle fragments number //圆型圆碎片数
  #define NOZZLE_CLEAN_CIRCLE_FN 10
  // Middle point of circle /圆中心点
  #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT

// Move the nozzle to the initial position after cleaning 
  // 清理后,将喷嘴移动到初始位置。
  #define NOZZLE_CLEAN_GOBACK

// For a purge/clean station that's always at the gantry height (thus no Z move)
  //#define NOZZLE_CLEAN_NO_Z

// For a purge/clean station mounted on the X axis
  //#define NOZZLE_CLEAN_NO_Y

// Explicit wipe G-code script applies to a G12 with no arguments.
  //#define WIPE_SEQUENCE_COMMANDS "G1 X-17 Y25 Z10 F4000\nG1 Z1\nM114\nG1 X-17 Y25\nG1 X-17 Y95\nG1 X-17 Y25\nG1 X-17 Y95\nG1 X-17 Y25\nG1 X-17 Y95\nG1 X-17 Y25\nG1 X-17 Y95\nG1 X-17 Y25\nG1 X-17 Y95\nG1 X-17 Y25\nG1 X-17 Y95\nG1 Z15\nM400\nG0 X-10.0 Y-9.0"

#endif

/**
 * Print Job Timer  // 打印作业的定时器
 *
 * Automatically start and stop the print job timer on M104/M109/M190.
 * 自动启动和停止打印作业计时器 M104/M109/M190.
 *
 *   M104 (hotend, no wait) - high temp = none,        low temp = stop timer
 *   M109 (hotend, wait)    - high temp = start timer, low temp = stop timer
 *   M190 (bed, wait)       - high temp = start timer, low temp = none
 *
 * The timer can also be controlled with the following commands:
 * 计时器也可以用以下命令来控制:
 * 
 *   M75 - Start the print job timer 启动打印作业计时器
 *   M76 - Pause the print job timer 暂停打印作业计时器
 *   M77 - Stop the print job timer  停止打印作业计时器
 */
#define PRINTJOB_TIMER_AUTOSTART

/**
 * Print Counter  //设置打印计数器
 *
 * Track statistical data such as:
 * 跟踪统计数据,例如:
 * 
 *  - Total print jobs
 *  - Total successful print jobs
 *  - Total failed print jobs
 *  - Total time printing
 *
 *  -   总打印作业数
 *  -   总成功打印作业数
 *  -   总失败打印作业数
 *  -   总打印时长
 * 
 * View the current statistics with M78.
 * 使用M78查看当前统计数据 。
 */
//#define PRINTCOUNTER

/**
 * Password
 *
 * Set a numerical password for the printer which can be requested:
 *
 *  - When the printer boots up
 *  - Upon opening the 'Print from Media' Menu
 *  - When SD printing is completed or aborted
 *
 * The following G-codes can be used:
 *
 *  M510 - Lock Printer. Blocks all commands except M511.
 *  M511 - Unlock Printer.
 *  M512 - Set, Change and Remove Password.
 *
 * If you forget the password and get locked out you'll need to re-flash
 * the firmware with the feature disabled, reset EEPROM, and (optionally)
 * re-flash the firmware again with this feature enabled.
 */
//#define PASSWORD_FEATURE
#if ENABLED(PASSWORD_FEATURE)
  #define PASSWORD_LENGTH 4                 // (#) Number of digits (1-9). 3 or 4 is recommended
  #define PASSWORD_ON_STARTUP
  #define PASSWORD_UNLOCK_GCODE             // Unlock with the M511 P<password> command. Disable to prevent brute-force attack.
  #define PASSWORD_CHANGE_GCODE             // Change the password with M512 P<old> S<new>.
  //#define PASSWORD_ON_SD_PRINT_MENU       // This does not prevent gcodes from running
  //#define PASSWORD_AFTER_SD_PRINT_END
  //#define PASSWORD_AFTER_SD_PRINT_ABORT
  //#include "Configuration_Secure.h"       // External file with PASSWORD_DEFAULT_VALUE
#endif

//=================================================================================================
//============================= LCD and SD support  液晶显示器和SD卡支持 ============================
//=================================================================================================

// @section lcd 液晶显示器信息

/**
 * LCD LANGUAGE
 * LCD语言
 * 
 * Select the language to display on the LCD. These languages are available:
 *
 *   en, an, bg, ca, cz, da, de, el, el_gr, es, eu, fi, fr, gl, hr, hu, it,
 *   jp_kana, ko_KR, nl, pl, pt, pt_br, ro, ru, sk, tr, uk, vi, zh_CN, zh_TW, test
 *
 * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el_gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'hu':'Hungarian', 'it':'Italian', 'jp_kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt_br':'Portuguese (Brazilian)', 'ro':'Romanian', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
 */
//在机械按键屏中选择语言的种类,en英语,zh_CN简体中文,zh_TW繁体中文....等
#define LCD_LANGUAGE en

/**
 * LCD Character Set
 * LCD字符集
 * 
 * Note: This option is NOT applicable to Graphical Displays.
 * Note: 此选项不适用于图形显示
 * 
 * All character-based LCDs provide ASCII plus one of these
 * language extensions:
 *
 *  - JAPANESE ... the most common
 *  - WESTERN  ... with more accented characters
 *  - CYRILLIC ... for the Russian language
 *
 * To determine the language extension installed on your controller:
 * 确定控制器上安装的语言扩展名:
 * 
 *  - Compile and upload with LCD_LANGUAGE set to 'test'
 *  - Click the controller to view the LCD menu
 *  - The LCD will display Japanese, Western, or Cyrillic text
 *
 * See https://marlinfw.org/docs/development/lcd_language.html
 *
 * :['JAPANESE', 'WESTERN', 'CYRILLIC']
 */
#define DISPLAY_CHARSET_HD44780 JAPANESE

/**
 * Info Screen Style (0:Classic, 1:Průša)
 * 液晶屏类型
 * 
 * :[0:'Classic', 1:'Průša']
 */
#define LCD_INFO_SCREEN_STYLE 0

/**
 * SD CARD
 * 记忆卡
 * 
 * SD Card support is disabled by default. If your controller has an SD slot,
 * you must uncomment the following option or it won't work.
 * 默认情况下禁用SD卡。如果你的控制器有一个sd插槽,你必须取消下列注释,否则将不能工作.
 * 
 */
//激活此项:开启sd卡支持
#define SDSUPPORT

/**
 * SD CARD: SPI SPEED
 * SD卡:SPI速度
 * 
 * Enable one of the following items for a slower SPI transfer speed.
 * This may be required to resolve "volume init" errors.
 * 启用下列项目之一来降低SPI传输速度。
 * 这可用于解决“卷初始化”错误。
 * 
 */
//#define SPI_SPEED SPI_HALF_SPEED
//#define SPI_SPEED SPI_QUARTER_SPEED
//#define SPI_SPEED SPI_EIGHTH_SPEED

/**
 * SD CARD: ENABLE CRC
 * SD卡:启用CRC
 * 
 * Use CRC checks and retries on the SD communication.
 * 采用CRC校验和重试 SD的通讯。
 * 
 */
//#define SD_CHECK_AND_RETRY

/**
 * LCD Menu Items
 *
 * Disable all menus and only display the Status Screen, or
 * just remove some extraneous menu items to recover space.
 */
//#define NO_LCD_MENUS
//#define SLIM_LCD_MENUS

//
// ENCODER SETTINGS
// 编码器的设置
//
// This option overrides the default number of encoder pulses needed to
// produce one step. Should be increased for high-resolution encoders.
// 此选项覆盖了生成一步所需的编码器脉冲的默认数目。 应增加高分辨率编码器。
//
//#define ENCODER_PULSES_PER_STEP 4

//
// Use this option to override the number of step signals required to
// move between next/prev menu items.
// 使用此选项来覆盖要求下/上一个菜单项之间移动一步的信号数
// 
//#define ENCODER_STEPS_PER_MENU_ITEM 1

/**
 * Encoder Direction Options
 * 编码器方向选择
 * 
 * Test your encoder's behavior first with both options disabled.
 * 首先测试编码器的行为,同时禁用两个选项。
 * 
 *  Reversed Value Edit and Menu Nav? Enable REVERSE_ENCODER_DIRECTION.
 *  Reversed Menu Navigation only?    Enable REVERSE_MENU_DIRECTION.
 *  Reversed Value Editing only?      Enable BOTH options.
 */

//
// This option reverses the encoder direction everywhere.
// 此选项颠倒编码器方向。
//
//  Set this option if CLOCKWISE causes values to DECREASE
//
//#define REVERSE_ENCODER_DIRECTION

//
// This option reverses the encoder direction for navigating LCD menus.
// 此选项用于反转lcd导航菜单的编码器方向。
//
//  If CLOCKWISE normally moves DOWN this makes it go UP.
//  If CLOCKWISE normally moves UP this makes it go DOWN.
//
//#define REVERSE_MENU_DIRECTION

//
// This option reverses the encoder direction for Select Screen.
//
//  If CLOCKWISE normally moves LEFT this makes it go RIGHT.
//  If CLOCKWISE normally moves RIGHT this makes it go LEFT.
//
//#define REVERSE_SELECT_DIRECTION

//
// Individual Axis Homing
// 单轴的归零
// 
// Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu.
// 在LCD菜单上增加单轴归零选项 (Home X, Home Y, and Home Z) to the LCD menu.
//
//#define INDIVIDUAL_AXIS_HOMING_MENU

//
// SPEAKER/BUZZER
// 扬声器/蜂鸣器
//
// If you have a speaker that can produce tones, enable it here.
// By default Marlin assumes you have a buzzer with a fixed frequency.
// 如果你有一个能产生音调的扬声器,在这里启用它。
// 默认情况下,MARLIN 假设你有一个固定频率的蜂鸣器。
//
//#define SPEAKER

//
// The duration and frequency for the UI feedback sound.
// UI反馈声音的持续时间和频率。
// Set these to 0 to disable audio feedback in the LCD menus.
//
// Note: Test audio output with the G-Code:
//  M300 S<frequency Hz> P<duration ms>
//
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000

//=============================================================================
//======================== LCD / Controller Selection =========================
//========================   (Character-based LCDs)   =========================
//=============================================================================

//
// RepRapDiscount Smart Controller.
// https://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
// Note: Usually sold with a white PCB.
//
//#define REPRAP_DISCOUNT_SMART_CONTROLLER

//
// Original RADDS LCD Display+Encoder+SDCardReader
// http://doku.radds.org/dokumentation/lcd-display/
//
//#define RADDS_DISPLAY

//
// ULTIMAKER Controller. 
// Ultimaker控制器。
//
//#define ULTIMAKERCONTROLLER

//
// ULTIPANEL as seen on Thingiverse.
//
//#define ULTIPANEL

//
// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
// https://reprap.org/wiki/PanelOne
//
//#define PANEL_ONE

//
// GADGETS3D G3D LCD/SD Controller
// https://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
//
// Note: Usually sold with a blue PCB.
//
//#define G3D_PANEL

//
// RigidBot Panel V1.0
// http://www.inventapart.com/
//
//#define RIGIDBOT_PANEL

//
// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
// https://www.aliexpress.com/item/32765887917.html
//
//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602

//
// ANET and Tronxy 20x4 Controller
//
//#define ZONESTAR_LCD            // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
                                  // This LCD is known to be susceptible to electrical interference
                                  // which scrambles the display.  Pressing any button clears it up.
                                  // This is a LCD2004 display with 5 analog buttons.

//
// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
//#define ULTRA_LCD

//=============================================================================
//======================== LCD / Controller Selection =========================
//=====================   (I2C and Shift-Register LCDs)   =====================
//=============================================================================

//
// CONTROLLER TYPE: I2C
//
// Note: These controllers require the installation of Arduino's LiquidCrystal_I2C
// library. For more info: https://github.com/kiyoshigawa/LiquidCrystal_I2C
//

//
// Elefu RA Board Control Panel
// http://www.elefu.com/index.php?route=product/product&product_id=53
//
//#define RA_CONTROL_PANEL

//
// Sainsmart (YwRobot) LCD Displays
//
// These require F.Malpartida's LiquidCrystal_I2C library
// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home
//
//#define LCD_SAINSMART_I2C_1602
//#define LCD_SAINSMART_I2C_2004

//
// Generic LCM1602 LCD adapter
//
//#define LCM1602

//
// PANELOLU2 LCD with status LEDs,
// separate encoder and click inputs.
//
// Note: This controller requires Arduino's LiquidTWI2 library v1.2.3 or later.
// For more info: https://github.com/lincomatic/LiquidTWI2
//
// Note: The PANELOLU2 encoder click input can either be directly connected to
// a pin (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1).
//
//#define LCD_I2C_PANELOLU2

//
// Panucatt VIKI LCD with status LEDs,
// integrated click & L/R/U/D buttons, separate encoder inputs.
//
//#define LCD_I2C_VIKI

//
// CONTROLLER TYPE: Shift register panels
//

//
// 2-wire Non-latching LCD SR from https://goo.gl/aJJ4sH
// LCD configuration: https://reprap.org/wiki/SAV_3D_LCD
//
//#define SAV_3DLCD

//
// 3-wire SR LCD with strobe using 74HC4094
// https://github.com/mikeshub/SailfishLCD
// Uses the code directly from Sailfish
//
//#define FF_INTERFACEBOARD

//
// TFT GLCD Panel with Marlin UI
// Panel connected to main board by SPI or I2C interface.
// See https://github.com/Serhiy-K/TFTGLCDAdapter
//
//#define TFTGLCD_PANEL_SPI
//#define TFTGLCD_PANEL_I2C

//=============================================================================
//=======================   LCD / Controller Selection  =======================
//=========================      (Graphical LCDs)      ========================
//=============================================================================

//
// CONTROLLER TYPE: Graphical 128x64 (DOGM)
//
// IMPORTANT: The U8glib library is required for Graphical Display!
//            https://github.com/olikraus/U8glib_Arduino
//
// NOTE: If the LCD is unresponsive you may need to reverse the plugs.
//

//
// RepRapDiscount FULL GRAPHIC Smart Controller
// https://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
//
//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER

//
// ReprapWorld Graphical LCD
// https://reprapworld.com/?products_details&products_id/1218
//
//#define REPRAPWORLD_GRAPHICAL_LCD

//
// Activate one of these if you have a Panucatt Devices
// Viki 2.0 or mini Viki with Graphic LCD
// https://www.panucatt.com
//
//#define VIKI2
//#define miniVIKI

//
// MakerLab Mini Panel with graphic
// controller and SD support - https://reprap.org/wiki/Mini_panel
//
//#define MINIPANEL

//
// MaKr3d Makr-Panel with graphic controller and SD support.
// https://reprap.org/wiki/MaKr3d_MaKrPanel
//
//#define MAKRPANEL

//
// Adafruit ST7565 Full Graphic Controller.
// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
//
//#define ELB_FULL_GRAPHIC_CONTROLLER

//
// BQ LCD Smart Controller shipped by
// default with the BQ Hephestos 2 and Witbox 2.
//
//#define BQ_LCD_SMART_CONTROLLER

//
// Cartesio UI
// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
//
//#define CARTESIO_UI

//
// LCD for Melzi Card with Graphical LCD
//
//#define LCD_FOR_MELZI

//
// Original Ulticontroller from Ultimaker 2 printer with SSD1309 I2C display and encoder
// https://github.com/Ultimaker/Ultimaker2/tree/master/1249_Ulticontroller_Board_(x1)
//
//#define ULTI_CONTROLLER

//
// MKS MINI12864 with graphic controller and SD support
// https://reprap.org/wiki/MKS_MINI_12864
//
//#define MKS_MINI_12864

//
// MKS LCD12864A/B with graphic controller and SD support. Follows MKS_MINI_12864 pinout.
// https://www.aliexpress.com/item/33018110072.html
//
//#define MKS_LCD12864

//
// FYSETC variant of the MINI12864 graphic controller with SD support
// https://wiki.fysetc.com/Mini12864_Panel/
//
//#define FYSETC_MINI_12864_X_X    // Type C/D/E/F. No tunable RGB Backlight by default
//#define FYSETC_MINI_12864_1_2    // Type C/D/E/F. Simple RGB Backlight (always on)
//#define FYSETC_MINI_12864_2_0    // Type A/B. Discreet RGB Backlight
//#define FYSETC_MINI_12864_2_1    // Type A/B. NeoPixel RGB Backlight
//#define FYSETC_GENERIC_12864_1_1 // Larger display with basic ON/OFF backlight.

//
// Factory display for Creality CR-10
// https://www.aliexpress.com/item/32833148327.html
//
// This is RAMPS-compatible using a single 10-pin connector.
// (For CR-10 owners who want to replace the Melzi Creality board but retain the display)
//
//#define CR10_STOCKDISPLAY

//
// Ender-2 OEM display, a variant of the MKS_MINI_12864
//
//#define ENDER2_STOCKDISPLAY

//
// ANET and Tronxy Graphical Controller
//
// Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
// A clone of the RepRapDiscount full graphics display but with
// different pins/wiring (see pins_ANET_10.h).
//
//#define ANET_FULL_GRAPHICS_LCD

//
// AZSMZ 12864 LCD with SD
// https://www.aliexpress.com/item/32837222770.html
//
//#define AZSMZ_12864

//
// Silvergate GLCD controller
// https://github.com/android444/Silvergate
//
//#define SILVER_GATE_GLCD_CONTROLLER

//=============================================================================
//==============================  OLED Displays  ==============================
//=============================================================================

//
// SSD1306 OLED full graphics generic display
//
//#define U8GLIB_SSD1306

//
// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules
//
//#define SAV_3DGLCD
#if ENABLED(SAV_3DGLCD)
  #define U8GLIB_SSD1306
  //#define U8GLIB_SH1106
#endif

//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2

//
// MKS OLED 1.3" 128×64 FULL GRAPHICS CONTROLLER
// https://reprap.org/wiki/MKS_12864OLED
//
// Tiny, but very sharp OLED display
//
//#define MKS_12864OLED          // Uses the SH1106 controller (default)
//#define MKS_12864OLED_SSD1306  // Uses the SSD1306 controller

//
// 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
//
//#define U8GLIB_SH1106_EINSTART

//
// Overlord OLED display/controller with i2c buzzer and LEDs
//
//#define OVERLORD_OLED

//
// 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

//=============================================================================
//========================== Extensible UI Displays ===========================
//=============================================================================

//
// DGUS Touch Display with DWIN OS. (Choose one.)
// ORIGIN : https://www.aliexpress.com/item/32993409517.html
// FYSETC : https://www.aliexpress.com/item/32961471929.html
//
//#define DGUS_LCD_UI_ORIGIN
//#define DGUS_LCD_UI_FYSETC
//#define DGUS_LCD_UI_HIPRECY

//
// Touch-screen LCD for Malyan M200/M300 printers
//
//#define MALYAN_LCD
#if ENABLED(MALYAN_LCD)
  #define LCD_SERIAL_PORT 1  // Default is 1 for Malyan M200
#endif

//
// Touch UI for FTDI EVE (FT800/FT810) displays
// See Configuration_adv.h for all configuration options.
//
//#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 LCD_SERIAL_PORT 3  // Default is 3 for Anycubic
  //#define ANYCUBIC_LCD_DEBUG
#endif

//
// Third-party or vendor-customized controller interfaces.
// Sources should be installed in 'src/lcd/extensible_ui'.
//
//#define EXTENSIBLE_UI

#if ENABLED(EXTENSIBLE_UI)
  //#define EXTUI_LOCAL_BEEPER // Enables use of local Beeper pin with external display
#endif

//=============================================================================
//=============================== Graphical TFTs ==============================
//=============================================================================

/**
 * TFT Type - Select your Display type
 *
 * Available options are:
 *   MKS_TS35_V2_0,
 *   MKS_ROBIN_TFT24, MKS_ROBIN_TFT28, MKS_ROBIN_TFT32, MKS_ROBIN_TFT35,
 *   MKS_ROBIN_TFT43, MKS_ROBIN_TFT_V1_1R
 *   TFT_TRONXY_X5SA, ANYCUBIC_TFT35, LONGER_LK_TFT28
 *   TFT_GENERIC
 *
 * For TFT_GENERIC, you need to configure these 3 options:
 *   Driver:     TFT_DRIVER
 *               Current Drivers are: AUTO, ST7735, ST7789, ST7796, R61505, ILI9328, ILI9341, ILI9488
 *   Resolution: TFT_WIDTH and TFT_HEIGHT
 *   Interface:  TFT_INTERFACE_FSMC or TFT_INTERFACE_SPI
 */
//#define TFT_GENERIC

/**
 * TFT UI - User Interface Selection. Enable one of the following options:
 *
 *   TFT_CLASSIC_UI - Emulated DOGM - 128x64 Upscaled
 *   TFT_COLOR_UI   - Marlin Default Menus, Touch Friendly, using full TFT capabilities
 *   TFT_LVGL_UI    - A Modern UI using LVGL
 *
 *   For LVGL_UI also copy the 'assets' folder from the build directory to the
 *   root of your SD card, together with the compiled firmware.
 */
//#define TFT_CLASSIC_UI
//#define TFT_COLOR_UI
//#define TFT_LVGL_UI

/**
 * TFT Rotation. Set to one of the following values:
 *
 *   TFT_ROTATE_90,  TFT_ROTATE_90_MIRROR_X,  TFT_ROTATE_90_MIRROR_Y,
 *   TFT_ROTATE_180, TFT_ROTATE_180_MIRROR_X, TFT_ROTATE_180_MIRROR_Y,
 *   TFT_ROTATE_270, TFT_ROTATE_270_MIRROR_X, TFT_ROTATE_270_MIRROR_Y,
 *   TFT_MIRROR_X, TFT_MIRROR_Y, TFT_NO_ROTATION
 */
//#define TFT_ROTATION TFT_NO_ROTATION

//=============================================================================
//============================  Other Controllers  ============================
//=============================================================================

//
// Ender-3 v2 OEM display. A DWIN display with Rotary Encoder.
//
//#define DWIN_CREALITY_LCD

//
// DWIN resistive touch screen
//
// #define DWIN_CREALITY_RTS
#define RTS_AVAILABLE

//
// ADS7843/XPT2046 ADC Touchscreen such as ILI9341 2.8
//
//#define TOUCH_SCREEN
#if ENABLED(TOUCH_SCREEN)
  #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
#endif

//
// RepRapWorld REPRAPWORLD_KEYPAD v1.1
// https://reprapworld.com/products/electronics/ramps/keypad_v1_0_fully_assembled/
//
//#define REPRAPWORLD_KEYPAD
//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 // (mm) Distance to move per key-press

//=====================================================================================
//=============================== Extra Features  额外功能==============================
//=====================================================================================

// @section extras

// Set number of user-controlled fans. Disable to use all board-defined fans.
// :[1,2,3,4,5,6,7,8]
//#define NUM_M106_FANS 1

// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino
// 增加风扇pwm频率。消除PWM噪声但增加FET / Arduino加热  
//#define FAST_PWM_FAN

// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
// which is not as annoying as with the hardware PWM. On the other hand, if this frequency
// is too low, you should also increment SOFT_PWM_SCALE.
// 使用软件PWM驱动风扇,如加热器。 这使用一个非常低的频率,不像硬件PWM那样令人讨厌。
// 另一方面,如果这个频率太低了,你还可以适当增加 SOFT_PWM_SCALE。
// #define FAN_SOFT_PWM

// Incrementing this by 1 will double the software PWM frequency,
// affecting heaters, and the fan if FAN_SOFT_PWM is enabled.
// However, control resolution will be halved for each increment;
// at zero value, there are 128 effective control positions.
// 增加1将使软PWM频率翻倍,影响加热器,如果FAN_SOFT_PWM启用,则会影响风扇。
// 但是,每增加一个,控制分辨率会减半,在零值时,有效控制位置有128个。(0对应128)
// :[0,1,2,3,4,5,6,7]
#define SOFT_PWM_SCALE 0

// If SOFT_PWM_SCALE is set to a value higher than 0, dithering can
// be used to mitigate the associated resolution loss. If enabled,
// some of the PWM cycles are stretched so on average the desired
// duty cycle is attained.
// 如果SOFT_PWM_SCALE 设置的值大于0, 抖动可以用来减轻相关的分辨率损失。
// 如果开启,有些PWM周期被拉长,因此平均所需的占空比达到。
//#define SOFT_PWM_DITHER

// Temperature status LEDs that display the hotend and bed temperature.
// If all hotends, bed temperature, and target temperature are under 54C
// then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
// 用LED显示温度状态。如果所有的hotends,床层温度和目标温度均低于54。,蓝色LED灯亮,反之红灯亮。
//#define TEMP_STAT_LEDS

// Support for the BariCUDA Paste Extruder
// 支持BariCUDA Paste挤出机。
//#define BARICUDA

// Support for BlinkM/CyzRgb
// 支持BlinkM/CyzRgb  
//#define BLINKM

// Support for PCA9632 PWM LED driver
//#define PCA9632

// Support for PCA9533 PWM LED driver
//#define PCA9533

/**
 * RGB LED / LED Strip Control
 * 彩色LED / LED条控制
 * 
 * Enable support for an RGB LED connected to 5V digital pins, or
 * an RGB Strip connected to MOSFETs controlled by digital pins.
 *
 * Adds the M150 command to set the LED (or LED strip) color.
 * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
 * luminance values can be set from 0 to 255.
 * For NeoPixel LED an overall brightness parameter is also available.
 *
 * *** CAUTION ***
 *  LED Strips require a MOSFET Chip between PWM lines and LEDs,
 *  as the Arduino cannot handle the current the LEDs will require.
 *  Failure to follow this precaution can destroy your Arduino!
 *  NOTE: A separate 5V power supply is required! The NeoPixel LED needs
 *  more current than the Arduino 5V linear regulator can produce.
 * *** CAUTION ***
 *
 * LED Type. Enable only one of the following two options.
 */
//#define RGB_LED
//#define RGBW_LED

#if 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
#endif

// Support for Adafruit NeoPixel LED driver
//#define NEOPIXEL_LED
#if ENABLED(NEOPIXEL_LED)
  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
  #define NEOPIXEL_PIN     4       // LED driving pin
  //#define NEOPIXEL2_TYPE NEOPIXEL_TYPE
  //#define NEOPIXEL2_PIN    5
  #define NEOPIXEL_PIXELS 30       // Number of LEDs in the strip. (Longest strip when NEOPIXEL2_SEPARATE is disabled.)
  #define NEOPIXEL_IS_SEQUENTIAL   // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness (0-255)
  //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup

// Support for second Adafruit NeoPixel LED driver controlled with M150 S1 ...
  //#define NEOPIXEL2_SEPARATE
  #if ENABLED(NEOPIXEL2_SEPARATE)
    #define NEOPIXEL2_PIXELS      15  // Number of LEDs in the second strip
    #define NEOPIXEL2_BRIGHTNESS 127  // Initial brightness (0-255)
    #define NEOPIXEL2_STARTUP_TEST    // Cycle through colors at startup
  #else
    //#define NEOPIXEL2_INSERIES      // Default behavior is NeoPixel 2 in parallel
  #endif

// Use a single NeoPixel LED for static (background) lighting
  //#define NEOPIXEL_BKGD_LED_INDEX  0               // Index of the LED to use
  //#define NEOPIXEL_BKGD_COLOR { 255, 255, 255, 0 } // R, G, B, W
#endif

/**
 * Printer Event LEDs
 * 打印事件的LED状态
 * 
 * During printing, the LEDs will reflect the printer status:
 * 在打印过程中,LED将反映打印机状态:
 * 
 *  - Gradually change from blue to violet as the heated bed gets to target temp
 *  - Gradually change from violet to red as the hotend gets to temperature
 *  - Change to white to illuminate work surface
 *  - Change to green once print has finished
 *  - Turn off after the print has finished and the user has pushed a button
 * 
 *  - 当加热床到达目标温度时,逐渐由蓝色变为紫色。
 *  - 当hotend到达温度时,  逐渐从紫到红 。
 *  - 变白以照亮工作面
 *  - 打印完成后改为绿色
 *  - 当打印完成后并用户按下按钮时,将关闭,
 * 
 */
#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED)
  #define PRINTER_EVENT_LEDS
#endif

/**
 * Number of servos //舵机数量
 *
 * For some servo-related options NUM_SERVOS will be set automatically.
 * Set this manually if there are extra servos needing manual control.
 * Set to 0 to turn off servo support.
 */
//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command 使用  M280 进行控制,舵机顺序由0开始。

// (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.
// If the servo can't reach the requested position, increase it.
// 在下一步开始之前,延迟(毫秒),使伺服时间达到目标角。
// 300ms是一个很好的值,但是你可以试着减少延迟。
// 如果伺服不能达到所要求的位置,增加它。
#define SERVO_DELAY { 300 }

// Only power servos during movement, otherwise leave off to prevent jitter
// 让舵机在运动时供电,不需要运动时断电,以防止其出现意外抖动。 
//#define DEACTIVATE_SERVOS_AFTER_MOVE

// Edit servo angles with M281 and save to EEPROM with M500
//#define EDITABLE_SERVO_ANGLES

Marlin2.0.7的configuration.h中文说明相关推荐

  1. marlin速度前瞻运动控制c语言程序,开源cnc项目Marlin2.0运动控制部分代码理解-Go语言中文社区...

    本文主要梳理Marlin2.0工程代码中关于运动控制部分的理解.Marlin1.0工程代码用C语言写的,阅读起来比较容易.Marlin1.0主要核心算法包括圆弧插补.速度前瞻.转角速度圆滑.梯形速度规 ...

  2. 浅谈Marlin2.0

    简介 marlin固件发展至今已经形成了三个比较重大的版本:1.0版,1.1版,2.0版. 我接触marlin固件已经有一段时间了,原来一直对于marlin固件的结构和应用平台一直不是很理解:为什么m ...

  3. 【3D打印机】原来配置Marlin2.0这么简单,别说我没告诉你。

    `` ​ 可能由于各人的打印机款式不同,某些参数没有出现在文中,但是只要你完全看完本指南,就可以理解Marlin是如何工作的,我相信在此基础上,你在固件中找到哪些不同配置并不困难. 本文的最终的目标是 ...

  4. marlin2.0.5.4配置详解——个人记录

    marlin2.0.5.4配置详解--个人记录 串口波特率 主板类型 挤出机数量 混色打印 温度传感器 最大温度 挤出机保护 双轴联动结构 限位开关上拉 限位开关信号 电机使能信号 禁用电机 电机运动 ...

  5. Marlin-1.1.3固件Configuration.h文件解析

    /**  * Configuration.h  *  * 基本设置如:  *  * - 电子元器件类型   * - 温度传感器类型   * - 打印机尺寸  * - 限位开关配置  * - 液晶显示控 ...

  6. vc++ 6.0对话框上无法显示中文(乱码)

    是英文版的vc++,建立mfc向导时无法选择中文,到对话框里面改成中文还是乱码,怎么版啊 问题补充: 一般对话框是可以的,就是那个CPropertyPage 不可以对话框资源选成中文以后要ReBuil ...

  7. JFreeChart 1.0.6 用户开发指南(中文)

    JFreeChart 1.0.6 用户开发指南(中文) 草稿(0.9.0) 2007-10-25 2000-2007, Object Refinery Limited. All rights rese ...

  8. .text 0.958之间居的中文汉化下载

    .text 0.958之间居的中文汉化下载 http://218.19.140.219/uploadfile/040426192172.rar posted on 2004-06-14 20:19 浙 ...

  9. JHChart 1.1.0 iOS图表工具库中文ReadMe

    代码地址如下: http://www.demodashi.com/demo/11701.html 好吧,的确当前的[github]上已经存有不少的iOS图表工具库,然而,当公司的项目需要图表时,几乎没 ...

  10. vscode中文支持xp_VSCode (Visual Studio Code) V1.43.0下载并设置成中文语言的方法

    Visual Studio Code(简称 VS Code / VSC) 是一款免费开源的现代化轻量级代码编辑器,支持语法高亮.智能代码补全.自定义热键.括号匹配.代码片段.代码对比 Diff.GIT ...

最新文章

  1. R语言无序多分类Logistic回归模型实战
  2. [设计模式]设计模式之禅关于接口隔离原则
  3. GDCM:gdcm::XMLDictReader的测试程序
  4. 1.Linux下libevent和memcached安装
  5. C#里巧用DateTime预设一些可选的日期范围(如本年度、本季度、本月等)
  6. TCP第四次挥手为什么要等待2MSL
  7. SkyEye实现工业安全关键领域基础软件国产替代
  8. java同步list_Java集合--ArrayList出现同步问题的原因
  9. win10python3.6.3安装_Win10Python3.6安装impyla
  10. mysql报错:ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
  11. 最长上升子序列(LIS)和最长公共子序列(LCS) 模板
  12. ISO9001:2000标准的主要特点和要求(转载)
  13. 分享文章到新浪微博(源码)
  14. 8081端口被nexus占用的情况如何解决
  15. 2021年茶艺师(中级)复审考试及茶艺师(中级)模拟考试题
  16. MacBook 快捷键个人总结和设置
  17. AntD的Table表头title加Icon图标和气泡提示Tooltip
  18. 正则表达式 取最后一个 . 然后进行匹配
  19. 数组可以存放实数吗?
  20. 计算机社团未来发展规划,社团未来发展规划.doc

热门文章

  1. 利用WinEdt修改图片格式为eps
  2. PHP利用有道智云提供的API接口来翻译字符串
  3. 2020-02-13
  4. 2022茶艺师(中级)考试题及模拟考试
  5. 地图比例尺、瓦片切片方案、EPSG
  6. 常用的公共 DNS 服务器 IP 地址
  7. Screen Snapshot for Mac(屏幕截图工具)
  8. 【Python怎么批量修改文件名称】
  9. 如何在Excel里输入可以打钩的选择框?
  10. 使用Python、pandas、pyecharts进行数据分析——实例讲解